<!--
function winopen(URL,winName,features) { //v2.0
  window.open(URL,winName,features);
}   

function ValidateExpress(f) {

	if (!CheckRequired(f.txtEmail, "Email Address"))
		return false;

	if (f.txtHHkey.value.length !=13){
		alert("Household key code entered is not 13 digits, please try again.");
		f.txtHHkey.focus();
		return false;
	}

	if (f.lstMonth.options[f.lstMonth.selectedIndex].value == "Choose"){
		alert("Month of birth is required.  Please select your Month of Birth.");
		f.lstMonth.focus();
		return false;
	}

	if (f.lstBirthYear.options[f.lstBirthYear.selectedIndex].value == "Choose"){
		alert("Year of birth is required.  Please select your Year of Birth.");
		f.lstBirthYear.focus();
		return false;
	}

	return true;
}

function ValidateEntries(f) {

	if (!CheckRequired(f.txtFirstName, "First Name"))
		return false;

	if (!CheckRequired(f.txtLastName, "Last Name"))
		return false;

	if (!CheckRequired(f.txtEmail, "Email Address"))
		return false;

	if (!CheckEmail(f.txtEmail))
		return false;

	if (!CheckRequired(f.txtZip, "Zip Code"))
		return false;

	if (f.lstBirthYear) {
		if (f.lstBirthYear.options[f.lstBirthYear.selectedIndex].value == "Choose"){
			alert("Year of birth is required.  Please select your Year of Birth.");
			f.lstBirthYear.focus();
			return false;
		}
	}	
	
	if (f.txtEntry) {
		if (f.txtEntry.value.length < 200){
			alert("Contest entry entered is not long enough, please try again.");
			f.txtEntry.focus();
			return false;
		}	
	
		if (f.txtEntry.value.length > 2000){
			alert("Contest entry entered is too long, please try again.");
			f.txtEntry.focus();
			return false;
		}	
	}
		
	return true;
} 

function ValidateAdultInterim(f) {

	var actionvalid = true;

	if (!CheckRequired(f.txtEmail, "Email Address"))
		return false;

	if (!CheckEmail(f.txtEmail))
		return false;

	if (f.txtEmail2 != null) {	
	
		if (!CheckRequired(f.txtEmail2, "Confirmation Email Address"))
			return false;

		if (!CheckEmail(f.txtEmail2))
			return false;
		
		if (f.txtEmail.value != f.txtEmail2.value) {
			alert("Your confirmation e-mail address does not match with the original.");
			return false;
		}
	}
	
	if (document.frmMain.optAction[0].checked == false){
		if (document.frmMain.optAction[1].checked == false){
			if (document.frmMain.optAction[2].checked == false){
				actionvalid = false;
			}
		}
	} 

	if (actionvalid == false){
		alert("Please select an option and click submit again.");
		return false;
	}

	return true;
}

function ValidateTeenInterim(f) {

	var actionvalid = true;

	if (!CheckRequired(f.txtEmail, "Email Address"))
		return false;

	if (!CheckEmail(f.txtEmail))
		return false;

	if (f.txtEmail2 != null) {	
	
		if (!CheckRequired(f.txtEmail2, "Confirmation Email Address"))
			return false;

		if (!CheckEmail(f.txtEmail2))
			return false;
		
		if (f.txtEmail.value != f.txtEmail2.value) {
			alert("Your confirmation e-mail address does not match with the original.");
			return false;
		}
	}
	
	if (document.frmMain.optAction[0].checked == false){
		if (document.frmMain.optAction[1].checked == false){
			actionvalid = false;
		}
	} 

	if (actionvalid == false){
		alert("Please select an option and click submit again.");
		return false;
	}

	return true;
}

