var helppi_panostus_xmlHttp

function panostus(strP,strP2)
{
if (strP.length==0)
  { 
  document.getElementById("getpanostus").innerHTML="";
  return;
  }
helppi_panostus_xmlHttp=GetXmlHttpObject();
if (helppi_panostus_xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url="/helppi_panostus.php";
url=url+"?q="+strP+"&q2="+strP2;
helppi_panostus_xmlHttp.onreadystatechange=helppi_panostus_stateChanged;
helppi_panostus_xmlHttp.open("GET",url,true);
helppi_panostus_xmlHttp.send(null);
} 

function helppi_panostus_stateChanged() 
{ 
if (helppi_panostus_xmlHttp.readyState==4)
{ 
document.getElementById("getpanostus").innerHTML=helppi_panostus_xmlHttp.responseText;
}
else{
  document.getElementById("getpanostus").innerHTML="<div align=center><img src=/images/ajax-loader.gif></div>"
 }

}

function GetXmlHttpObject()
{
var helppi_panostus_xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  helppi_panostus_xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    helppi_panostus_xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    helppi_panostus_xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return helppi_panostus_xmlHttp;
}


