﻿function GetXmlHttpObject()
{
    var xmlHttp=null;
    try
    {
        xmlHttp=new XMLHttpRequest();
    }
    catch(err)
    {
        try
        {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
        }
        catch(err)
        {
            try
            {
                xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
            }
            catch(err)
            {
            }
        }
    }
    return xmlHttp;
}

function SendPostRequest(XMLHTTPObject,url,parameters,callbackfunction)
{
        XMLHTTPObject.open("POST", url, true);
        XMLHTTPObject.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
        XMLHTTPObject.setRequestHeader("Content-length", parameters.length);
        XMLHTTPObject.setRequestHeader("Connection", "close");
        XMLHTTPObject.onreadystatechange = callbackfunction;
        XMLHTTPObject.send(parameters);
}



