//Gets the browser specific XmlHttpRequest Object
var id;
function getXmlHttpRequestObject() 
{
	try
	{
		if (window.XMLHttpRequest)
		{		
			return new XMLHttpRequest(); //Not IE	
		} 
		else if(window.ActiveXObject) 
		{		
			return new ActiveXObject("Microsoft.XMLHTTP");  //IE
		}
		else alert("Ваш браузер не может быть использован для проведения платежа в автоматическом режиме.");
			
	}
	catch(e)
	{
		alert("Ваш браузер не может быть использован для проведения платежа в автоматическом режиме.");	
	}
}
function requestContent(method, params) 
{	
	//If our XmlHttpRequest object is not in the middle of a request, start the new asyncronous call.	
	if (receiveReq.readyState == 4 || receiveReq.readyState == 0) 
	{		
		//Setup the connection as a GET call to content.php		
		//True explicity sets the request to asyncronous (default).
		receiveReq.open(method, params, true);
		//Set the function that will be called when the XmlHttpRequest objects state changes.		
		receiveReq.onreadystatechange = handleRequest; 		
		//Make the actual request.		
		receiveReq.send(null);	
	}			
}
//Called every time our XmlHttpRequest objects state changes.
function handleRequest() 
{	
	//Check to see if the XmlHttpRequests state is finished.	
	if (receiveReq.readyState == 4 && receiveReq.responseText.length) 
	{
		document.getElementById(id).innerHTML = receiveReq.responseText;
	}
}