// JavaScript Document
function registerValidationStep1(){  
  if(trim(document.regForm.txtRUserName.value)==""){
	   alert("User name should not be empty");
	   document.regForm.txtRUserName.focus();
	   return false;
  }	
  if(trim(document.regForm.txtRPassword.value)==""){
	   alert("Password should not be empty");
	   document.regForm.txtRPassword.focus();
	   return false;
  }
    if(trim(document.regForm.txtRPassword.value)!="" && document.regForm.txtRPassword.value.length < 5){
	   alert("Password should be atleat 5 charectors");
	   document.regForm.txtRPassword.value = '';
	   document.regForm.txtRPassword.focus();
	   return false;
  }
    if(trim(document.regForm.txtConfirmPassword.value)==""){
	   alert("Confirm Password should not be empty");
	   document.regForm.txtConfirmPassword.focus();
	   return false;
  }
	if(document.regForm.txtRPassword.value != document.regForm.txtConfirmPassword.value ){
	   alert("Password and Confirm Password does not match.. Please try again");
	   document.regForm.txtConfirmPassword.value = '';
	   document.regForm.txtConfirmPassword.focus();
	   return false;
	}
   if(!isEmailAddr(document.regForm.txtEmail.value,"Email")){
	   document.regForm.txtEmail.focus();
	   return false;
  }
  if(!isEmailAddr(document.regForm.txtConfirmEmail.value,"Confirm Email")){
	   document.regForm.txtConfirmEmail.focus();
	   return false;
  }
  	if(document.regForm.txtConfirmEmail.value != document.regForm.txtEmail.value ){
	   alert("Email Address and Confirm Email does not match.. Please try again");
	   document.regForm.txtConfirmEmail.focus();
	   return false;
	}
}

function registerValidationStep2()	{
	 /*if(trim(document.regForm.txtQuestion.value)==""){
	   alert("Secret Question should not be empty");
	   document.regForm.txtQuestion.focus();
	   return false;
	  }	
	   if(trim(document.regForm.txtQuestion.value)=="Other" && trim(document.regForm.txtQuestion1.value)==""){
	   alert("Enter your secret question");
	   document.regForm.txtQuestion1.focus();
	   return false;
	  }	
	   if(trim(document.regForm.txtSecretAnswer.value)==""){
	   alert("Secret Answer should not be empty");
	   document.regForm.txtSecretAnswer.focus();
	   return false;
	  }	*/
	    if(trim(document.regForm.txtFirstName.value)==""){
	   alert("First Name should not be empty");
	   document.regForm.txtFirstName.focus();
	   return false;
	  }	
	   if(trim(document.regForm.txtVerification.value)==""){
	   alert("Verification Code should not be empty");
	   document.regForm.txtVerification.focus();
	   return false;
	  } 
	  if(document.regForm.terms.checked==false){
	   alert("Please accept the terms and conditions");
	   return false;
	  }	
	  ShowModalWindow('singup',500,70,'id={$rsGroup.Ident}');
	  
}
