<script language="JavaScript">
<!--

function getArgs() {
	var args = new Object();
	// Get Query String
	var query = location.search.substring(1); 
	// Split query at the comma
	var pairs = query.split("&"); 
	
	// Begin loop through the querystring
	for(var i = 0; i < pairs.length; i++) {

		// Look for "name=value"
		var pos = pairs[i].indexOf('='); 
		// if not found, skip to next
		if (pos == -1) continue; 
		// Extract the name
		var argname = pairs[i].substring(0,pos); 
		
		// Extract the value
		var value = pairs[i].substring(pos+1); 
		// Store as a property
		args[argname] = unescape(value); 
	}
	return args; // Return the Object
}

var args;
var engshow=0;
var urltoshow;
if (location.host=='216.239.39.120') {
  args=getArgs();
  urltoshow=args.u;
  engshow=1;
}
else {
  urltoshow=location.href;
}

function doTranslate(langname) {
  var hreftoshow;
  if (langname=="en") {
    location.href=urltoshow;
  }
  else {
    hreftoshow='http://216.239.39.120/translate_c?langpair=en|'+langname+'&u='+escape(urltoshow);
    location.href=hreftoshow;
  }
}

document.write('<br>\n');
document.write('<table width="172" border="0" cellspacing="0" cellpadding="2" align="center">\n');
document.write('  <tr>\n');
document.write('    <td bgcolor="#ffffff" align="center">\n');
document.write('    <img src="http://www.turquoiselady.net/catalog/images/translate_google.gif" border="0" width="160" height="40">\n');
document.write('    </td>\n');
document.write('  </tr>\n');
document.write('  <tr>\n');
document.write('  <form name="translatetool" onSubmit="return false;">');
document.write('    <td bgcolor="#ffffff">\n');
document.write('    <select name="langpair" class="smallselect" onChange="if (this.selectedIndex>0) { doTranslate(this.options[this.selectedIndex].value); }">\n');
document.write('     <option value="" selected>-- Select below --</option>\n');
if (engshow==1) {
  document.write('     <option value="en">English</option>\n');
}
document.write('     <option value="de">German</option>\n');
document.write('     <option value="es">Spanish</option>\n');
document.write('     <option value="fr">French</option>\n');
document.write('     <option value="it">Italian</option>\n');
document.write('     <option value="pt">Portugese</option>\n');
document.write('    </select>\n');
document.write('    <br>\n');
document.write('    </td>\n');
document.write('  </tr>\n');
document.write('  </form>\n');
document.write('</table>\n');
//-->
</script>
