function rx(){
	if (!window.XMLHttpRequest){
 		try{ return new ActiveXObject("MSXML3.XMLHTTP") }catch(e){}
	    try{ return new ActiveXObject("MSXML2.XMLHTTP.3.0") }catch(e){}
	    try{ return new ActiveXObject("Msxml2.XMLHTTP") }catch(e){}
	    try{ return new ActiveXObject("Microsoft.XMLHTTP") }catch(e){}
		throw new Error("Could not find an XMLHttpRequest alternative.")
	}else{
		return new XMLHttpRequest();
	}
}

function req(url,callbackFunction){
	var request=rx();
	if (request==null) return false;
	
	request.open("GET",url,true);
	request.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); 
	request.onreadystatechange=function(){
  	
	  	if (request.readyState==4 && request.status==200)
	    	if (request.responseText)
				callbackFunction(request.responseText);
			
	};
	request.send("");
	return true;
}

function hlas_ok(y){
	y=y.split("|");
	document.getElementById("hlas_"+y[0]).innerHTML=y[1];
}

function hlas(a,b){
	document.getElementById("hlas_"+a).innerHTML="";
	req("_hlas.php?a="+a+"&b="+b,hlas_ok);
}

function ukaz_ok(a){
	a=a.split("^");
	document.getElementById("tit_"+a[0]).innerHTML=a[1];
	document.getElementById("tex_"+a[0]).innerHTML=a[2];
}

function ukaz(y){
	req("_hlas.php?id="+y,ukaz_ok);
}