var xmlHttp = null;

function escodeString(pStr)
{
   return (encodeURIComponent?encodeURIComponent(pStr):(escape?escape(pStr):pStr));
}

function decodeString(pStr)
{
   return (decodeURIComponent?decodeURIComponent(pStr):(unescape?unescape(pStr):pStr));
}
 
function GetXMLHTTP()
{
  var xhr=null;
  try{
        xhr=new ActiveXObject("Msxml2.XMLHTTP")
     }
     catch(e)
     {     
       try
       {
         xhr=new ActiveXObject("Microsoft.XMLHTTP")
       } 
       catch(ee)
       {
         xhr=null
       }
     }

  if(!xhr && typeof XMLHttpRequest != "undefined") {

    xhr=new XMLHttpRequest();
  }
  return xhr;
}

function SendXmlHttpRequest(reqText, successCB)
{
  if(xmlHttp&&xmlHttp.readyState!=0)
  {
    xmlHttp.abort();
  }
  xmlHttp=GetXMLHTTP();
  if(xmlHttp)
  {
    xmlHttp.open("GET","./CommonLandingPage.ashx?q="+escodeString(reqText),true);

        xmlHttp.onreadystatechange=function() 
        {    
           if(successCB != null)
           {
              if(xmlHttp.readyState==4&&xmlHttp.responseText) 
              {
                 successCB(xmlHttp.responseText);
              }
           }
         }
     xmlHttp.send(null)
   }
}

function NotifCall(CatId, pt)
{
   SendXmlHttpRequest(CatId+"+"+pt, null);
}