


function createRequestObject() {  
	// find the correct xmlHTTP, works with IE, FF and Opera
	var xmlhttp;
	try {
  	   xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
    catch(e) {
       try {
    	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
       }
       catch(e) {
    	  xmlhttp=null;
       }
    }
	
    if(!xmlhttp&&typeof XMLHttpRequest!="undefined") {
  	    xmlhttp=new XMLHttpRequest();
    }
	
	return  xmlhttp;
}

function sendRequest(http,url,params,func)
{ 
   if(http.readyState != 0)
   {
      http.abort();
   }

   try{
        http.open('POST',  url);
        http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
        http.onreadystatechange =  func;
		http.send(params);	

   }
   catch(e){
	  alert("problem:" + e.message);
   }
}
