
var xmlHttp;
function GetXmlHttpObject(){
	var xmlHttp=null;
	try
	  {
	  xmlHttp=new XMLHttpRequest();
	  }
	catch(e)
	  {
	  try
	    {
	    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
	    }
	  catch(e)
	    {
	    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
	    }
	  }
	return xmlHttp;
}

function query_hint(mode,str){
global_mode=mode;
if(str.length>2 && str.length<25){
xmlHttp=GetXmlHttpObject();
if(xmlHttp==null)return;
if(mode=="keys")var url="http://stestuj.de/ks.php";
if(mode=="domains")var url="http://stestuj.de/kr.php";
if(mode=="quick" || mode=="typical")var url="http://stestuj.de/help.php";
url=url+"?q="+str;
xmlHttp.onreadystatechange=show_hint;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}
}

function pseudo_hover(what,tocolor){
what.style.color=tocolor;
}

function swap(what,how){
if(document.getElementById(what+"_1").style.display=="block")document.getElementById(what+"_1").style.display="none";
if(document.getElementById(what+"_2").style.display=="block")document.getElementById(what+"_2").style.display="none";
if(document.getElementById(what+"_3").style.display=="block")document.getElementById(what+"_3").style.display="none";
document.getElementById(what+"_"+how).style.display="block";
}

function show_hint(){
if(xmlHttp.readyState==4){
document.getElementById("hint_"+global_mode).style.display="block";
document.getElementById("hint_"+global_mode).innerHTML=xmlHttp.responseText;
}
}