function ajax(webpage,location)
{
    var xhr; 
    try 
	{  
	xhr = new ActiveXObject('Msxml2.XMLHTTP'); 
	xhr.onreadystatechange  = function()
    { 
         if(xhr.readyState  == 4)
         {
              if(xhr.status  == 200) 
                  res = xhr.responseText;  
    			  document.getElementById(location).innerHTML = res;
          }
    }; 
	xhr.open("POST", webpage,  true);
        xhr.send(null);   
	}
    catch (e) 
    {
        try 
		{  
		 xhr = new ActiveXObject('Microsoft.XMLHTTP');  
		 xhr.onreadystatechange  = function()
    { 
         if(xhr.readyState  == 4)
         {
              if(xhr.status  == 200) 
                  res = xhr.responseText;  
    			  document.getElementById(location).innerHTML = res;
          }
    }; 
	xhr.open("POST", webpage,  true); 
        xhr.send(null);   
		}
        catch (e2) 
        {
          try 
		  {  
		  xhr = new XMLHttpRequest(); 
xhr.onreadystatechange  = function()
    { 
         if(xhr.readyState  == 4)
         {
              if(xhr.status  == 200) 
                  res = xhr.responseText;  
    			  document.getElementById(location).innerHTML = res;
          }
    }; 

	xhr.open("GET", webpage,  true);
        xhr.send(null);     
		  }
          catch (e3) 
		  {  
		  xhr = false;   
		  }
        }
     }

}
