function jumpPage(lang, type, letter) {
	if (letter.options[letter.selectedIndex].value != "") {
		window.location.href = "/" + lang + "/products/" + type + "/" + letter.options[letter.selectedIndex].value + "/1"
	}
}
function jumpGenericPage(newLoc) {
	if (newLoc.options[newLoc.selectedIndex].value != "") {
		window.location.href = "/generic.php?" + newLoc.options[newLoc.selectedIndex].value
	}
}
function jumpOtcPage(newLoc) {
	if (newLoc.options[newLoc.selectedIndex].value != "") {
		window.location.href = "/otc.php?" + newLoc.options[newLoc.selectedIndex].value
	}
}

function newWindow(popupPage, winWidth, winHeight) {
	if (winWidth == null) {
		winWidth = 480;
	}
	if (winHeight == null) {
		winHeight = 360;
	}
	popupWindow = window.open(popupPage, 'popupWindow', 'toolbar=no,location=no,scrollbars=yes,width='+winWidth+',height='+winHeight);
	popupWindow.focus();
}		

function billsame(form){
	if(form.billshipsame.checked){
		form.billfirstname.value = form.firstname.value;
		form.billlastname.value = form.lastname.value;
		form.billaddress1.value = form.address1.value;
		form.billaddress2.value = form.address2.value;
		form.billcity.value = form.city.value;
		form.billcountry.value = form.country.value;
		form.billpostalcode.value = form.postalcode.value;
		form.billemail.value = form.email.value;
		form.billemailconfirm.value = form.emailconfirm.value;
		form.billphone.value = form.phone.value;
		form.billphone2.value = form.phone2.value;
		form.billfax.value = form.fax.value;
	}
	else{
		form.billfirstname.value = "";
		form.billlastname.value = "";
		form.billaddress1.value = "";
		form.billaddress2.value = "";
		form.billcity.value = "";
		form.billstate.value = "";
		form.billcountry.value = "";
		form.billpostalcode.value = "";
		form.billemail.value = "";
		form.billemailconfirm.value = "";
		form.billphone.value = "";
		form.billphone2.value = "";
		form.billfax.value = "";
	}
}

var formSubmitted = false;

function SubmitForm() {
	if(formSubmitted == true) { return; }
	document.checkoutform.submit();
	document.checkoutform.placeorder.disabled = true;
	formSubmitted = true;
}

