/* Rabi3ooooooooooooooooooooooof */
/*
	to use this : you just have to call the function called callAJAX(..................);
*/
function XMLHTTPREQ()
{
	try
	{
		// Creat XMLHttpRequest for Firefox
		req = new XMLHttpRequest();
	} catch(e){
		// This is for some versions of IE 
		try{
		req = new ActiveXObject("Msxml2.XMLHTTP");
		} catch(e){
		// This is for another versions of IE.
			try
			{
				req = new ActiveXObject("Microsoft.XMLHTTP");
			} catch(e){
				req = false;
			}
		}
	} 
	return req;
}
function GetInfo(url, pageElement , loading_img)
{
	document.getElementById(pageElement).innerHTML = '<div style="padding-left:40px;padding-right:40px;width:40px;margin:auto;padding-top:20px;"><img src="'+loading_img+'" border="0" style="margin:auto;"></div>';
	req = XMLHTTPREQ();
	url += "&"+parseInt(Math.random()*999999999999);
	req.onreadystatechange = function() {GetResponse(pageElement);};
	req.open("GET",url,true);
	req.send(null);
}
///////////////////////////////////////////////////////////////////////////////////
/* A J A X     R E S P O S E */
///////////////////////////////////////////////////////////////////////////////////
function GetResponse(pageElement)
{
	var output = '';
	if(req.readyState == 4)
	{
		if(req.status == 200)
		{
			output = req.responseText;
			document.getElementById(pageElement).innerHTML = output;
		}
	}
}

