
function switchout(){
	if (req.readyState == 4) {
		// only if "OK"
		if (req.status == 200) {
			document.body.innerHTML = req.responseText;
		} else {
			document.body.innerHTML = req.responseText;
			//alert( req.responseText);
		}
	}
	return false;
}

function languageize(lang) {
	var url = document.location;
	if (window.XMLHttpRequest) {
		req = new XMLHttpRequest();
		req.onreadystatechange = switchout;
		req.open("GET", url, true);
		req.setRequestHeader("Accept-Language", lang);
		req.setRequestHeader("Cache-Control", "no-cache");
		req.send(null);
		// branch for IE,Windows ActiveX version
	} else if (window.ActiveXObject) {
		<!--- req = new ActiveXObject("msxml2.xmlhttp.4.0"); --->
		req = new ActiveXObject("Microsoft.XMLHTTP");
		if (req) {
			req.onreadystatechange = switchout;
			req.open("GET", url + '?lang=' + lang, true);
			req.setRequestHeader("Accept-Language", lang);
			req.setRequestHeader("Cache-Control", "no-cache");
			req.send();
		}
	}
}

var tmpstring = document.location.toString();

if (tmpstring.match(/userguide\/results/)) {
	document.write ( '<style>form { display: none;}'); 
	document.write ( 'td.wix { display: table-cell;}');
	document.write ( 'td.gix { display: none;}');
	document.write('</style>');	
}
