function focusInEmail(email) {
if(email == 'Enter Email...')
   document.postSaveEmail.email.value="";
}
function store_email(){
	str = document.postSaveEmail.email.value;
        if(str == "Enter Email...") str = "";
	if(str.length == 0) {
		document.getElementById("postemailStatus").innerHTML = "<font color=\"red\">Please enter your Email Id</font>";
		return false; 
	} else {
		var emailRegEx = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
		if(!(str.match(emailRegEx))){
			document.getElementById("postemailStatus").innerHTML = "<font color='red'>Please enter your correct Email Id</font>";
		} else {

			xmlHttp=GetXmlHttpObject()
			if (xmlHttp==null){
				alert ("Browser does not support HTTP Request");
				return;
			}
			var url="/store_email.php";
			url=url+"?id="+str;
			//xmlHttp.onreadystatechange=stateChanged() ;
			xmlHttp.open("GET",url,false);
			xmlHttp.send(null);
			if (xmlHttp.status==200){ 
				document.getElementById("postemailStatus").innerHTML=xmlHttp.responseText ;
			}
			return false; 
		}
	}
}
function GetXmlHttpObject()
{
var xmlHttp=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttp=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp;
}
