function CreateAJAXObject()
{
	var 
		xmlHttp;
	try
	{  
		//Firefox, Opera 8.0+, Safari  
		xmlHttp = new XMLHttpRequest();  
	}
	catch (e)
  	{	
		//Internet Explorer  
		try
    	{
			xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");    
		}
		catch (e)
		{
			try
			{
				xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");      
			}
			catch (e)
			{
				alert("Your Browser Does Not Support AJAX!");
				return null;
			}    
		}  
	}
	return xmlHttp;
}
var 
	xmlHttp;
function SendLocation()
{
	xmlHttp = CreateAJAXObject();
	
	if (xmlHttp==null)
  	{
  		alert ("Browser does not support HTTP Request");
  		return;
  	}
	
	var
		mail = prompt("Input E-MAIL address to send current URL","MyFriend@yahoo.com");
		
	if( mail == "" ) return;
	
	var 
		note = "ml=" + mail + "&loc=" + location.href;

		xmlHttp.open("POST", "http://www.g3b.ge/others/urlsnd.php", true);
		xmlHttp.onreadystatechange = stateChanged;
		xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
		xmlHttp.send(encodeURI(note));		
} 

function stateChanged() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 	{ 
 		alert(xmlHttp.responseText);
 	} 
}