function CheckSubmit(thisform){
//alert('x');

	if(thisform.id == 'wdyk_form'){
		var emailFilter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
		if (!(emailFilter.test(thisform.info_email.value))){ 
       		alert("Please enter a valid email address.");
       		thisform.info_email.focus();
       		return false;
		}
	}else{

	if (thisform.info_name.value == ""){
		alert("Please enter a name.");
		thisform.info_name.focus();
		return false;
	}
	if (thisform.info_address.value == ""){
		alert("Please enter your address.");
		thisform.info_address.focus();
		return false;
	}
	if (thisform.info_city.value == ""){
		alert("Please enter your city.");
		thisform.info_city.focus();
		return false;
	}
	if (thisform.info_country.value == ""){
	if (thisform.info_state.value == ""){
		alert("Please enter your state.");
		thisform.info_state.focus();
		return false;
	}
	if (thisform.info_zip.value == ""){
		alert("Please enter your ZIP.");
		thisform.info_zip.focus();
		return false;
	}
	}
	if (thisform.info_email.value == ""){
		alert("Please enter your email address.");
		thisform.info_email.focus();
		return false;
	}
	if (thisform.info_email.value !== ""){
		var emailFilter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
		if (!(emailFilter.test(thisform.info_email.value))){ 
       		alert("Please enter a valid email address.");
       		thisform.info_email.focus();
       		return false;
		}
	}
	if(thisform.id == 'subscribe' || thisform.id == 'renew'){
		if(thisform.cc_type[0].checked == false && thisform.cc_type[1].checked == false){
			alert("Please select a credit card type.");
			thisform.cc_type[0].focus();
			return false;
		}
		if (thisform.cc_num.value == ""){
			alert("Please enter a valid credit card number.");
			thisform.cc_num.focus();
			return false;
		}
		if (!checkLuhn(thisform.cc_num.value)){
			alert("Please enter a valid credit card number.");
			thisform.cc_num.focus();
			return false;
		}
		if (thisform.cc_code.value == ""){
				alert("Please enter the credit card security code.");
				thisform.cc_code.focus();
				return false;
		}
		if (thisform.cc_exp_mo.selectedIndex == 0){
			alert("Please enter your credit card expiration month.");
			thisform.cc_exp_mo.focus();
			return false;
		}
		if (thisform.cc_exp_yr.selectedIndex == 0){
			alert("Please enter your credit card expiration year.");
			thisform.cc_exp_yr.focus();
			return false;
		}
	}
	if(thisform.id == 'advertise'){
		if (thisform.agree.checked == false){
			alert("Please read and agree to the contract terms.");
			thisform.agree.focus();
			return false;
		}
		if(thisform.status[0].checked == false && thisform.status[1].checked == true){
			if(thisform.cc_type[0].checked == false && thisform.cc_type[1].checked == false){
				alert("Please select a credit card type.");
				thisform.cc_type[0].focus();
				return false;
			}
			if (thisform.cc_num.value == ""){
				alert("Please enter a valid credit card number.");
				thisform.cc_num.focus();
				return false;
			}
			if (!checkLuhn(thisform.cc_num.value)){
				alert("Please enter a valid credit card number.");
				thisform.cc_num.focus();
				return false;
			}
			if (thisform.cc_code.value == ""){
				alert("Please enter the credit card security code.");
				thisform.cc_code.focus();
				return false;
			}
			if (thisform.cc_exp_mo.selectedIndex == 0){
				alert("Please enter your credit card expiration month.");
				thisform.cc_exp_mo.focus();
				return false;
			}
			if (thisform.cc_exp_yr.selectedIndex == 0){
				alert("Please enter your credit card expiration year.");
				thisform.cc_exp_yr.focus();
				return false;
			}
		}else if(thisform.status[0].checked == false && thisform.status[1].checked == false){
			alert("Please select your advertising status.");
			thisform.status[0].focus();
			return false;
		}
	}
	if(thisform.id == 'just_ask_jim_form'){
		if (thisform.jaj_question.value == ""){
			alert("Oops! Don't forget to ask your question.");
			thisform.jaj_question.focus();
			return false;
		}
	}
	}//end wdky else statement
	return true;
}

function checkLuhn (cc) {
   var sum = 0;
   var i;

   for (i = cc.length - 2; i >= 0; i -= 2) {
      sum += Array (0, 2, 4, 6, 8, 1, 3, 5, 7, 9) [parseInt (cc.charAt (i), 10)];
   }
   for (i = cc.length - 1; i >= 0; i -= 2) {
      sum += parseInt (cc.charAt (i), 10);
   }
   return (sum % 10) == 0;
}
