


function verify(){

	if (document.getElementById('frmNewUser')){
	
		var oFrm = document.getElementById('frmNewUser');  
	
		//--Gender
		if (IsEmptyList(oFrm.Gndr)){alert('Additional information is required.\n\rPlease select your Gender.'); oFrm.Gndr[0].focus(); return false;}
		
		//-- Logon
		if(isEmpty(oFrm.Logon)){alert('Additional information is required.\n\rPlease Select your User Name. It may be 4-20 chracters no special symbols or spaces.');oFrm.Logon.focus();return false;}
		if(oFrm.Logon.value.length > 20){alert('Your User Name requires 4 - 20 characters with no special symbols or spaces.\n\r You have entered ' + oFrm.Logon.value.length + ' characters.');oFrm.Logon.focus();return false;}
		if(oFrm.Logon.value.length < 4){alert('Your User Name requires 4 - 20 characters with no special symbols or spaces.');oFrm.Logon.focus();return false;}
		if(!isValidString(oFrm.Logon.value)){alert('Invalid User Name.\n\rUser Name can not have special symbols.');oFrm.Logon.focus();return false;}
		if (oFrm.Logon.value.indexOf(' ')>-1){alert('Invalid User Name.\n\rUser Name can not have special symbols or spaces.');oFrm.Logon.focus();return false;}
		if (oFrm.Logon.value.lastIndexOf("'") != -1){alert('Invalid User Name.\n\rUser Name can not have special symbols.');oFrm.Logon.focus();return false;}
		
		//-- Password
		if(isEmpty(oFrm.Password)){alert('Information is required, please try again.\n\rPlease choose your Password, 4-20 chracters no special symbols or spaces.');oFrm.Password.focus();return false;}
		if(oFrm.Password.value.length > 20){alert('Password should be between 4 and 20 characters no special symbols or spaces.\n\r You have entered ' + oFrm.Password.value.length + ' characters.');oFrm.Password.focus();return false;}
		if(oFrm.Password.value.length < 4){alert('Password should be between 4 and 20 characters no special symbols or spaces.');oFrm.Password.focus();return false;}
		if(!isValidString(oFrm.Password.value)){alert('You have entered an Invalid Password.\n\rPasswords cannot include symbols.'); oFrm.Password.focus();return false;}
		if (oFrm.Password.value.lastIndexOf("'") != -1){alert('You have entered an Invalid Password.\n\rPasswords cannot include symbols.'); oFrm.Password.focus();return false;}
		
		
		
		
		//-- Email
		if(isEmpty(oFrm.Email)){alert('Information is Required.\n\rPlease enter your email address.');oFrm.Email.focus();return false;}
		if(!isValidEmail(oFrm.Email.value)){alert('Invalid email address.\n\rPlease re-enter your email address.');oFrm.Email.focus();return false;}
		
		
		
		//-- Zip code
		if((isEmpty(oFrm.Zip)) && (oFrm.CountryID.options[oFrm.CountryID.selectedIndex].value == 0)){alert('If you reside in the US or Canada, Please enter your zip code.');oFrm.Zip.focus();return false;}
		
		
		
		//Source
		if (oFrm.SourceID.type != 'hidden'){
			if (oFrm.SourceID.options[oFrm.SourceID.selectedIndex].value == 0){alert('Please select where you heard about Perfectmatch.'); oFrm.SourceID.focus();return false;}
		}
		
		
		//Agreement
		if(!oFrm.TC.checked){alert('You must agree with Terms of Use before proceeding. Please check the box.');oFrm.TC.focus();return false;}
			
		oFrm.VEmail.value = oFrm.Email.value;
		oFrm.VPassword.value = oFrm.Password.value; 
		
		
		return true;
		
		
	}
	else {return false;}
}

function dis(){
if (document.getElementById('frmNewUser')){
	var oFrm = document.getElementById('frmNewUser');
		if (oFrm.Zip.value.length > 0){
			 oFrm.CountryID.selectedIndex = 0;
			 oFrm.CountryID.disabled = true;
		 }
		else {oFrm.CountryID.disabled = false;}
	}
}

function getradio(obj){
	if(obj){
	var arrRd = obj;
	var v = "unspecified";
	for(i=0;i<arrRd.length;i++){
		if (arrRd[i].checked){v=arrRd[i].value; break;}
	}}
	return v;
}
