var b1a = new Image();
var b1n = new Image();
b1a.src="Images/Buttons/ScartA.gif";
b1n.src="Images/Buttons/ScartNA.gif";


function OpenLargeViewer(img){
	url = "large_image.asp?i=" + img
	window.open(url,"viewer","width=420,height=460")
}
function ShippingPopup() {window.open("ShippingPopup.asp","Shipping","width=300,height=300");}
function NeedHelpPopup() {window.open("NeedHelp.asp","Help","width=500,height=500,scrollbars=yes");}
function ContactUsPopup() {window.open("ContactUsPopup.asp","Shipping","width=300,height=300");}
function AboutUsPopup() {window.open("AboutUsPopup.asp","Shipping","width=500,height=400,scrollbars=yes");}
function ShoppingCartPopup() {window.open("shoppingcart.asp","ShoppingCart","width=300,height=300");}
function GuaranteePopup(){window.open("GuaranteePopup.asp","Shipping","width=300,height=300");}
function windowPopUp(url){
	var aX = document.body.offsetWidth - 30;
	var aY = document.body.offsetHeight - 30;
	window.open(url,"","width="+aX+",height="+aY+",scrollbars=yes,toolbar=yes,resizable=yes,status=yes,location=yes");
	}
function VerifySearch()
{
	if (document.searchform.search.value.length == 0) {alert("Please Enter Search Keywords"); document.searchform.search.focus(); return false;}
	return true;
}
function AddToCart()
{
	var jsQty = new Number(document.AddProduct.qty.value);
	if (isNaN(jsQty)) {alert("Please use numbers only"); document.AddProduct.qty.value=""; document.AddProduct.qty.focus(); return false;}
	if (jsQty != Math.round(jsQty)) {alert("Please use whole numbers only"); document.AddProduct.qty.value=""; document.AddProduct.qty.focus(); return false;}
	if (jsQty<=0) {alert("Please enter quantity for this product"); document.AddProduct.qty.value=""; document.AddProduct.qty.focus(); return false;}
	if (iThreshold>-1 && jsQty > iThreshold)
	{
		if(!confirm("There are only "+iThreshold+" currently available. Would you like to adjust quantity automatically?")) return;
	}
	document.AddProduct.submit();
	return false;
}
