
function InitXmlHttp() {
    // Attempt to initialize xmlhttp object
    try
    {
        xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    }
    catch (e)
    {
        // Try to use different activex object
        try
        {
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }
        catch (E)
        {
            xmlhttp = false;
        }
    }
    
    // If not initialized, create XMLHttpRequest object
    if (!xmlhttp && typeof XMLHttpRequest!='undefined')
      {     
            xmlhttp = new XMLHttpRequest();
      }
      // Define function call for when Request obj state has changed
      xmlhttp.onreadystatechange=XMLHttpRequestCompleted;
}
function InvokeASHX(val) {
    
    var value = val;
    InitXmlHttp();
    xmlhttp.onreadystatechange = XMLHttpRequestCompleted;
    xmlhttp.open("GET", "" + "Handler.ashx?id=" + value, true );
    xmlhttp.send(null);
}
function XMLHttpRequestCompleted()
{
        if (xmlhttp.readyState==4)
    {
        try
        {
            eval(xmlhttp.responseText);
        }
        catch (e)
        {
        }
    }
}