function ValidateAdultEmail(f) {

	if (!CheckRequired(f.txtEmail, "Email Address"))
        return false;
    if (!CheckEmail(f.txtEmail))
        return false;
    if (!CheckRequired(f.txtEmailReenter, "Confirmation Email Address"))
        return false;
    if (!CheckEmail(f.txtEmailReenter))
        return false;
    if (f.txtEmail.value != f.txtEmailReenter.value) {
        alert("Your confirmation e-mail address does not match with the original.");
        return false;
    }
    if (!CheckRequired(f.txtFirstName, "First Name"))
        return false;
    if (!ValidateString(f.txtFirstName.value,rexFilter) ){
        alert("Please check the First Name (only letters, numbers and spaces are allowed).");
        return false;
    }
        
    if (!ValidateString(f.txtLastName.value,rexFilter) ){
        alert("Please check the Last Name (only letters, numbers and spaces are allowed).");
        return false;
    }
            
    if (!ValidateString(f.txtAddress.value,rexFilter) ){
        alert("Please check the Address (only letters, numbers and spaces are allowed).");
        return false;
    }
    
    if (!ValidateString(f.txtCity.value,rexFilter) ){
        alert("Please check the City (only letters, numbers and spaces are allowed).");
        return false;
    }
    
    if (!CheckRequired(f.txtZip,"Zip code"))
        return false;
    if ( !ValidateString(f.txtZip.value, rexZip + "|" + rexCAPostalCode) ) {
        alert("Please check the format of the zip code");
        return false;
    }
    if (!ValidatePhoneNumber(f.txtAreaCode.value,f.txtPrefix.value,f.txtExtension.value) ) {
        alert("Please check the Phone Number (only numbers are allowed ).");
        f.txtAreaCode.focus();
        return false;
    }
    if (f.optAge[0].checked == false  &&  f.optAge[1].checked == false){
        alert("Are you age 13 or older? Please select Yes or No.");
        return false;
    }
    if (f.chkTeen.checked == false  &&  f.chkAdult.checked == false){
        alert("Which email would you like to receive? Please select 'Adult Email' or 'Teen Email'.");
        return false;
    }
	
    cm_register(f.txtEmail.value,f.txtZip.value,"Email");
    return true;
}

function ValidateEmailUnsub(f) {
	if (!CheckRequired(f.txtEmail, "Email Address"))
        return false;
    if (!CheckEmail(f.txtEmail))
        return false;
	return true;	
}

function ValidateBusinessContact(f) {

	if (!CheckRequired(f.txtName, "Your First Name")) 
	    return false;
	if (!ValidateString(f.txtName.value,rexFilter)) {
        alert("Please check the Name (only letters, numbers and spaces are allowed).");
        return false;
    }		
		
	if (!CheckRequired(f.txtPosition, "Your Position"))
		return false;
	if (!ValidateString(f.txtPosition.value,rexFilter)) {
        alert("Please check the Position (only letters, numbers and spaces are allowed).");
        return false;
    }		
		
	if (!CheckRequired(f.txtCompany, "Your Company Name"))
		return false;
	if (!ValidateString(f.txtCompany.value,rexFilter)) {
        alert("Please check the Company (only letters, numbers and spaces are allowed).");
        return false;
    }

	if (!CheckRequired(f.txtEmail, "Email Address"))
        return false;	
	if (!CheckEmail(f.txtEmail))
		return false;

	if (!CheckRequired(f.txtAreaCode, "Your Area Code"))
		return false;
	if (!CheckRequired(f.txtPrefix, "Your Trunk Number"))
		return false;
	if (!CheckRequired(f.txtExtension, "Your Extension"))
		return false;	
	if (!ValidatePhoneNumber(f.txtAreaCode.value,f.txtPrefix.value,f.txtExtension.value)) {
        alert("Please check the Phone Number (only numbers are allowed ).");
        f.txtAreaCode.focus();
        return false;
    }	

	if (f.txtAreaCodeFax.value != "" && f.txtPrefixFax.value != "" && f.txtExtensionFax.value != "") {
		if (!ValidatePhoneNumber(f.txtAreaCodeFax.value,f.txtPrefixFax.value,f.txtExtensionFax.value) ) {
			alert("Please check the Fax Number (only numbers are allowed).");
			f.txtAreaCodeFax.focus();
        	return false;
		}	
	}

	if (f.txtAddress.value != "") {
		if ( !ValidateString(f.txtAddress.value,rexFilter) ){
        	alert("Please check the Address (only letters, numbers and spaces are allowed).");
        	return false;
   		}	
	}
	
	return true;
}

function ValidateEmailFriend(f) {
	
	if (!CheckRequired(f.txtSenderName, "Your E-mail"))
		return false;
	
	if (!CheckEmail(f.txtFriendEmail))
		return false;
		
	return true;
}

function ValidateLocator(f) {

	if (f.postcode.value != "") {
		if (!CheckRequired(f.postcode,"Zip code"))
        return false;
		if ( !ValidateString(f.postcode.value, rexZip + "|" + rexCAPostalCode) ) {
			alert("Please check the format of the zip code");
			return false;
		}
		else {
			f.state.value = "";
			f.city.value = "";
			return true;
		}
	}
	else {
		var city = f.city.value;
		var state = f.state.value;
		if (state == "Choose" || state == "Other") {
			state = "";
		}
		if ( state != "" ) {
			if ( city == "" ) {
				f.action = "search_results_state.aspx";
			}
			else {
				if ( !ValidateString(f.city.value,rexFilter) ){
					alert("Please check the City (only letters, numbers and spaces are allowed).");
					return false;
				}	
			}
			f.postcode.value = "";
			return true;
		}
		else {
			alert("Please enter a zip code, a state, or a city and state");
			return false;
		}
	}	
}

