var xmlHttp


if (!xmlHttp) {
try {
  xmlHttp = new XMLHttpRequest();
}
catch (e) {
  xmlHttp=false
}
}


function xmlHttp_send_post(URLto, xmlMessage) { 
    xmlHttp.open("POST", URLto, false)
    // for ie compatability
    xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
    xmlHttp.send(xmlMessage)
	//alert(xmlHttp.responseText);
	return xmlHttp.responseText;
} 



function chkId(name,email,city,path)
{	
    var mpath=path +'/subcriber-mail.php?';
	var chk = xmlHttp_send_post(mpath,"name="+ name +"&email="+ email +"&city="+ city);
	 if(chk=='ok')
	 {  
	    /* document.getElementById('subscribe_reply').style.display ="block";
	     document.getElementById('subscribtion_tab').style.display ="none";*/
		 return true;
	 }
	 if(chk=='notok')
	 {
		 alert("You are already subscribed!");
		 return false;
     }
}

