

 
	function createWorldLingo(language)
	{
	var hydroURLQuery = "";
		if ( this.location.search != 0 ) {         // test to see if URL is from within hydrooptix.com or from within worldlingo.com
		
		// location is from a translated page within worldlingo.com  Need to strip off beginning part of worldling URL. Just leave part after query Question mark
		// note: this command leaves in the question mark in the result.  We'll deal with than problem in the split step next
		hydroURLQuery = this.location.search;
		
		// DEBUG: document.write('LOCATION SEARCH '+this.location.search);
		
		// want to get rid of starting question mark -- use split command on '?'  Everything to right of ? will be in hydroURLQuery_split[1]
		var hydroURLQuery_split = hydroURLQuery.split("wl_url="); 
		 
		// DEBUG: document.write('LOCATION SEARCH AFTER'+hydroURLQuery_split[1]);
 
		location.replace('http://www.worldlingo.com/S2501.0/translate?wl_trglang='+language+'&wl_url='+hydroURLQuery_split[1]);
		} else {
			    // location is from within a normal hydrooptix.com page
				location.replace('http://www.worldlingo.com/S2501.0/translate?wl_trglang='+language+'&wl_url='+this.location.href);
		}
	}
	
 
	function writeJS(){
	var str='';
	str+='<tr>';
	str+='	<td colspan=3 width=877>';
	str+='<table border=0 width=877 style="background:#000000\;">';
	str+='<tr>';
	str+='		<td>';
	str+='		<a href="javascript:createWorldLingo(\'en\')"><img src="http:\/\/www.hydrooptix.com\/images\/worldlingo\/en_us.jpg" alt="English" width="41" height="34" border="0"><\/a>';
	str+='		<\/td>';
	str+='		<td>';
	str+='		<a href="javascript:createWorldLingo(\'fr\')"><img src="http:\/\/www.hydrooptix.com\/images\/worldlingo\/fr_ca.jpg" alt="French" width="47" height="34" border="0"><\/a>';
	str+='		<\/td>';
	str+='		<td>';
	str+='		<a href="javascript:createWorldLingo(\'de\')"><img src="http:\/\/www.hydrooptix.com\/images\/worldlingo\/de.jpg" alt="German" width="45" height="34" border="0"><\/a>';
	str+='		<\/td>';
	str+='		<td>';
	str+='		<a href="javascript:createWorldLingo(\'it\')"><img src="http:\/\/www.hydrooptix.com\/images\/worldlingo\/it.jpg" alt="Italian" width="42" height="34" border="0"><\/a>';
	str+='		<\/td>';
	str+='		<td>';
	str+='		<a href="javascript:createWorldLingo(\'pt\')"><img src="http:\/\/www.hydrooptix.com\/images\/worldlingo\/pt_br.jpg" alt="Portuguese" width="56" height="34" border="0"><\/a>';
	str+='		<\/td>';
	str+='		<td>';
	str+='		<a href="javascript:createWorldLingo(\'es\')"><img src="http:\/\/www.hydrooptix.com\/images\/worldlingo\/es_mx.jpg" alt="Spanish" width="46" height="34" border="0"><\/a>';
	str+='		<\/td>';
	str+='		<td>';
	str+='		<a href="javascript:createWorldLingo(\'ru\')"><img src="http:\/\/www.hydrooptix.com\/images\/worldlingo\/ru.jpg" alt="Russian" width="50" height="34" border="0"><\/a>';
	str+='		<\/td>';
	str+='		<td>';
	str+='		<a href="javascript:createWorldLingo(\'nl\')"><img src="http:\/\/www.hydrooptix.com\/images\/worldlingo\/nl.jpg" alt="Dutch" width="61" height="34" border="0"><\/a>';
	str+='		<\/td>';
	str+='		<td>';
	str+='		<a href="javascript:createWorldLingo(\'el\')"><img src="http:\/\/www.hydrooptix.com\/images\/worldlingo\/el.jpg" alt="Greek" width="55" height="34" border="0"><\/a>';
	str+='		<\/td>';
	str+='		<td>';
	str+='		<a href="javascript:createWorldLingo(\'sv\')"><img src="http:\/\/www.hydrooptix.com\/images\/worldlingo\/sv.jpg" alt="Swedish" width="47" height="34" border="0"><\/a>';
	str+='		<\/td>';
	str+='		<td>';
	str+='		<a href="javascript:createWorldLingo(\'ar\')"><img src="http:\/\/www.hydrooptix.com\/images\/worldlingo\/ar.jpg" alt="Arabic" width="36" height="34" border="0"><\/a>';
	str+='		<\/td>';
	str+='		<td>';
	str+='		<a href="javascript:createWorldLingo(\'ja\')"><img src="http:\/\/www.hydrooptix.com\/images\/worldlingo\/ja.jpg" alt="Japanese" width="36" height="34" border="0"><\/a>';
	str+='		<\/td>';
	str+='		<td>';
	str+='		<a href="javascript:createWorldLingo(\'ko\')"><img src="http:\/\/www.hydrooptix.com\/images\/worldlingo\/ko.jpg" alt="Korean" width="36" height="34" border="0"><\/a>';
	str+='		<\/td>';
	str+='		<td>';
	str+='		<a href="javascript:createWorldLingo(\'zh_cn\')"><img src="http:\/\/www.hydrooptix.com\/images\/worldlingo\/zh_cn.jpg" alt="Chinese Simplified" width="42" height="34" border="0"><\/a>';
	str+='		<\/td>';
	str+='		<td>';
	str+='		<a href="javascript:createWorldLingo(\'zh_tw\')"><img src="http:\/\/www.hydrooptix.com\/images\/worldlingo\/zh_tw.jpg" alt="Chinese Traditional" width="48" height="34" border="0"><\/a>';
	str+='		<\/td>';
	str+='		<td>';
	str+='		<a href="http:\/\/www.worldlingo.com"><img src="http:\/\/www.hydrooptix.com\/images\/worldlingo\/logo_h.jpg" alt="Visit World Lingo" width="90" height="34" border="0"><\/a>';
	str+='		<\/td>';
	str+='	<\/tr>';
	str+='	<\/table>';
	str+='		<\/td>';
	str+='	<\/tr>';
	
	document.write(str);
	}
	
	writeJS();
 
 
 