function ValidateContact(f)
{
	if (!CheckRequired(f.FirstName, "First Name"))
        return false;
    if (!ValidateString(f.FirstName.value,rexFilter) ){
        alert("Please check the First Name (only letters, numbers and spaces are allowed).");
        return false;
    }
	
	if (!CheckRequired(f.LastName, "Last Name"))
        return false;
	if ( !ValidateString(f.LastName.value,rexFilter) ){
        alert("Please check the Last Name (only letters, numbers and spaces are allowed).");
        return false;
    }
	
	if (!CheckRequired(f.Email, "Email Address"))
        return false;
    if (!CheckEmail(f.Email))
        return false;
	
	//if ( !ValidateString(f.Address1.value,rexFilter) ){
	//	alert("Please check the Address Line 1 (only letters, numbers and spaces are allowed).");
	//	return false;
    //}
	
	//if ( !ValidateString(f.Address2.value,rexFilter) ){
	//	alert("Please check the Address Line 2 (only letters, numbers and spaces are allowed).");
	//	return false;
    //}
	
	//if ( !ValidateString(f.City.value,rexFilter) ){
		//alert("Please check the City (only letters, numbers and spaces are allowed).");
		//return false;
	//}
	
	//if ( !ValidateString(f.State.value,rexFilter) ){
		//alert("Please check the State (only letters, numbers and spaces are allowed).");
		//return false;
    //}
	
	//if (!CheckRequired(f.txtAreaCode, "Your Area Code"))
		//return false;
	//if (!CheckRequired(f.txtPrefix, "Your Trunk Number"))
		//return false;
	//if (!CheckRequired(f.txtExtension, "Your Extension"))
		//return false;	
	//if (!ValidatePhoneNumber(f.AreaCode.value,f.Prefix.value,f.Extension.value)) {
      // alert("Please check the Business Phone (only numbers are allowed ).");
       // f.AreaCode.focus();
       // return false;
    //}	
	if (!CheckRequired(f.Message, "Message")) {
       return false;
    }
	if (!ValidateString(f.Message.value,rexFilter) ){
		alert("Please check the Message (only letters, numbers and spaces are allowed).");
		return false;
    }

	return true;
}

function ValidateContestEntry(f) {
	if (!CheckRequired(f.txtFirstName, "First Name"))
        return false;
    if ( !ValidateString(f.txtFirstName.value,rexFilter) ){
        alert("Please check the First Name (only letters, numbers and spaces are allowed).");
        return false;
    }
        
    if ( !ValidateString(f.txtLastName.value,rexFilter) ){
        alert("Please check the Last Name (only letters, numbers and spaces are allowed).");
        return false;
    }

	if (!CheckRequired(f.txtEmail, "Email Address"))
        return false;
    if (!CheckEmail(f.txtEmail))
        return false;
    if (!CheckRequired(f.txtEmailReenter, "Confirmation Email Address"))
        return false;
    if (!CheckEmail(f.txtEmailReenter))
        return false;
    if (frm.txtEmail.value != f.txtEmailReenter.value) {
        alert("Your email and confirm email should match.  Please try again.");
        return false;
    }

	if (!CheckRequired(f.txtZip,"Zip code"))
        return false;
    if ( !ValidateString(f.txtZip.value, rexZip + "|" + rexCAPostalCode) ) {
        alert("Please check the format of the zip code");
        return false;
    }
	
	if ( !ValidatePhoneNumber(f.txtAreaCode.value,f.txtPrefix.value,f.txtExtension.value) ) {
        alert("Please check the Phone Number (only numbers are allowed ).");
        f.txtAreaCode.focus();
        return false;
    }
    if (f.optAge[0].checked == false  &&  f.optAge[1].checked == false){
        alert("Are you age 13 or older? Please select Yes or No.");
        return false;
    }
    if (f.chkTeen.checked == false  &&  f.chkAdult.checked == false){
        alert("Which email would you like to receive? Please select 'Adult Email' or 'Teen Email'.");
        return false;
    }	
	if (f.email_friend1.value != "") {
		if (!CheckRequired(f.email_friend1, "Friend's Email Address"))
			return false;
		if (!CheckEmail(f.email_friend1))
			return false;
		return true;	
	}
	if (f.email_friend2.value != "") {
		if (!CheckRequired(f.email_friend2, "Friend's Email Address"))
			return false;
		if (!CheckEmail(f.email_friend2))
			return false;
		return true;		
	}
	if (f.email_friend3.value != "") {
		if (!CheckRequired(f.email_friend3, "Friend's Email Address"))
			return false;
		if (!CheckEmail(f.email_friend3))
			return false;
		return true;		
	}
	if (f.email_friend4.value != "") {
		if (!CheckRequired(f.email_friend4, "Friend's Email Address"))
			return false;
		if (!CheckEmail(f.email_friend4))
			return false;
		return true;		
	}
	return true;
}
//-->