// JavaScript Document

var email=/^[a-z]\w*([.])?\w*@\w+\.([a-z]{2,}\.)*[a-z]{2,}$/i
function validate()
{	
	
	if(!email.test(document.frm.mailid.value)){
		 alert("Please enter valid email id");
		 document.frm.mailid.focus();
		return false;
	}	

	if((document.frm.name.value)==""){
		 alert("Please enter name");
		  document.frm.name.focus();
		return false;
	}
	if((document.frm.place.value)==""){
	 alert("Please enter place");
	  document.frm.place.focus();
		return false;
	}
	if((document.frm.mobile.value)==""){
	 alert("Please enter mobile no");
	  document.frm.mobile.focus();
		return false;
	}
	document.frm.action="sendmail.asp";
	return true;
}


function myBlur(arg){

	if(arg=="mailid"){
		if(document.frm.mailid.value==""){
			document.frm.mailid.value="Enter Email Here...";
		}
	}
	if(arg=="name"){
		if(document.frm.name.value==""){
			document.frm.name.value="Enter Name Here...";
		}
	}
	if(arg=="place"){
		if(document.frm.place.value==""){
			document.frm.place.value="Enter Place Here...";
		}
	}
	if(arg=="mobile"){
		if(document.frm.mobile.value==""){
			document.frm.mobile.value="Enter Mobile No Here...";
		}
	}
}
function myFocus(arg){

	if(arg=="mailid"){
		if(document.frm.mailid.value=="Enter Email Here..."){
			document.frm.mailid.value="";
		}
	}
	if(arg=="name"){
		if(document.frm.name.value=="Enter Name Here..."){
			document.frm.name.value="";
		}
	}
	if(arg=="place"){
		if(document.frm.place.value=="Enter Place Here..."){
			document.frm.place.value="";
		}
	}

	if(arg=="mobile"){
		if(document.frm.mobile.value=="Enter Mobile No Here..."){
			document.frm.mobile.value="";
		}
	}
}


	URL = parent.document.URL;
			str = URL.substring(URL.indexOf('?'), URL.length); 
			str1=str.split("=");
			if (str1[1]==1){
				var url = window.location.pathname;
               var filename = url.substring(url.lastIndexOf('/')+1);
                  if(filename != "talk_to_mla.php"){
				alert("Thank you for subscribing. You will get the latest updates of www.nirmalcity.com from now onwards. ")
				  }
			}
                                                                                 