<!--
	// initialize quanity variables
	totalEsquireqty = 0;
	totalSidewalkqty = 0;
	totalEconomyqty = 0;
	totalBudgetqty = 0;
	totalCastleqty = 0;
	total9x24qty = 0;
	total12x18qty = 0;
	total18x24qty = 0;


	// buyItem - adds an item to the shopping basket

	function buyItem()
	{
		// set up variables for Directionals

		var whichitem = "Directionals"
		var qty = Dirqty;
		var size = Dirsize;
		itemNo = Diritem;

		// hard codes color variables as Directionals colors do not change
		color = "red";
		bgcolor = "white";

		// copy1 is the sign wording for Directionals
		copy1 = Dircopy;

		// copy2 variable contains imprint info if selected
		copy2 = Dirimprint

		// adds item to shopping cart
		setDirectionalqty(qty, size); 
		oldCart = getCookie('ShopCart');
		newCart = "["+itemNo+"|"+whichitem+"|"+size+"|"+color+"|"+bgcolor+"|"+copy1+"|"+copy2+"|"+qty+"]";
		cartFull = oldCart + newCart;
		setCookie('ShopCart',cartFull);
		self.location.href="shop_view_cart.htm"
	}

	// sets Esquireqty cookie so prices can be calculated in view_cart

	function setDirectionalqty(thisqty,thissize)
	{
		if (thissize == "ESQUIRE")
		{
			thatEsquireqty = getCookie('totalEsquireqty');
			if (thatEsquireqty)
			{	totalEsquireqty = thatEsquireqty;
				totalEsquireqty = (eval(parseInt(totalEsquireqty) + 				parseInt(thisqty)));		
			} else {
				totalEsquireqty = (eval(parseInt(totalEsquireqty) + 				parseInt(thisqty))); 
				}
			setCookie('totalEsquireqty', totalEsquireqty);
		}

	
		if (thissize == "SIDEWALK")
		{
			thatSidewalkqty = getCookie('totalSidewalkqty');
			if (thatSidewalkqty)
			{	totalSidewalkqty = thatSidewalkqty;
				totalSidewalkqty = (eval(parseInt(totalSidewalkqty) + 								parseInt(thisqty)));		
			} else {
				totalSidewalkqty = (eval(parseInt(totalSidewalkqty) + 				parseInt(thisqty))); 
			}
			setCookie('totalSidewalkqty', totalSidewalkqty);
		}

		if (thissize == "CASTLE")
		{
			thatCastleqty = getCookie('totalCastleqty');
			if (thatCastleqty)
			{	totalCastleqty = thatCastleqty;
				totalCastleqty = (eval(parseInt(totalCastleqty) + 				parseInt(thisqty)));		
			} else {
				totalCastleqty = (eval(parseInt(totalCastleqty) + 				parseInt(thisqty))); 
				}
			setCookie('totalCastleqty', totalCastleqty);
		}

		if (thissize == "BUDGET")
		{
			thatBudgetqty = getCookie('totalBudgetqty');
			if (thatBudgetqty)
			{	totalBudgetqty = thatBudgetqty;
				totalBudgetqty = (eval(parseInt(totalBudgetqty) + 				parseInt(thisqty)));		
			} else {
				totalBudgetqty = (eval(parseInt(totalBudgetqty) + 				parseInt(thisqty))); 
				}
			setCookie('totalBudgetqty', totalBudgetqty);
		}
		
		if (thissize == "ECONOMY")
		{
			thatEconomyqty = getCookie('totalEconomyqty');
			if (thatEconomyqty)
			{	totalEconomyqty = thatEconomyqty;
				totalEconomyqty = (eval(parseInt(totalEconomyqty) + 				parseInt(thisqty)));		
			} else {
				totalEconomyqty = (eval(parseInt(totalEconomyqty) + 				parseInt(thisqty))); 
				}
			setCookie('totalEconomyqty', totalEconomyqty);
		}


		if (thissize == "9x24")
		{
			that9x24qty = getCookie('total9x24qty');
			if (that9x24qty)
			{	total9x24qty = that9x24qty;
				total9x24qty = (eval(parseInt(total9x24qty) + 				parseInt(thisqty)));		
			} else {
				total9x24qty = (eval(parseInt(total9x24qty) + 				parseInt(thisqty))); 
				}
			setCookie('total9x24qty', total9x24qty);
		}


		if (thissize == "12x18")
		{
			that12x18qty = getCookie('total12x18qty');
			if (that12x18qty)
			{	total12x18qty = that12x18qty;
				total12x18qty = (eval(parseInt(total12x18qty) + 				parseInt(thisqty)));		
			} else {
				total12x18qty = (eval(parseInt(total12x18qty) + 				parseInt(thisqty))); 
				}
			setCookie('total12x18qty', total12x18qty);
		}

		if (thissize == "18x24")
		{
			that18x24qty = getCookie('total18x24qty');
			if (that18x24qty)
			{	total18x24qty = that18x24qty;
				total18x24qty = (eval(parseInt(total18x24qty) + 				parseInt(thisqty)));		
			} else {
				total18x24qty = (eval(parseInt(total18x24qty) + 				parseInt(thisqty))); 
				}
			setCookie('total18x24qty', total18x24qty);
		}

	}


	// buy Directionals combo
	function BuyDir(s,c,i,q)
	{
		Dirsize = s;
		Dircopy = c;
		Diritem = i;
		Dirqty = q;	
		addItem();
	}

	// validates form fields and adds item info
	function addItem()
	 {

		Dirimprint = "";		

		// validates Dirqty
		if (Dirqty == "" || Dirqty == " ")
		{
			alert('Please enter a quantity.');
			document.Directform.Direct_qty1.focus();
			return;
		}
		
		isNo = chkForNum(Dirqty);
		if (!isNo)
		{
		alert('Please enter only numeric values');
			document.Directform.Direct_qty1.focus();
			return;
		}

		if (Diritem == "Combo" || Diritem == "Panel")
		{	
			Dirimprint = document.Directform2.Dir_imprint.value;	
		} 

		// adds info into cart
		buyItem()
	}

// -->	