function CartSubmit() {
	var FormPath;
	FormPath = document.cart_submit;
	FormPath.submit();
}
function CartUpdate() {
	var FormPath;
	FormPath = document.cart_update;
	FormPath.submit();
}
function CartPkgRemove(pp) {
	var FormPath;
	FormPath = document.cart_update;
	FormPath['qty_'+pp].value = 0;
	FormPath.submit();
}
function CartProcessLogin() {
	var FormPath;
	FormPath = document.cart_process_login;
	if (FormPath.email.value == "") {
		alert("Please enter the e-mail address you used when you joined.");
		FormPath.email.focus();
	}
	else if (FormPath.email.value.indexOf('@') == -1 || FormPath.email.value.indexOf('.') == -1) {
		alert("Your e-mail address is not formatted correctly. Please check it and try again.");
		FormPath.email.focus();
	}
	else if (FormPath.password.value == "") {
		alert("Please enter the password you used when you joined.");
		FormPath.email.focus();
	}
	else {
		FormPath.submit();
	}
}
function CartProcessForgotPassword() {
	var FormPath;
	FormPath = document.cart_process_forgot_password;
	if (FormPath.email.value == "") {
		alert("Please enter the e-mail address you used when you joined.");
		FormPath.email.focus();
	}
	else if (FormPath.email.value.indexOf('@') == -1 || FormPath.email.value.indexOf('.') == -1) {
		alert("Your e-mail address is not formatted correctly. Please check it and try again.");
		FormPath.email.focus();
	}
	else {
		FormPath.submit();
	}
}
function CartProcessJoin() {
	var FormPath;
	FormPath = document.cart_process_join;

	if (FormPath.fname.value == "") {
		alert("Please enter your first name in the \"First Name\" field.");
		FormPath.fname.focus();
	}
	else if (FormPath.lname.value == "") {
		alert("Please enter your last name in the \"Last Name\" field.");
		FormPath.lname.focus();
	}
	else if (FormPath.title.value == "") {
		alert("Please enter your Title in the \"Title\" field.");
		FormPath.title.focus();
	}
	else if (FormPath.org.value == "") {
		alert("Please enter your Company Name in the \"Company Name\" field.");
		FormPath.org.focus();
	}
	else if (FormPath.industry.value == "Choose") {
		alert("Please choose an option from \"Industry\".");
		FormPath.industry.focus();
	}
	else if (vqrc == "") {
		alert("Please answer Yes or No to the Industry Verification Question.");
		//FormPath.industry.focus();
	}
	else if (FormPath.address1.value == "") {
		alert("Please enter your Address in the \"Address1\" field.");
		FormPath.address1.focus();
	}
	else if (FormPath.city.value == "") {
		alert("Please enter your city in the \"City\" field.");
		FormPath.city.focus();
	}
	else if (FormPath.state.value == "") {
		alert("Please enter your state in the \"State\" field.");
		FormPath.state.focus();
	}
	else if (FormPath.zip.value == "") {
		alert("Please enter your zip code in the \"Zip\" field.");
		FormPath.zip.focus();
	}
	else if (FormPath.tel.value == "") {
		alert("Please enter your phone number in the \"Phone\" field.");
		FormPath.tel.focus();
	}
	else if (FormPath.email.value == "") {
		alert("Your e-mail address is necessary so that we may respond.");
		FormPath.email.focus();
	}
	else if (FormPath.email.value.indexOf('@') == -1 || FormPath.email.value.indexOf('.') == -1) {
		alert("Your e-mail address is not formatted correctly. Please check it and try again.");
		FormPath.email.focus();
	}
	else if (FormPath.email.value != FormPath.confirm_email.value) {
		alert("Your e-mail address and your confirmation do not match.");
		FormPath.email.focus();
	}
	else if (FormPath.howheard.value == "5") {
		alert("Please let us know how you found us.");
		FormPath.howheard.focus();
	}
	else if (FormPath.password.value == "") {
		alert("Your password is necessary.");
		FormPath.password.focus();
	}
	else if (FormPath.password.value != FormPath.password2.value) {
		alert("The passwords you typed in do not match.");
		FormPath.password.focus();
	}
	else {
		FormPath.submit();
	}
}
function CartProcessInfo() {
	var FormPath;
	FormPath = document.cart_process_info;

	var tmp_ship = 0;
	if (typeof FormPath.shipping != "undefined") {
		if (typeof FormPath.shipping.length != "undefined") {
			for (i = 0; i < FormPath.shipping.length; i++) {
				if (FormPath.shipping[i].checked == true) {
					tmp_ship = FormPath.shipping[i].value;
				}
			}
		}
	}
	if (typeof FormPath.fill_shipping_info != "undefined") {
		if (FormPath.fill_shipping_info.value == "yes") {
			FormPath.x_Ship_To_Company.value = FormPath.x_Company.value;
			FormPath.x_Ship_To_First_Name.value = FormPath.x_First_Name.value;
			FormPath.x_Ship_To_Last_Name.value = FormPath.x_Last_Name.value;
			FormPath.x_Ship_To_Title.value = FormPath.x_Title.value;
			FormPath.x_Ship_To_Address.value = FormPath.x_Address.value;
			FormPath.x_Ship_To_City.value = FormPath.x_City.value;
			FormPath.x_Ship_To_State.value = FormPath.x_State.value;
			FormPath.x_Ship_To_Zip.value = FormPath.x_Zip.value;
			FormPath.x_Ship_To_Country.value = FormPath.x_Country.value;
			FormPath.ship_to_email.value = FormPath.x_EMail.value;
		}
	}


	if (FormPath.x_Ship_To_First_Name.value == "") {
		alert("Please enter your first name in the \"First Name\" field.");
		FormPath.x_Ship_To_First_Name.focus();
	}
	else if (FormPath.x_Ship_To_Last_Name.value == "") {
		alert("Please enter your last name in the \"Last Name\" field.");
		FormPath.x_Ship_To_Last_Name.focus();
	}
	else if (FormPath.x_Ship_To_Title.value == "") {
		alert("Please enter your title in the \"Title\" field.");
		FormPath.x_Ship_To_Title.focus();
	}
	else if (FormPath.x_Ship_To_Company.value == "") {
		alert("Please enter your Company Name in the \"Company Name\" field.");
		FormPath.x_Ship_To_Company.focus();
	}
	else if (FormPath.x_Ship_To_Address.value == "") {
		alert("Please enter your Address in the \"Address1\" field.");
		FormPath.x_Ship_To_Address.focus();
	}
	else if (FormPath.x_Ship_To_Address.value.toLowerCase().indexOf("po box") != -1) {
		alert("I'm sorry, our shipping vendor does not accept PO Box addresses. Please provide a physical address in the \"Address\" field or contact us at 1-800-408-5657 and we'll work with you to come up with an alternative solution.");
		FormPath.x_Ship_To_Address.focus();
	}
	else if (FormPath.x_Ship_To_Address.value.toLowerCase().indexOf("p o box") != -1) {
		alert("I'm sorry, our shipping vendor does not accept PO Box addresses. Please provide a physical address in the \"Address\" field or contact us at 1-800-408-5657 and we'll work with you to come up with an alternative solution.");
		FormPath.x_Ship_To_Address.focus();
	}
	else if (FormPath.x_Ship_To_Address.value.toLowerCase().indexOf("p.o. box") != -1) {
		alert("I'm sorry, our shipping vendor does not accept PO Box addresses. Please provide a physical address in the \"Address\" field or contact us at 1-800-408-5657 and we'll work with you to come up with an alternative solution.");
		FormPath.x_Ship_To_Address.focus();
	}
	else if (FormPath.x_Ship_To_Address.value.toLowerCase().indexOf("p.o.box") != -1) {
		alert("I'm sorry, our shipping vendor does not accept PO Box addresses. Please provide a physical address in the \"Address\" field or contact us at 1-800-408-5657 and we'll work with you to come up with an alternative solution.");
		FormPath.x_Ship_To_Address.focus();
	}
	else if (FormPath.x_Ship_To_City.value == "") {
		alert("Please enter your city in the \"City\" field.");
		FormPath.x_Ship_To_City.focus();
	}
	else if (FormPath.x_Ship_To_State.value == "") {
		alert("Please enter your state in the \"State\" field.");
		FormPath.x_Ship_To_State.focus();
	}
	else if (FormPath.x_Ship_To_Zip.value == "") {
		alert("Please enter your zip code in the \"Zip\" field.");
		FormPath.x_Ship_To_Zip.focus();
	}
	else if (FormPath.ship_to_email.value == "") {
		alert("Please enter your email address in the \"Email\" field.");
		FormPath.ship_to_email.focus();
	}
	else if ((FormPath.ship_type.selectedIndex == 0)) {
		alert("Please choose your Shipping Location.");
		FormPath.ship_type.focus();
	}
	else if (FormPath.x_First_Name.value == "") {
		alert("Please enter your first name in the \"First Name\" field.");
		FormPath.x_First_Name.focus();
	}
	else if (FormPath.x_Last_Name.value == "") {
		alert("Please enter your last name in the \"Last Name\" field.");
		FormPath.x_Last_Name.focus();
	}
	else if (FormPath.x_Title.value == "") {
		alert("Please enter your last name in the \"Title\" field.");
		FormPath.x_Title.focus();
	}
	else if (FormPath.x_Company.value == "") {
		alert("Please enter your Company Name in the \"Company Name\" field.");
		FormPath.x_Company.focus();
	}
	else if (FormPath.x_Address.value == "") {
		alert("Please enter your Address in the \"Address1\" field.");
		FormPath.x_Address.focus();
	}
	else if (FormPath.x_City.value == "") {
		alert("Please enter your city in the \"City\" field.");
		FormPath.x_City.focus();
	}
	else if (FormPath.x_State.value == "") {
		alert("Please enter your state in the \"State\" field.");
		FormPath.x_State.focus();
	}
	else if (FormPath.x_Zip.value == "") {
		alert("Please enter your zip code in the \"Zip\" field.");
		FormPath.x_Zip.focus();
	}
	else if (FormPath.x_Phone.value == "") {
		alert("Please enter your phone number in the \"Phone\" field.");
		FormPath.x_Phone.focus();
	}
	else if (FormPath.x_EMail.value == "") {
		alert("Please enter your email address in the \"E-mail\" field.");
		FormPath.x_EMail.focus();
	}
	else if (((FormPath.x_Ship_To_State.value == "Alaska") || (FormPath.x_Ship_To_State.value == "AK")) && (tmp_ship == 20)) {
		alert("3rd Day Air shipping is not available for Alaska.  Please choose another shipping method.");
	}
	else if (typeof FormPath.billme != "undefined") {
		var alertmsg = "";
		var ff = "";
		var d = new Date();
		var month = d.getMonth() + 1;
		var year = d.getFullYear();
		var renum = /^[0-9 -]+$/;
		if (typeof FormPath.billme.length != "undefined") {
			for (i = 0; i < FormPath.billme.length; i++) {
				if (FormPath.billme[i].checked == true) {
					if (FormPath.billme[i].value == "no") {
						for (j = 0; j < FormPath.shipping.length; j++) {
							if (FormPath.shipping[j].checked == true) {
								var tmp_ship = FormPath.shipping[j].value;
							}
						}
						if ((FormPath.tmp_cst.value > 0) || (tmp_ship > 0)) {
							if (FormPath.x_Card_Num.value == "") {
								alertmsg = "Please enter your Credit Card Number in the \"Credit Card Number\" field.";
								ff = "x_Card_Num";
							}
							else if (!renum.test(FormPath.x_Card_Num.value)) {
								alertmsg = "Your Credit Card Number can contain only numbers, spaces, & dashes.  Please update your Credit Card Number in the \"Credit Card Number\" field.";
								ff = "x_Card_Num";
							}
							else if ((FormPath.x_Exp_Month.value < month) && (FormPath.x_Exp_Year.value == year)) {
								alertmsg = "Your expiration date has passed.  Please update the \"Exp Date\" fields.";
								ff = "x_Exp_Month";
							}
							else if (FormPath.x_card_code.value == "") {
								alertmsg = "Please enter your Credit Card Number in the \"CID\" field.";
								ff = "x_Card_Num";
							}
						}
					}
					else if (FormPath.billme[i].value == "yes") {
						for (j = 0; j < FormPath.shipping.length; j++) {
							if (FormPath.shipping[j].checked == true) {
								var tmp_ship = FormPath.shipping[j].value;
							}
						}
						if ((FormPath.tmp_cst.value == 0) && (tmp_ship > 0)) {
							alertmsg = "Please Bill Me is unavailable for expedited Preview Orders.";
							FormPath.billme[0].checked = true;
							ff = "x_Card_Num";
						}
					}
				}
			}
		}
		else {
			if (FormPath.billme.value == "no") {
				for (j = 0; j < FormPath.shipping.length; j++) {
					if (FormPath.shipping[j].checked == true) {
						var tmp_ship = FormPath.shipping[j].value;
					}
				}
				if ((FormPath.tmp_cst.value > 0) || (tmp_ship > 0)) {
					if (FormPath.x_Card_Num.value == "") {
						alertmsg = "Please enter your Credit Card Number in the \"Credit Card Number\" field.";
						ff = "x_Card_Num";
					}
					else if ((FormPath.x_Exp_Month.value < month) && (FormPath.x_Exp_Year.value == year)) {
						alertmsg = "Your expiration date has passed.  Please update the \"Exp Date\" fields.";
						ff = "x_Exp_Month";
					}
					else if (FormPath.x_card_code.value == "") {
						alertmsg = "Please enter your Credit Card Number in the \"CID\" field.";
						ff = "x_Card_Num";
					}
				}
			}
			else if (FormPath.billme[i].value == "yes") {
				for (j = 0; j < FormPath.shipping.length; j++) {
					if (FormPath.shipping[j].checked == true) {
						var tmp_ship = FormPath.shipping[j].value;
					}
				}
				if ((FormPath.tmp_cst.value == 0) && (tmp_ship > 0)) {
					alertmsg = "Please Bill Me is unavailable for expedited Preview Orders.";
					FormPath.billme[0].checked = true;
					ff = "x_Card_Num";
				}
			}
		}
		if (alertmsg != "") {
			alert(alertmsg);
			eval("FormPath."+ff+".focus();");
		}
		else {
			FormPath.submit();
		}
	}
	else {
		FormPath.submit();
	}
}
function CartProcessShipping() {
	var FormPath;
	FormPath = document.cart_process_shipping;

	if (FormPath.x_Ship_To_First_Name.value == "") {
		alert("Please enter your first name in the \"First Name\" field.");
		FormPath.x_Ship_To_First_Name.focus();
	}
	else if (FormPath.x_Ship_To_Last_Name.value == "") {
		alert("Please enter your last name in the \"Last Name\" field.");
		FormPath.x_Ship_To_Last_Name.focus();
	}
	else if (FormPath.x_Ship_To_Company.value == "") {
		alert("Please enter your Company Name in the \"Company Name\" field.");
		FormPath.x_Ship_To_Company.focus();
	}
	else if (FormPath.x_Ship_To_Address.value == "") {
		alert("Please enter your Address in the \"Address1\" field.");
		FormPath.x_Ship_To_Address.focus();
	}
	else if (FormPath.x_Ship_To_City.value == "") {
		alert("Please enter your city in the \"City\" field.");
		FormPath.x_Ship_To_City.focus();
	}
	else if (FormPath.x_Ship_To_State.value == "") {
		alert("Please enter your state in the \"State\" field.");
		FormPath.x_Ship_To_State.focus();
	}
	else if (FormPath.x_Ship_To_Zip.value == "") {
		alert("Please enter your zip code in the \"Zip\" field.");
		FormPath.x_Ship_To_Zip.focus();
	}
	else {
		FormPath.submit();
	}
}
function CartProcessBilling() {
	var FormPath;
	FormPath = document.cart_process_billing;

	if (FormPath.x_First_Name.value == "") {
		alert("Please enter your first name in the \"First Name\" field.");
		FormPath.x_First_Name.focus();
	}
	else if (FormPath.x_Last_Name.value == "") {
		alert("Please enter your last name in the \"Last Name\" field.");
		FormPath.x_Last_Name.focus();
	}
	else if (FormPath.x_Company.value == "") {
		alert("Please enter your Company Name in the \"Company Name\" field.");
		FormPath.x_Company.focus();
	}
	else if (FormPath.x_Address.value == "") {
		alert("Please enter your Address in the \"Address1\" field.");
		FormPath.x_Address.focus();
	}
	else if (FormPath.x_City.value == "") {
		alert("Please enter your city in the \"City\" field.");
		FormPath.x_City.focus();
	}
	else if (FormPath.x_State.value == "") {
		alert("Please enter your state in the \"State\" field.");
		FormPath.x_State.focus();
	}
	else if (FormPath.x_Zip.value == "") {
		alert("Please enter your zip code in the \"Zip\" field.");
		FormPath.x_Zip.focus();
	}
	else if (FormPath.x_Phone.value == "") {
		alert("Please enter your phone number in the \"Phone\" field.");
		FormPath.x_Phone.focus();
	}
	else if (FormPath.x_EMail.value == "") {
		alert("Please enter your zip code in the \"E-mail\" field.");
		FormPath.x_EMail.focus();
	}
	else {
		FormPath.submit();
	}
}
function CartProcessOrder() {
	var FormPath;
	FormPath = document.cart_process_order;
	FormPath.submit();
}
function SubmitToVerisign() {
	if (cartsubmitted) {
		alert("Your transaction is being processed. Please be patient. Click OK to continue the submission.")
		return false;
	}
	else {
		cartsubmitted = true;
		return true;
	}
}
function SubmitToPP() {
	if (cartsubmitted) {
		alert("Your transaction is being processed. Please be patient. Click OK to continue the submission.")
		return false;
	}
	else {
		cartsubmitted = true;
		return true;
	}
}
function CartShippingUpdate(country) {
	var sourceDiv;
	var targetDiv = document.getElementById("CartShipOption");
	var msgDiv = document.getElementById("CartShipMsg");
	if (country == "United States") {
		sourceDiv = document.getElementById("CartShipUSA");
		targetDiv.innerHTML = sourceDiv.innerHTML;
	}
	else {
		sourceDiv = document.getElementById("CartShipOther");
		targetDiv.innerHTML = sourceDiv.innerHTML;
	}
	msgDiv.innerHTML = "Country has changed. Please review your Shipping Method below.";
	var tmpAnim = new YAHOO.util.Anim("CartShipMsg", {opacity: {from: 1, to: 0}}, 20, YAHOO.util.Easing.easeBothStrong);
	tmpAnim.animate();
}
