function createObject()
{

   if(window.XMLHttpRequest){
   
      var obj	=	new XMLHttpRequest();
	
   }else if(window.ActiveXObject){
   
     var obj	=	new ActiveXObject("Microsoft.XMLHTTP");
   }
   
   return obj;

}
var http	=	createObject();	
var locationhref	=	'';
function update(id,httpLocation)
{
	
	if(id!='')
	{
		locationhref	=	httpLocation;	
			
		redirect =	"ajax.php?id="+id;		
		
					
		http.open('GET',redirect,true);
		http.onreadystatechange=handleUpdateResponse;
		http.send(null);		
	}	
}
function handleUpdateResponse()
{
   if(http.readyState==4)
   {  
   		response	=	http.responseText;  
   		//alert(response+" ==>response");  		   		 		
   		if(response){  		
   			
   			window.open(locationhref,'','');
   		}		
   	 	    
   }
}



