
function initXMLHTTP()
{
    var xmlhttp = false;
  
    if ( !xmlhttp && typeof XMLHttpRequest!='undefined') 
    {
	    try 
	    {
			xmlhttp = new XMLHttpRequest();
	    } 
	    catch (e) 
	    {
			xmlhttp = false;
	    }
    }
    if ( !xmlhttp && window.createRequest) 
    {
	    try 
	    {
		    xmlhttp = window.createRequest();
	    } 
	    catch (e) 
	    {
		    xmlhttp = false;
	    }
    }
    if ( !xmlhttp)
    {
         try 
         {
          xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
         } 
         catch (e) 
         {
			 try 
			 {
				xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
			 } 
			 catch (E) 
			 {
				xmlhttp = false;
			 }
         }
    }
    
    return xmlhttp;
}

function postXmlHTTP(url,soapAction,method,category,language)
{
    var xmlhttp = initXMLHTTP();
  
    xmlhttp.open("POST", url,true);

    xmlhttp.onreadystatechange = function() 
	{
		if (xmlhttp.readyState == 4) 
		{
			update(xmlhttp.responseXml);
		}
	}
	xmlhttp.setRequestHeader("Man", "POST " + url + " HTTP/1.1");
	xmlhttp.setRequestHeader("Host", "");
	xmlhttp.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
	xmlhttp.setRequestHeader("SOAPAction", soapAction);
    
    strSOAPEnvelope = "<?xml version=\"1.0\" encoding=\"utf-8\"?>"+
		"<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">"+
		"  <soap:Body>"+
		"    <" + method + " xmlns=\"http://tempuri.org/\">"+
		"		<category>" + category + "</category>"+
		"		<language>" + language + "</language>"+
		"	 </" + method + ">"+
		"  </soap:Body>"+
		"</soap:Envelope>";

    xmlhttp.send(strSOAPEnvelope);
}


