// The following code is taken from the Google Translation Service:  http://translate.google.com
// Save the following as a .js file, upload it to a server, and call it on any Web page.

var currentpage = "http://";
currentpage = document.location + "";

if(currentpage.indexOf("sacog.org")<=-1) {
	// If we don't detect our domain name in the current page's URL, then do nothing.
}
else {
	document.write("<div id='googletranslatecontainer'>");
	document.write("<form method='post' name='googletranslate' action='http://translate.google.com/translate' target='_blank'>");
	document.write("<input type='hidden' name='u' id='url' value='http://' dir='ltr'>");
	document.write("<input type='hidden' name='hl' value='en' />");
	document.write("<input type='hidden' name='ie' value='UTF8' />");
	document.write("<strong style='font-size: 10pt; font-weight: bold; color: black'>Translate this page into:</strong><br />");
	document.write("<select name='langpair'>");
	document.write("<option value='en|ar' class='line-above'>Arabic</option>");
	document.write("<option value='en|zh-CN'>Chinese \(Simplified\)</option>");
	document.write("<option value='en|fr'>French</option>");
	document.write("<option value='en|de'>German</option>");
	document.write("<option value='en|it'>Italian</option>");
	document.write("<option value='en|ja'>Japanese</option>");
	document.write("<option value='en|ko'>Korean</option>");
	document.write("<option value='en|pt'>Portuguese</option>");
	document.write("<option value='en|es' selected='selected'>Spanish</option>");
	document.write("</select>");
	document.write("&nbsp;<input type='submit' value='Go' />");
	document.write("</form>");
	document.write("</div>");
	document.write("<p style='font-size: 8pt; font-family: verdana, sans-serif; text-align: center;'>\(Translation is provided by Google, and may not be 100% accurate\)</p>");

	document.googletranslate.u.value = currentpage;
}
