function Oversized() {
	alert('This item requires oversized shipping. Please contact us to arrange for proper shipping details.');
}
function MenuItemOver(x) {
	x.style.cursor = 'hand';
	x.style.color = '#ff0000';
}
function MenuItemOut(x) {
	x.style.color = '#ffffff';
}
function MenuItemClick(x1,x2) {
	if(x2 == 1) {
		window.location.href = sBaseSSL+"/"+x1;
	} else {
		window.location.href = sBaseURL+"/"+x1;
	}
}
function GroupOver(x) {
	x.style.cursor = 'hand';
	x.style.color = '#000000';
	x.style.backgroundColor = '#bbbbbb';
}
function GroupOut(x) {
	x.style.color = '#666666';
	x.style.backgroundColor = '#ffffff';
}
function GroupClick(x) {
	window.location.href = "group.asp?id="+x;
}
function Get_All_Groups() {
	window.location.href = "groups.asp";
}
function ProductClick(x) {
	window.location.href = "product.asp?id="+x;
}
function Get_Shipping() {
	try { formMethod = document.getElementById('formMethod'); } catch(err) {}
	try { formZipcode = document.getElementById('formZipcode'); } catch(err) {}
	try { formLocation0 = document.getElementById('formLocation0'); } catch(err) {}
	try { formLocation1 = document.getElementById('formLocation1'); } catch(err) {}

	sMethod = formMethod.value;
	sZipcode = formZipcode.value;

	if(formLocation0.checked) { sLocation = 1; } else if(formLocation1.checked) { sLocation = 2; } else { sLocation = 0; }

	if(sZipcode == '' || sLocation == 0) {
		sTemp = 'Please make sure all areas of the Shipping Calculator are filled out. Please try again.';
		alert(sTemp);
	} else {
		sData = sMethod+"|"+sZipcode+"|"+sLocation;
		window.location.href = "shipping.asp?id="+sData
	}
}
function Remove_Item(x) {
	window.location.href = "removeItem.asp?id="+x;
}
function Add2Cart(itemid,unitcount) {
	window.location.href = "addItem.asp?id="+itemid+"&unitcount="+unitcount;
}
function Clear_Cart() {
	window.location.href = "clearCart.asp";
}
function Checkout() {
	try { cartData_Total = document.getElementById('cartData_Total'); } catch(err) {}

	sTotal = cartData_Total.innerHTML;

	if(sTotal == '&nbsp;') {
		sTemp = 'You must calculate shipping before proceeding to checkout.\nPlease run the Shipping Calculator, then click the Checkout button again.';
		alert(sTemp);
	} else {
		if(sDomainName == 'dev.buildsitepro.com') {
			window.location.href = sBaseURL+"/checkout.asp";
		} else {
			window.location.href = sBaseSSL+"/checkout.asp";
		}
	}
}
function Submit_Catalog_Request() {
	sCompany = formCompany.value;
	sFname = formFname.value;
	sLname = formLname.value;
	sAddress = formAddress.value;
	sCity = formCity.value;
	sState = formState.value;
	sZipcode = formZipcode.value;
	sEmail = formEmail.value;
	sPhone = formPhone.value;
	sNotes = formNotes.value;

	if(sFname == '' || sLname == '' || sAddress == '' || sCity == '' || sState == '0' || sZipcode == '' || sPhone == '') {
		alert('All items with an "*" are required. Please fill-out all required items.');
	} else {
		hiddenForm.hiddenCompany.value = sCompany;
		hiddenForm.hiddenFname.value = sFname;
		hiddenForm.hiddenLname.value = sLname;
		hiddenForm.hiddenAddress.value = sAddress;
		hiddenForm.hiddenCity.value = sCity;
		hiddenForm.hiddenState.value = sState;
		hiddenForm.hiddenZipcode.value = sZipcode;
		hiddenForm.hiddenEmail.value = sEmail;
		hiddenForm.hiddenPhone.value = sPhone;
		hiddenForm.hiddenNotes.value = sNotes;

		hiddenForm.submit();
	}
}
function Clear_Catalog_Request() {
	formCompany.value = '';
	formFname.value = '';
	formLname.value = '';
	formAddress.value = '';
	formCity.value = '';
	formState.value = '0';
	formZipcode.value = '';
	formEmail.value = '';
	formPhone.value = '';
	formNotes.value = '';
}
function Join_Now() {
	sName = formMailingList.formListName.value;
	sEmail = formMailingList.formListEmail.value;
	if(Validate_Email_Address(sEmail) && sEmail != '') {
		formMailingList.submit();
	} else {
		alert('The email address you provided, '+sEmail+', is not a proper email address. Please correct your entry and try again.');
	}
}
function Validate_Email_Address(x) {
	if(x == '') { return true; }
	sReg = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+(?:[a-zA-Z0-9_\.\-])+$/;
	oReg = new RegExp(sReg);
	if(oReg.test(x)) {
		return true;
	} else {
		return false;
	}
}
function PayMenuItemClick(x) {
	window.open(sBaseURL+"/"+x+"Policy.asp","Popup","width=400,height=500,resizable=no,status=no,toolbar=no,scrollbars=yes");
}
function Submit_Feedback() {
	sTempEmail = formFeedback.formEmail.value;
	sTempMessage = formFeedback.formMessage.value;

	if(sTempEmail == '' && sTempMessage == '') { return false; }

	if(Validate_Email_Address(sTempEmail)) {
		formFeedback.submit();
	} else {
		alert('The email address you provided is invalid.');
	}
}









