﻿function httpXmlObj(RequestMethod, ServiceUrl, callBack){
   var xmlhttp=false;
   this.RequestMethod=RequestMethod;
   this.ServiceUrl=ServiceUrl;
   this.Callback=callBack;
   this.Create=function getHTTPRequestObject(){                    
                        try{
                            xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
                        }
                        catch(e)
                        {
                            try{
                            xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
                            }
                            catch(E)
                            {
                                xmlhttp=false;
                            }
                            if(!xmlhttp && typeof XMLHttpRequest!='undefined')
                            {
                                xmlhttp=new XMLHttpRequest();
                            }
                        }      
    }
    this.Execute=function Execute()
                {
                     try{
                        xmlhttp.open(this.RequestMethod, this.ServiceUrl, true);
                        this.redystatechange=xmlhttp.onreadystatechange;
                        xmlhttp.send(null);
                       }catch(e){
                            alert(e);
                       }
                }  
}


