
//function for Email validation
	function email(inputname,reqname)
	{
	var	ok = true;
					    
	//if the user does not enter the value and the field is compulsory
	if (inputname.value=="")
	 {
         alert("Invalid \""+reqname+"\" !");
    	 inputname.focus();
		 return false;
	 }
						
	var tempfirst = inputname.value.substring(0,1); 
	if (tempfirst == " ") 
  	{
    	ok = false;
    	alert ("Do not leave spaces before \""+reqname+"\"");
    	inputname.focus();
    	return false;
	} 
	if ((tempfirst>="0" && tempfirst <= "9") || (tempfirst == "@") || (tempfirst == ".") || (tempfirst == "_"))
    {
  		alert("Invalid \""+reqname+"\"! E-mail must not start with a \"Number\", \"_\", \"@\" and \".\"");
		inputname.focus();
		inputname.select();
		return false;
	} 
  						  
	if (inputname.value.indexOf(" ")> -1)
  	{
    	alert("Please do not leave spaces while entering\""+reqname+"\"");
		inputname.focus();
		inputname.select();
		return false;
	} 
						  
	var atsign = inputname.value.indexOf("@");
	var dotsign = inputname.value.indexOf(".");
	if ((atsign==-1) || (dotsign==-1))
	{
       	alert("Invalid \""+reqname+"\"! E-mail must have only one \"@\" and atleast one \".\"");
		inputname.focus();
		inputname.select();
		return false;
	} 
							
	if (atsign > 25)
	{
		alert("\""+reqname+"\" should not exceed 25 characters before \"@\"");
		inputname.focus();
		inputname.select();
