function validatethisreg(registerme)
{
	var msg = "";
		var name = registerme.name.value;
		var email = registerme.email.value;
		var password = registerme.password.value;
		var rpassword = registerme.rpassword.value;
		var verificationCode = registerme.verificationCode.value;
		var valide= /^([a-zA-Z0-9_.-])+@([a-zA-Z0-9_.-])+\.([a-zA-Z])+([a-zA-Z])+/;
		
		

		if( name=='' ) msg = msg+"- Please enter your name. \n ";
		if( email=='' ) msg = msg+"- Please enter your email. \n ";
		if( email!='' )
		{
			if(!email.match(valide))
			{
				msg = msg+"- Please enter valid email address. \n ";
			}
		}
		if( password=='' ) msg = msg+"- Please enter your password. \n ";
		if( password!='' )
		{
			if(password.length<'6')
			{
				msg = msg+"- Password length should be minimum 6 characters. \n ";
	        }
			if( rpassword =='' )
			{
			   msg = msg+"- Please enter your confirm  password. \n ";
			}
			 if(password != rpassword)
			 {
			   msg = msg+"- Both passwords should be same. \n ";
			 }
		}
		
		if( verificationCode=='' )
		{ 
			//registerme.verificationCode.value='Enter the code in the image';
		     msg = msg+"- Please enter Visual Comfirmation. \n ";
	     }

		 if (!registerme.terms.checked)
		 {
			  msg = msg+"- Please check Terms and conditions. ";
		 }
		

		if( msg!="" )
		{
			alert("The following error(s) occurred: \n" + msg);
			return false;

		}	// if( msg!="" )
		else
		{
			registerme.submit();
			return true;
			}	// if( msg!="" ) -- else
		
		
		
}



function validateForPass(){
	var msg = "";
	var txtemail = document.frmforgotpwd.txtemail.value;
	var valide= /^([a-zA-Z0-9_.-])+@([a-zA-Z0-9_.-])+\.([a-zA-Z])+([a-zA-Z])+/;
	if( txtemail=='' ) msg = msg+"- Please enter email address. \n ";
	if( txtemail!='' )
	{
		if(!txtemail.match(valide))
		{
			msg = msg+"- Please enter valid email address. \n ";
			
		}
	}
	if( msg!="" )
	{
			alert("The following error(s) occurred: \n" + msg);
			return false;

	}	// if( msg!="" )
	else
	{
			//frm.submit();		
			return true;

	}	// if( msg!="" ) -- else
}

function showopts(){
//alert('show');
document.getElementById('subsopts').style.display='block';
}
function hideopts(){
//alert('hide');
document.getElementById('subsopts').style.display='none';
}