function buy(thing,num,wid,hei)
{
	if(navigator.AppName == "Netscape") alert("We are sorry, but this shopping cart is currently only compatible with Microsoft Internet Explorer.\nPlease either:\n- Use Internet Explorer to complete your online order\n- Use our printable online fax order form\n- Call us with your order at (818-700-0637)");
	var cc,addr,frm,item,cat;
	item = thing;
	frm = "document.forms['" + item + "-form']";
	cat = eval(frm + ".elements['" + thing + "-catnum'].value");
	for(i=1;i<=num;i++)
	{
		tmp = eval(frm + ".elements['" + thing + "-choice" + i + "'].value");
		item += tmp;
	}
	wid = 820;
	hei = 640;
	addr = "http://www.affordablequalitylighting.com/Merchant2/merchant.mvc?Screen=PROD&Store_Code=AQL&Product_Code=" + item + "&Category_Code=" + cat;
	eval("window.open(addr,'newWin','fullscreen=yes,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no" + "')");
	return true;
}

function buy_bak1(thing,num,wid,hei)
{
	if(navigator.AppName == "Netscape") alert("We are sorry, but this shopping cart is currently only compatible with Microsoft Internet Explorer.\nPlease either:\n- Use Internet Explorer to complete your online order\n- Use our printable online fax order form\n- Call us with your order at (818-700-0637)");
	var cc,addr,frm,item,cat;
	item = thing;
	frm = "document.forms['" + item + "-form']";
	cat = eval(frm + ".elements['" + thing + "-catnum'].value");
	for(i=1;i<=num;i++)
	{
		tmp = eval(frm + ".elements['" + thing + "-choice" + i + "'].value");
		item += tmp;
	}
	if(!wid) wid = 430;
	if(!hei) hei = 380;
	addr = "http://www.affordablequalitylighting.com/Merchant2/merchant.mvc?Screen=PROD&Store_Code=AQL&Product_Code=" + item + "&Category_Code=" + cat;
	eval("window.open(addr,'newWin','width=" + wid + ",height=" + hei + "toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no" + "')");
	return true;
}

function estimate(code)
{
	if (typeof(code) != "undefined") {
		url = '/Merchant2/merchant.mvc?Screen=PRODESTI&WHAT&Store_Code=AQL' + '&ShipProduct_Code=' + code
	} else {
		url = '/Merchant2/merchant.mvc?Screen=PRODESTI&Store_Code=AQL'
	}
	window.open( url, 'special', 'toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no,width=460,height=880' ).focus();
}

