// REGISTRATION FORM VAILDATION
function validateMe(){

		var fr=document.regn;

		var a,b,c,d,e,f,g,h,i,j,k,l,m;
		var em="";
		
		a=fr.fname.value;
		b=fr.userid.value;
		
		c=fr.pwd.value;
		d=fr.pwd1.value;
		e=fr.nation.value;
		f=fr.prof.value;
		g=fr.pwd.value;
		h=fr.addr.value;
		i=fr.city.value;
		j=fr.email.value;
		
		l=fr.phres.value;
		//m=fr.topic.value;
		
if ((a != "" )&&(b != "" ) &&( c != "") )
{		
		
		
		if ((c==""))

		{   
		em=em+"* Your Password  must contain a minimum of 5 Characters\n";

		}
		if ((d!= c ))

		{   
		em=em+"* Your Password must match with  previously entered password\n";

		}
		
		if ((e==""))

		{   
		em=em+"* Your Nationality name  must contain a minimum of 3 Characters\n";

		}
		
		if ((f==""))

		{   
		em=em+"* Your Profession  must contain a minimum of 5 Characters\n";

		}
		
		if ((h==""))

		{   
		em=em+"* Your Address must contain a minimum of 10 Characters\n";

		}
		if ((i==""))

		{   
		em=em+"* Your City must contain a minimum of 5 Characters\n";

		}
		
		if ((j==""))

		{   
		em=em+"* Your Email Address must contain a minimum of 5 Characters\n";

		}
		else
		if( j.indexOf("@")==-1 ) 
		{
		em=em+"* Your Email address must be in proper format e.g. xyz@deemandala.com \n";
		}
		
		
		if ((l==""))

		{   
		em=em+"* Your Residence Number must contain a minimum of 8 Characters\n";

		}
		/*if ((m==""))

		{   
		em=em+"* Select alteast one Intested topic\n";

		}*/
		if (em != ""){ 
		alert("Errors have occures during the process of your form. \n\n Please Make the following corrections : \n\n" + em);

		return false;}

		else

		return true;

	}
	

}
// REGISTRATION FORM VAILDATION

// TELL A FRIEND VALIDATION
function validateFriend(){

		var fr=document.mailfriend;

		var a,b,c,d,e,f,g,h,i,j,k,l,m;
		var em="";
		
		a=fr.yname.value;
		b=fr.ymail.value;
		
		c=fr.fname.value;
		d=fr.fmail.value;
		
		
		
		if ((a==""))

		{   
		em=em+"* Your Name  must contain a minimum of 3 Characters\n";

		}
		if ((b==""))

		{   
		em=em+"* Your Email Address must contain a minimum of 5 Characters\n";

		}
		else
		if(b.indexOf("@")==-1 ) 
		{
		em=em+"* Your Email address must be in proper format e.g. xyz@deemandala.com \n";
		}
		else
		if(b.indexOf(".")==-1 ) 
		{
		em=em+"* Your Email address must be in proper format e.g. xyz@deemandala.com \n";
		}

		
		if ((c==""))

		{   
		em=em+"* Your Friend's Name  must contain a minimum of 3 Characters\n";

		}
		if ((d==""))

		{   
		em=em+"* Your Email Address must contain a minimum of 5 Characters\n";

		}
		else
		if(d.indexOf("@")==-1 ) 
		{
		em=em+"* Your Email address must be in proper format e.g. xyz@vhost4india.com \n";
		}

		else
		if(d.indexOf(".")==-1 ) 
		{
		em=em+"* Your Email address must be in proper format e.g. xyz@vhost4india.com \n";
		}
		
		
		
		
		
		if ((l==""))

		{   
		em=em+"* Your Residence Number must contain a minimum of 8 Characters\n";

		}
		/*if ((m==""))

		{   
		em=em+"* Select alteast one Intested topic\n";

		}*/
		if (em != ""){ 
		alert("Errors have occures during the process of your form. \n\n Please Make the following corrections : \n\n" + em);

		return false;}

		else

		return true;

	
	

}
// TELL A FRIEND VALIDATIO
/*function form_validator(theForm)
{
	if(theForm.name.value == "")
	 {
		 alert("Please enter Name!");
		 theForm.name.focus();
		 return(false);
	}
	if(theForm.dob.value == "")
	 {
		 alert("Please enter Date of Birth !");
		 theForm.dob.focus();
		 return(false);
	}
	if(theForm.addr.value == "")
	 {
		 alert("Please enter Address !");
		 theForm.addr.focus();
		 return(false);
	}
	if(theForm.area.value == "")
	 {
		 alert("Please enter Area !");
		 theForm.area.focus();
		 return(false);
	}
	if(theForm.city.value == "")
	 {
		 alert("Please enter City !");
		 theForm.city.focus();
		 return(false);
	}
	
	if(theForm.state.value == "")
	 {
		 alert("Please enter State !");
		 theForm.state.focus();
		 return(false);
	}
	if(theForm.zipcode.value == "")
	 {
		 alert("Please enter Zipcode !");
		 theForm.zipcode.focus();
		 return(false);
	}
	if(theForm.nominee.value == "")
	 {
		 alert("Please enter Nominee Name !");
		 theForm.nominee.focus();
		 return(false);
	}
	
	if(theForm.ph1.value == "")
	 {
		 alert("Please enter Phone Number !");
		 theForm.ph1.focus();
		 return(false);
	}
		if(theForm.emailid.value.indexOf("@")==-1 ) 
	{
		 alert("<?php echo"Please enter Correct email ID e.g. xyz@excellasoftware.com"?>");
		 theForm.emailid.focus();
		 return(false);
	}

if(theForm.emailid.value.indexOf(".")==-1 )
{

		 alert("<?php echo"Please enter Correct email ID e.g. xyz@excellasoftware.com"?>");

		 theForm.emailid.focus();

		 return(false);
	}
	
	if(theForm.country.value == "")
	 {
		 alert("Please enter Country  !");
		 theForm.country.focus();
		 return(false);
	}
	
	
	if(theForm.schemeno.value == "")
	 {
		 alert("Please enter Scheme Number !");
		 theForm.schemeno.focus();
		 return(false);
	}
	if(theForm.frmno.value == "")
	 {
		 alert("Please enter Farm Number !");
		 theForm.frmno.focus();
		 return(false);
	}

	return (true);
}*/

