var ajax=false;

function createajax(){
   if(window.XMLHttpRequest)
   { 
 		 ajax = new XMLHttpRequest();
 	 }
 	 else if(window.ActiveXObject)
 	 	{
 			 try{  
 			    	ajax = new ActiveXObject("Msxml2.XMLHTTP");
 		      }catch(e){
 								     try{
 									         ajax = new ActiveXObject("Microsoft.XMLHTTP");
 									      }catch(e){}
 						        }
 		}
}

function sendget(tourl,proc)
{
  createajax();	
  ajax.open("GET",tourl,true);
  ajax.onreadystatechange=proc;
  ajax.send(null);
}
 		
		
function sendpost(tourl,proc)
{	
  createajax();
  ajax.onreadystatechange=proc; 
  ajax.open("POST",tourl,true);	
  ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); 	
  ajax.send(null);
}
