
function createXMLHttpRequest()		
{
    if(window.ActiveXObject){
    return new ActiveXObject("Microsoft.XMLHTTP");
    }else if(window.ActiveXObject){
    return new ActiveXObject("Msxml2.XMLHTTP.4.0");
    }else if(window.ActiveXObject){
    return new ActiveXObject("Msxml2.XMLHTTP");
    }else if(window.XMLHttpRequest){
    return new XMLHttpRequest();
    }
}

function ajax(url,callBackFunction)
{
    var xmlhttp;
    xmlhttp=createXMLHttpRequest();
    var body="";
    xmlhttp.open("POST",url,true);        
             
    xmlhttp.onreadystatechange=function()		
    {
        if (xmlhttp.readyState==4)
        {
	        if (xmlhttp.status == 200)
	        {
		        var result = xmlhttp.responseText;
		        if (callBackFunction!=null)
		            if (callBackFunction!="")
		            eval(callBackFunction+"(result);");
	        }
        }
    }
    xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
    xmlhttp.send(body);
}

function ajax2(xmlhttp,url,callBackFunction)
{
    var body="";
    xmlhttp.open("POST",url,true);
    xmlhttp.onreadystatechange=callBackFunction;
    xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
    xmlhttp.send(body);
}
