function createRequestObject()
{
	var req;
	if(window.XMLHttpRequest)
	{
	  req = new XMLHttpRequest();
	} 
	else if(window.ActiveXObject) 
	{
	  req = new ActiveXObject("Microsoft.XMLHTTP");
	} 
	else 
	{
	  alert('Error .. You use old browser !');
	}
	return req;
}

var http=createRequestObject();

function sendRequestObjectContact(elesm,gawal,country,email,description)
{
	http.open('post','staticHandling.php');
	http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	http.onreadystatechange = handleResponse;
	http.send('elesm='+elesm+'&gawal='+gawal+'&country='+country+'&email='+email+'&description='+description+'&type=contact');
}
function sendRequestObjectTell(elesm,yourEmail,friendEmail,description)
{
	http.open('post','staticHandling.php');
	http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	http.onreadystatechange = handleResponse;
	http.send('&elesm='+elesm+'&yourEmail='+yourEmail+'&friendEmail='+friendEmail+'&description='+description+'&type=Tell');
}

function sendRequestObjectPass(email)
{
	http.open('post','staticHandling.php');
	http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	http.onreadystatechange = handleResponse;
	http.send('email='+email+'&type=forgetPass');
}
function handleResponse() 
{
	var ajax = document.getElementById("ajax");
	ajax.innerHTML = '<img src=images/loaderA64.gif width=64 height=64 />';
	if(http.readyState == 4 && http.status == 200)
	{
		var response = http.responseText;
			if(response) 
			{
			 ajax.innerHTML = response;
			}
	}
}
