var request = false;
try {
  request = new XMLHttpRequest();
} catch (trymicrosoft) {
  try {
    request = new ActiveXObject("Msxml2.XMLHTTP");
  } catch (othermicrosoft) {
    try {
      request = new ActiveXObject("Microsoft.XMLHTTP");
    } catch (failed) {
      request = false;
    }
  }
}

if (!request)
{
  alert("Error initializing XMLHttpRequest!");
}
function getRootPath() {
    var strFullPath = window.document.location.href;
    var strPath = window.document.location.pathname;
    var pos = strFullPath.indexOf(strPath);
    var prePath = strFullPath.substring(0, pos);
    var postPath = strPath.substring(0, strPath.substr(1).indexOf('/') + 1);
    return (postPath);
}
     function set_ajax(t1)
	  {

	      var url = "/inc/page_ajax.aspx?t1=" + escape(t1) + "&sid=" + Math.random();
	     
	        request.open("GET", url, true);
            request.onreadystatechange = loadPage;
            request.send(null);

	  }

    function loadPage() {
	        if (request.readyState == 4) 
			{
		   if (request.status == 200) 
		   {
			   	if(request.responseText!="")
				{
					var response = request.responseText.split("{fzw:next}");
					if(response[0]=="+")
					{
						document.getElementById(response[1]).innerHTML=response[2];
					}
					if(response[0]=="-")
					{
						document.getElementById(response[1]).innerHTML=response[2];
					}
					else if(response[0]=="=")
					{
						document.getElementById(response[1]).innerHTML=response[2];
					}
					
				}
			
		   }
     

   }
   }
   
   
    