function gTranslate( rowid, google_language_code) 
{
	if( $F('phrase_'+rowid) != ''  )
		origin = $F('phrase_'+rowid);
	else if( $('source_'+rowid) != undefined )
		origin = $F('source_'+rowid);
	else
		origin = '';
		
	google.language.translate( 
		origin, "en", google_language_code, 
		function(result) 
		{ 
			$('target_'+rowid).value = result.error ? '' : result.translation.replace(/\&\#(.*?)\;/g,
				function() {return (String.fromCharCode(arguments[1]))});
			if( $('source_'+rowid) != undefined && $('target_'+rowid).value != $F('source_'+rowid) )
				$('target_'+rowid).style.color = 'red';
		}
	);
}
// call Google Translate API to retrieve tranlation according language
call Google Translate API to retrieve tranlation according language
call Google Translate API to retrieve tranlation according language
function gTranslate( rowid, google_language_code) 
{
	if( $F('phrase_'+rowid) != ''  )
		origin = $F('phrase_'+rowid);
	else if( $('source_'+rowid) != undefined )
		origin = $F('source_'+rowid);
	else
		origin = '';
	google.language.translate( 
		origin, "en", google_language_code, 
		function(result) 
		{ 
			$('target_'+rowid).value = result.error ? '' : result.translation.replace(/\&\#(.*?)\;/g,
				function() {return (String.fromCharCode(arguments[1]))});
			if( $('source_'+rowid) != undefined && $('target_'+rowid).value != $F('source_'+rowid) )
				$('target_'+rowid).style.color = 'red';
		}
	);
}
function gTranslate ( rowid , google_language_code ) { if ( $F ( 'phrase_' + rowid ) != '' ) origin = $F ( 'phrase_' + rowid ) ; else if ( $ ( 'source_' + rowid ) != undefined ) origin = $F ( 'source_' + rowid ) ; else origin = '' ; google . language . translate ( origin , "en" , google_language_code , function ( result ) { $ ( 'target_' + rowid ) . value = result . error ? '' : result . translation . replace ( / \&\#(.*?)\; / g , function ( ) { return ( String . fromCharCode ( arguments [ 1 ] ) ) } ) ; if ( $ ( 'source_' + rowid ) != undefined && $ ( 'target_' + rowid ) . value != $F ( 'source_' + rowid ) ) $ ( 'target_' + rowid ) . style . color = 'red' ; } ) ; }
call Google Translate API to retrieve tranlation according language
call Google Translate API to retrieve tranlation according language