// form validation zabsmarty
function reg_valid()
{



			if (document.addfrm.looking_for.value  =='' )
			{alert("Oops! you forgot to select what you are?.");
			document.addfrm.looking_for.focus();
			return false;}
			
			if (document.addfrm.country.value  =='' )
			{alert("Oops! you forgot to select country.");
			document.addfrm.country.focus();
			return false;}
			
				if (document.addfrm.state.value  =='' )	{
			alert("Oops! you forgot to mention state.");
			document.addfrm.state.focus();
			return false; 	}
		
			
				if (document.addfrm.dob.value  =='' )
			{alert("Oops! you forgot mention Date of Birth.");
			document.addfrm.dob.focus();
			return false;}
			
			if (document.addfrm.username.value  =='' )	{
			alert("Oops! you forgot to enter username.");
			document.addfrm.username.focus();
			return false; 	}
			
		/*	if (document.addfrm.email.value  =='' )	{
			alert("Oops! you forgot to enter a valid email address.");
			document.addfrm.email.focus();
			return false; 	}
			
			if (document.addfrm.ehost.value  =='' )	{
			alert("Oops! you forgot to select email domain.");
			document.addfrm.ehost.focus();
			return false; 	}
			*/
			
			
			
			if (document.addfrm.email.value.indexOf("@") && document.addfrm.email.value.indexOf(".") < 2) {
			alert("Oops! you forgot to enter a valid email address.");
			document.addfrm.email.focus();
			return false;
			}	
			
			if (document.addfrm.reemail.value !=document.addfrm.email.value  )
			{alert("Oops! email doesn't match. Re-type email.");
			document.addfrm.reemail.focus();
			return false;} 
			
			if (document.addfrm.password.value  =='' )
			{alert("Oops! you forgot to enter password.");
			document.addfrm.password.focus();
			return false;} 
			
			if (document.addfrm.password.value.length  <= 6 )
			{ alert("Please! use more than 6 character for password.");
			document.addfrm.password.focus();
			return false;} 
			
			if (document.addfrm.repassword.value !=document.addfrm.password.value  )
			{alert("Oops! password doesn't match. Re-type Password.");
			document.addfrm.repassword.focus();
			return false;} 
			
			
		
		/*
			if (document.addfrm.gender.value  =='' )
			{alert("Oops! you forgot to select gender.");
			document.addfrm.gender.focus();
			return false;}
			
		
			
			if(document.addfrm.phone.value=='' || document.addfrm.phone.value.length < 3 || isNaN(document.addfrm.phone.value)){
alert("Oops! you forgot to enter phone number");
document.addfrm.phone.focus();
return false; }
			
			
		
	if(document.addfrm.zipcode.value=='' || document.addfrm.zipcode.value.length < 4 || isNaN(document.addfrm.zipcode.value)){
alert("Oops! you forgot to enter Zip Code");
document.addfrm.zipcode.focus();
return false; }

			if (document.addfrm.state.value  =='' )
			{alert("Oops! you forgot to enter State.");
			document.addfrm.state.focus();
			return false;}
			
			
		
			*/		
			
			

	} // end reg function

//form validation for login
//form validation
function login_valid()
{

			if (document.frmlogin.email.value.indexOf("@") && document.frmlogin.email.value.indexOf(".") < 2) {
			alert("Please provide a valid email address.");
			document.frmlogin.email.focus();
			return false;
			}	

	if(document.frmlogin.password.value=='' || document.frmlogin.dayphone.value.length < 3 ){
			alert("Please provide the password.");
			document.frmlogin.password.focus();
			return false; }


	} // end reg function
	
	
	function reg_adminuser()
{

	
			if (document.addfrm.adminname.value  =='' )	{
			alert("Oops! you forgot to enter username.");
			document.addfrm.adminname.focus();
			return false; 	}
		
			
			if (document.addfrm.password.value  =='' )
			{alert("Oops! you forgot to enter user password.");
			document.addfrm.password.focus();
			return false;} 
			
		
				if (document.addfrm.email.value.indexOf("@") && document.addfrm.email.value.indexOf(".") < 2) {
			alert("Oops! you forgot to enter a valid email address.");
			document.addfrm.email.focus();
			return false;
			}	
				
			if (document.addfrm.attribute.value  =='' )
			{alert("Oops! you forgot to select user attribute.");
			document.addfrm.attribute.focus();
			return false;}
		

	} // end reg function

// group validate


function grp_valid()
{

	
			if (document.gfrm.category.value  =='' )	{
			alert("Oops! you forgot to select category.");
			document.gfrm.category.focus();
			return false; 	}
		
			
			if (document.gfrm.title.value  =='' )
			{alert("Oops! you forgot to enter group title.");
			document.gfrm.title.focus();
			return false;} 
			
			if (document.gfrm.sdes.value  =='' )
			{alert("Oops! you forgot to write description.");
			document.gfrm.sdes.focus();
			return false;} 
			
		
			if (document.gfrm.email.value.indexOf("@") && document.gfrm.email.value.indexOf(".") < 2) {
			alert("Oops! you forgot to enter a valid email address.");
			document.gfrm.email.focus();
			return false;
			}	
				
				if (document.gfrm.country.value  =='' )
			{alert("Oops! you forgot to select country.");
			document.gfrm.country.focus();
			return false;} 
		

	} 
// end group validate

//start blog validate




function blog_valid()
{

	
			if (document.gfrm.category.value  =='' )	{
			alert("Oops! you forgot to select category.");
			document.gfrm.category.focus();
			return false; 	}
		
			
			if (document.gfrm.title.value  =='' )
			{alert("Oops! you forgot to enter blog title.");
			document.gfrm.title.focus();
			return false;} 
			
			if (document.gfrm.sdes.value  =='' )
			{alert("Oops! you forgot to write short description.");
			document.gfrm.sdes.focus();
			return false;} 
			
		
					

	} 




