<!--
//-------------------------------------------------------------------------------------------------------------------------------
	var product;
	
	function browserOK()
	// checks users browser for compatibility with shopping cart
	{
		var bName = navigator.appName;
		var bVer = parseInt(navigator.appVersion);
		var NS4 = (bName == "Netscape" && bVer >= 3);
		var IE4 = (bName == "Microsoft Internet Explorer" && bVer >= 4);
		if (!(IE4 || NS4))
		{
			return false;
		}
		return true;
	}
//-------------------------------------------------------------------------------------------------------------------------------
// showItems() - displays shopping cart in a table
	function showItems()
	{

		if(!browserOK())
		{
			document.writeln('<DIV ALIGN="CENTER"><TABLE BORDER=0 WIDTH="360" bordercolor="#DD9500"><TR ALIGN="center"><TD><FONT FACE="Verdana, Arial" SIZE="+1" color="#800000"><B>YOUR SHOPPING CART IS EMPTY.</B></FONT></TD></TR></TABLE></DIV>');
			areItems = 0;
			return;
		}
		
		// sets flag to false for qty validation
		invalidQty = 0;
		subTotal = 0;
				
		// initializes flag to check if cart is empty
		areItems = 0;
		
		fulllist = getCookie('ShopCart');
		//alert(fulllist);
		
		if((!fulllist) || (fulllist == "null") || (fulllist == ""))
		{	
		document.writeln('<DIV ALIGN="CENTER"><TABLE BORDER=0 WIDTH="360"><TR ALIGN="center"><TD><FONT FACE="Verdana, Arial" SIZE="+1" COLOR="#FF0000"><B>YOUR SHOPPING CART IS EMPTY.</B></FONT></TD></TR></TABLE></DIV>');
		return;
		}
			
		document.writeln('<FORM NAME="updateform">');
		document.writeln('<TABLE BORDER=3 FRAMEBORDER=3 bordercolor="#DD9500">');
		document.writeln('<TR bgcolor="#F4BD00"><TD ALIGN="center"><b><font face="Arial" color="#800000" size=2>Item #</font></b></TD><TD ALIGN="center"><b><font face="Arial" color="#800000" size=2>Description</font></b></TD><TD ALIGN="center"><b><font face="Arial" color="#800000" size=2>Qty</font></b></TD><TD ALIGN="center"><b><font face="Arial" color="#800000" size=2>Size</font></b></TD><TD ALIGN="center"><b><font face="Arial" color="#800000" size=2>Color</font></b></TD><TD ALIGN="center"><b><font face="Arial" color="#800000" size=2>Copy - Line 1</font></b></TD><TD ALIGN="center"><b><font face="Arial" color="#800000" size=2>Copy - Line 2</font></b></TD><TD ALIGN="center"><b><font face="Arial" color="#800000" size=2>Cost Each</font></b></TD><TD ALIGN="center"><b><font face="Arial" color="#800000" size=2>Total Cost</font></b><TD ALIGN="center"><b><font face="Arial" color="#800000" size=2>Action</font></b></TD></TR>');
		itemlist = 0;

		for (var i = 0; i <= fulllist.length; i++) {
			if (fulllist.substring(i,i+1) == '[')
			{
				itemstart = i+1;
				thisitem = 1;
			} else if (fulllist.substring(i,i+1) == ']') {
				//the last item is the quantity...
			 	itemend = i;
			 	thequantity = fulllist.substring(itemstart, itemend);

				// check validity (numeric) of the quantity
			 	if (!validQty(thequantity)) { return };

			 	// increments empty cart check flag
			 	areItems++;

			  	// sets red qty marker to false
				turnItemRed = 0;
								
				// calls the pricing function
				//CODED BY ALF 07/09/06
				//CODE Modified to add 'Exi' Exit Realty Items BY Auburn SeeWolf 12/5/2006
				
				
//alert(whichitem + ' line 75');				
				if ((whichitem == "Accessories") || (whichitem == "Frames") || (whichitem == "Decals") || (whichitem == "INFOLine")
						|| (whichitem == "Magnetic Vehicle Sign") || (whichitem == "Economy Directional Open House") 
						|| (whichitem == "Economy Directional For Sale") || (whichitem == "ED Sign Step1") || (whichitem == "ED Sign Step2") 
						|| (whichitem == "Die Cut House FOR SALE") || (whichitem == "Die Cut House OPEN HOUSE") 
						|| (whichitem == "Die Cut Arrow FOR SALE") || (whichitem == "Die Cut Arrow OPEN HOUSE") 
						|| (whichitem == "Open House Sign") || (whichitem == "Open House Sign Frame") || (whichitem == "Sign Panel 432") 
						|| (whichitem == "Sign Panel 560") || (whichitem == "Sign Panel 864") 
						|| (whichitem == "Sign Panel & Esquire Frame Combo1") || (whichitem == "Sign Panel & Esquire Frame Combo2") 
						|| (whichitem == "Sign Panel & Castle Frame Combo1") || (whichitem == "Sign Panel & Castle Frame Combo2") 
						|| (whichitem == "Sign Panel & Castle Frame Combo3") || (whichitem == "Sign Panel & Castle Frame Combo4") 
						|| (whichitem == "Sign Panel & Castle Frame Combo5") || (whichitem == "Deluxe Directional Open House") 
						|| (whichitem == "Deluxe Directional For Sale") || (whichitem == "Deluxe Directional Open House Combo") 
						|| (whichitem == "Deluxe Directional For Sale Combo") || (whichitem == "Agent Name Rider1") 
						|| (whichitem == "Agent Name Rider2") || (whichitem == "Reflective Agent Name Rider1") 
						|| (whichitem == "Reflective Agent Name Rider2") || (whichitem == "Flexible Sign Open House") 
						|| (whichitem == "Flexible Sign For Sale") || (whichitem == "Plastic 1") || (whichitem == "Plastic 2") 
						|| (whichitem == "Plastic 3") || (whichitem == "Wooden 1") || (whichitem == "Wooden 2") || (whichitem == "Wooden 3") 
						|| (whichitem == "Metal"))
														
		{
		
					itemprice = getPriceitem(thequantity, theitem);
				} else if (whichitem == "Photo Riders") {	
					itemprice = getPhoto(thequantity, thesize, theitem);	
				} else if (whichitem == "Directionals") {	
					itemprice = getPriceDir(thequantity, thesize, theitem, thecopy2);	
				} else if (whichitem.substring(0,3) == "C21") {
					itemprice = getPriceC21(thequantity, theitem);	
				} else if (whichitem.substring(0,3) == "Rea") {
					itemprice = getPriceRea(theitem, thequantity);	
				} else if (whichitem.substring(0,3) == "Rex") {
					itemprice = getPriceRex(thequantity,theitem);	
				} else if (whichitem == "Hot Products") {	
					itemprice = getPriceHot(thequantity);	
				} else if (whichitem.substring(0,3) == "Exi") {		//Exit Realty Items
					itemprice = getPriceExi(theitem, thequantity);
				} else if (whichitem.substring(0,10) == "Executives") {		//Realty Executives (REX2)
					itemprice = getPriceRex2(theitem, thequantity);
				} else if (whichitem.substring(0,3) == "Env") {		//Envirian (Env)
					itemprice = getPriceEnv(theitem, thequantity);
				} else if (whichitem.substring(0,3) == "o48") {		//o48 (o48)
					itemprice = getPriceo48(theitem, thequantity);		
				} else if (whichitem.substring(0,4) == "gmac") {		
					itemprice = getPricegmac(theitem, thequantity);					
				}  else if (whichitem.substring(0,4) == "casa") {		
					itemprice = getPricecasa(theitem, thequantity);					
				}  else if (whichitem.substring(0,7) == "Century") {		
					itemprice = getPricec21(theitem, thequantity);					
				}  else if (whichitem.substring(0,7) == "Special") {		
					itemprice = getPriceSpc(theitem, thequantity);					
				}  else if (whichitem.substring(0,5) == "FSBO_") {		
					itemprice = getPriceFsbo(theitem, thequantity);					
				} else if (whichitem.substring(0,6) == "United") {		
					itemprice = getPriceunc(theitem, thequantity);					
				}  else if (whichitem.substring(0,8) == "UbuildIt") {		
					itemprice = getPriceUbuildIt(theitem, thequantity);					
				}  else if (whichitem.substring(0,5) == "Chart") {		
					itemprice = getPriceCrt(theitem, thequantity);					
				}   else if (whichitem.substring(0,3) == "ABQ") {		
					itemprice = getPriceAbq(theitem, thequantity);					
				}
				
				else if (whichitem.substring(0,7) == "Digital") {		
					itemprice = getPriceDpb(theitem, thequantity);					
				}else {	
					itemprice = getPrice(thequantity, thesize);
				}
	
				itemtotal = formatDecimal((eval(itemprice * thequantity)), true, 2);

				subTotal = (eval(parseFloat(subTotal)) + (parseFloat(itemtotal)));

				subTotalShow = formatDecimal(subTotal, true, 2);

				itemlist=itemlist+1;

 				// sets anchor for whichitem
			  	goOrderPage(whichitem);

				// checks for invalid qty and flags item in red
				if (turnItemRed == 1)	{
					document.write('<tr><td ALIGN="center"><FONT COLOR="#FF0000"><BLINK>'+theitem+'</BLINK></FONT></td>');
				} else {
				    document.write('<tr><td ALIGN="center">'+theitem+'</td>')
				}

				document.write('<td ALIGN="center"><A HREF="'+go+'" TARGET="_self">'+whichitem+'</A></td>');
				
				//CODED BY ALF 07/09/06
				if ((whichitem == "Accessories") || (whichitem == "Frames") || (whichitem == "Magnetic Vehicle Sign") || (whichitem == "Decals")
				  	|| (whichitem == "Economy Directional Open House") || (whichitem == "Economy Directional For Sale") 
					|| (whichitem == "ED Sign Step1") || (whichitem == "ED Sign Step2") || (whichitem == "Die Cut House FOR SALE") 
					|| (whichitem == "Die Cut House OPEN HOUSE") || (whichitem == "Die Cut Arrow FOR SALE") 
					|| (whichitem == "Die Cut Arrow OPEN HOUSE") || (whichitem == "Open House Sign") || (whichitem == "Open House Sign Frame") 
					|| (whichitem == "Sign Panel 432") || (whichitem == "Sign Panel 560") || (whichitem == "Sign Panel 864") 
					|| (whichitem == "Sign Panel & Esquire Frame Combo1") || (whichitem == "Sign Panel & Esquire Frame Combo2") 
					|| (whichitem == "Sign Panel & Castle Frame Combo1") || (whichitem == "Sign Panel & Castle Frame Combo2") 
					|| (whichitem == "Sign Panel & Castle Frame Combo3") || (whichitem == "Sign Panel & Castle Frame Combo4") 
					|| (whichitem == "Sign Panel & Castle Frame Combo5") || (whichitem == "Deluxe Directional Open House") 
					|| (whichitem == "Deluxe Directional For Sale") || (whichitem == "Deluxe Directional Open House Combo") 
					|| (whichitem == "Deluxe Directional For Sale Combo") || (whichitem == "Agent Name Rider1") || (whichitem == "Agent Name Rider2") 
					|| (whichitem == "Reflective Agent Name Rider1") || (whichitem == "Reflective Agent Name Rider2") 
					|| (whichitem == "Flexible Sign Open House") || (whichitem == "Flexible Sign For Sale") || (whichitem == "Plastic 1") 
					|| (whichitem == "Plastic 2") || (whichitem == "Plastic 3") || (whichitem == "Wooden 1") || (whichitem == "Wooden 2") 
					|| (whichitem == "Wooden 3") || (whichitem == "Metal") || (whichitem == "Flat Rate Yard Sign Panel") 

					|| (whichitem == "Executives Banner Hanger Kit") || (whichitem == "Executives Solar Information Dispenser"))
			   	{
					document.write('<td align=center><INPUT TYPE=TEXT NAME="quant'+itemlist+'" VALUE="'+thequantity+'" SIZE=3></td><td align=center>'+thesize+'</td><td align=center>'+thecolor+' '+thebgcolor+'</td><td align=center><FONT SIZE="2">'+thecopy1+'</FONT></td><td align=center><FONT SIZE="2">'+thecopy2+'</FONT></td><td align=right>'+itemprice+'</td>')
 				} else if ((whichitem == "EZPost") || (whichitem == "Infopak")) {
					document.write('<td align=center><INPUT TYPE=TEXT NAME="quant'+itemlist+'" VALUE="'+thequantity+'" SIZE=3></td><td>&nbsp;</td><td align=center>'+thecolor+' '+thebgcolor+'</td><td align=center><FONT SIZE="2">'+thecopy1+'</FONT></td><td align=center><FONT SIZE="2">'+thecopy2+'</FONT></td><td align=right>'+itemprice+'</td>')
				} else {
					document.write('<td align=center><INPUT TYPE=TEXT NAME="quant'+itemlist+'" VALUE="'+thequantity+'" SIZE=3></td><td align=center>'+thesize+'</td><td align=center>'+thecolor+'  '+thebgcolor+'</td><td align=center><FONT SIZE="2">'+thecopy1+'</FONT></td><td align=center><FONT SIZE="2">'+thecopy2+'</FONT></td><td align=right>'+itemprice+'</td>')
				}
				  
  				document.write('<td align=right>'+itemtotal+'</td>')
				document.write('<TD><a href="javascript:removeItem('+itemlist+')">Remove</a>&nbsp;<a href="javascript:updateItem('+itemlist+',document.updateform.quant'+itemlist+'.value)">Update</a></td></tr>');
			
			} else if (fulllist.substring(i,i+1) == '|') { // parce the item into fields
				if (thisitem==1) theitem = fulllist.substring(itemstart, i);
				if (thisitem==2) whichitem = fulllist.substring(itemstart, i);
				if (thisitem==3) thesize = fulllist.substring(itemstart, i);
				if (thisitem==4) thecolor = fulllist.substring(itemstart, i);
				if (thisitem==5) thebgcolor = fulllist.substring(itemstart, i);
				if (thisitem==6) thecopy1 = fulllist.substring(itemstart, i);
				if (thisitem==7) thecopy2 = fulllist.substring(itemstart, i);
				
				thisitem++;
				itemstart=i+1;
			}
		} //for
		document.write('<tr><td align=right COLSPAN=8>Subtotal:</td>')
		document.write('<td align=right>'+subTotalShow+'</td>')
		document.write('<TD></td></tr>');
		document.writeln('</TABLE>');
		document.writeln('</FORM>');
	}
//-------------------------------------------------------------------------------------------------------------------------------
// updateItem() updates the cart when quantities are changed
function updateItem(itemno, newquant)
	{
		// check user input for validity
		if(!validQty(newquant)){
			return;
		}
	
		newItemList = null;
		itemlist = 0;
		
		for (var i = 0; i <= fulllist.length; i++)
		{
			if (fulllist.substring(i,i+1) == '['){ //found beginning of order detail
				thisitem = 1;
				itemstart = i+1;
				fullstart = i+1;
			} else if (fulllist.substring(i,i+1) == ']') { //found end of order detail
				itemend = i;
				itemlist=itemlist+1;

				// used in totalMsgrider value computation
				thequantity = fulllist.substring(itemstart, itemend);
				
				if (itemlist != itemno)
				{
					newItemList = newItemList+'['+fulllist.substring(fullstart, itemend)+']';
				} else { //add modified order detail to cookie
					var theitem5 = theitem.substr(0,5);
					var theitem4 = theitem.substr(0,4);
					switch (theitem.substr(0,2))
					{
						case "EX":
							if(theitem=="EXCS-S3248-2" || theitem=="EXSP-S1818-1" || theitem=="EXSP-T3248-2"
							   || theitem=="EXSP-T4848-2" || theitem=="EXSP-W3248-2" || theitem=="EXSP-W4848-2"
							   || theitem=="EXCA-S3248-2"){
								if (newquant != 1 && newquant != 2 && newquant != 4 && newquant != 6 && newquant != 12
									&& newquant != 24){
									newItemList = newItemList+'['+fulllist.substring(fullstart, itemend)+']';
									alert("Quantity must be 1, 2, 4, 6, 12, or 24.");
								} else {
									newItemList = newItemList + "["+theitem+"|"+whichitem+"|"+thesize+"|"+thecolor+"|"+thebgcolor+"|"+thecopy1+"|"+thecopy2+"|"+itemprice+"|"+itemtotal+"|"+newquant+"]";
								}
							} else if(theitem=="EXLP" || theitem=="EXLP-I"){
								if (newquant < 5){
									//newItemList = newItemList+'['+fulllist.substring(fullstart, itemend)+']';
									newItemList = newItemList + "["+theitem+"|"+whichitem+"|"+thesize+"|"+thecolor+"|"+thebgcolor+"|"+thecopy1+"|"+thecopy2+"|"+itemprice+"|"+itemtotal+"|5]";
									alert("The minimum order is 5 license plates.");
								} else {
									newItemList = newItemList + "["+theitem+"|"+whichitem+"|"+thesize+"|"+thecolor+"|"+thebgcolor+"|"+thecopy1+"|"+thecopy2+"|"+itemprice+"|"+itemtotal+"|"+newquant+"]";
								}
							} else if(theitem5=="EXPNR" || theitem5=="EXNRF" || theitem5=="EXSCO"  || theitem5=="EXDNR"
								){
								if (newquant != 5 && newquant != 10 && newquant != 15 && newquant != 25 && newquant != 50){
									newItemList = newItemList+'['+fulllist.substring(fullstart, itemend)+']';
									alert("Quantity must be 5, 10, 15, 25, or 50.");
								} else {
									newItemList = newItemList + "["+theitem+"|"+whichitem+"|"+thesize+"|"+thecolor+"|"+thebgcolor+"|"+thecopy1+"|"+thecopy2+"|"+itemprice+"|"+itemtotal+"|"+newquant+"]";
								}
							} else if(theitem5=="EXASP" || theitem5=="EXACA" || theitem5=="EXACR" || theitem5=="EXAES" 
								|| theitem5=="EXSP-" || theitem5=="EXCA-" ||  theitem5=="EXCR-" || theitem5=="EXES-"
								|| theitem5=="EXHFS" || theitem5=="EXHOH" || theitem5=="EXHFS" || theitem5=="EXAFS" || theitem5=="EXAOH"
								|| theitem5=="EXTWF" || theitem5=="EXTWO" || theitem5=="EXDPF" || theitem5=="EXDPO" 
								){
								if (newquant != 5 && newquant != 10 && newquant != 15 && newquant != 25 && newquant != 50){
									newItemList = newItemList+'['+fulllist.substring(fullstart, itemend)+']';
									alert("Quantity must be 5, 10, 15, 25, 50, or 100.");
								} else {
									newItemList = newItemList + "["+theitem+"|"+whichitem+"|"+thesize+"|"+thecolor+"|"+thebgcolor+"|"+thecopy1+"|"+thecopy2+"|"+itemprice+"|"+itemtotal+"|"+newquant+"]";
								}
							} else if(theitem5=="EXINF"){
								if (newquant != 6 && newquant != 12 && newquant != 24 && newquant != 48 && newquant != 96){
									newItemList = newItemList+'['+fulllist.substring(fullstart, itemend)+']';
									alert("Quantity must be 6, 12, 24, 48, or 96.");
								} else {
									newItemList = newItemList + "["+theitem+"|"+whichitem+"|"+thesize+"|"+thecolor+"|"+thebgcolor+"|"+thecopy1+"|"+thecopy2+"|"+itemprice+"|"+itemtotal+"|"+newquant+"]";
								}
							} else if(theitem5=="EXR-D"){
								if (newquant != 1 && newquant != 2 && newquant != 3 && newquant != 5){
									newItemList = newItemList+'['+fulllist.substring(fullstart, itemend)+']';
									alert("Quantity must be 1, 2, 3, or 5.");
								} else {
									newItemList = newItemList + "["+theitem+"|"+whichitem+"|"+thesize+"|"+thecolor+"|"+thebgcolor+"|"+thecopy1+"|"+thecopy2+"|"+itemprice+"|"+itemtotal+"|"+newquant+"]";
								}
							} else if(theitem5=="EXR-M"){
								if (newquant != 2 && newquant != 4 && newquant != 6 && newquant != 10){
									newItemList = newItemList+'['+fulllist.substring(fullstart, itemend)+']';
									alert("Quantity must be 2, 4, 6, or 10.");
								} else {
									newItemList = newItemList + "["+theitem+"|"+whichitem+"|"+thesize+"|"+thecolor+"|"+thebgcolor+"|"+thecopy1+"|"+thecopy2+"|"+itemprice+"|"+itemtotal+"|"+newquant+"]";
								}
							} else if(theitem5=="EXMG-"){
								if (newquant != 2 && newquant != 4 && newquant != 10 && newquant != 18 && newquant != 24 && newquant != 50){
									newItemList = newItemList+'['+fulllist.substring(fullstart, itemend)+']';
									alert("Quantity must be 2, 4, 10, 18, 24, or 50.");
								} else {
									newItemList = newItemList + "["+theitem+"|"+whichitem+"|"+thesize+"|"+thecolor+"|"+thebgcolor+"|"+thecopy1+"|"+thecopy2+"|"+itemprice+"|"+itemtotal+"|"+newquant+"]";
								}
							} else {
								newItemList = newItemList + "["+theitem+"|"+whichitem+"|"+thesize+"|"+thecolor+"|"+thebgcolor+"|"+thecopy1+"|"+thecopy2+"|"+itemprice+"|"+itemtotal+"|"+newquant+"]";
							}
							break;

//						default:
							
						case "RE":
							if(theitem=="REXLP" || theitem=="REXLP-I"){
								if (newquant < 5){
									//newItemList = newItemList+'['+fulllist.substring(fullstart, itemend)+']';
									newItemList = newItemList + "["+theitem+"|"+whichitem+"|"+thesize+"|"+thecolor+"|"+thebgcolor+"|"+thecopy1+"|"+thecopy2+"|"+itemprice+"|"+itemtotal+"|5]";
									alert("The minimum order is 5 license plates.");
								} else {
									newItemList = newItemList + "["+theitem+"|"+whichitem+"|"+thesize+"|"+thecolor+"|"+thebgcolor+"|"+thecopy1+"|"+thecopy2+"|"+itemprice+"|"+itemtotal+"|"+newquant+"]";
								}
							} else {
								newItemList = newItemList + "["+theitem+"|"+whichitem+"|"+thesize+"|"+thecolor+"|"+thebgcolor+"|"+thecopy1+"|"+thecopy2+"|"+itemprice+"|"+itemtotal+"|"+newquant+"]";
							}
							
	
							break;
//						default:
						case "EN":																			

							if(theitem4=="ENVS" || theitem4=="ENVC" || theitem4=="ENVH" 
							|| theitem4=="ENVA" || theitem4=="ENVR" || theitem4=="ENVP"){
								if (newquant < 5){
									//newItemList = newItemList+'['+fulllist.substring(fullstart, itemend)+']';
									newItemList = newItemList + "["+theitem+"|"+whichitem+"|"+thesize+"|"+thecolor+"|"+thebgcolor+"|"+thecopy1+"|"+thecopy2+"|"+itemprice+"|"+itemtotal+"|5]";
									alert("The minimum order is 5.");
								} else {
									newItemList = newItemList + "["+theitem+"|"+whichitem+"|"+thesize+"|"+thecolor+"|"+thebgcolor+"|"+thecopy1+"|"+thecopy2+"|"+itemprice+"|"+itemtotal+"|"+newquant+"]";
								}
							} 
							
						 	else if(theitem5=="ENVMG"){
								if (newquant < 2){
									//newItemList = newItemList+'['+fulllist.substring(fullstart, itemend)+']';
									newItemList = newItemList + "["+theitem+"|"+whichitem+"|"+thesize+"|"+thecolor+"|"+thebgcolor+"|"+thecopy1+"|"+thecopy2+"|"+itemprice+"|"+itemtotal+"|2]";
									alert("The minimum order is 2 Magnetics.");
								} else {
									newItemList = newItemList + "["+theitem+"|"+whichitem+"|"+thesize+"|"+thecolor+"|"+thebgcolor+"|"+thecopy1+"|"+thecopy2+"|"+itemprice+"|"+itemtotal+"|"+newquant+"]";
								}
	  						}							
							
						else if(theitem5=="ENVCS"){
								if (newquant < 1){
									//newItemList = newItemList+'['+fulllist.substring(fullstart, itemend)+']';
									newItemList = newItemList + "["+theitem+"|"+whichitem+"|"+thesize+"|"+thecolor+"|"+thebgcolor+"|"+thecopy1+"|"+thecopy2+"|"+itemprice+"|"+itemtotal+"|5]";
									alert("The minimum order is 1 Coro Stake.");
								} else {
									newItemList = newItemList + "["+theitem+"|"+whichitem+"|"+thesize+"|"+thecolor+"|"+thebgcolor+"|"+thecopy1+"|"+thecopy2+"|"+itemprice+"|"+itemtotal+"|"+newquant+"]";
								}
	  						} else {
								newItemList = newItemList + "["+theitem+"|"+whichitem+"|"+thesize+"|"+thecolor+"|"+thebgcolor+"|"+thecopy1+"|"+thecopy2+"|"+itemprice+"|"+itemtotal+"|"+newquant+"]";
							}							
							break;
						default:
							if(theitem=="REXLP" || theitem=="REXLP-I"){
								if (newquant < 5){
									//newItemList = newItemList+'['+fulllist.substring(fullstart, itemend)+']';
									newItemList = newItemList + "["+theitem+"|"+whichitem+"|"+thesize+"|"+thecolor+"|"+thebgcolor+"|"+thecopy1+"|"+thecopy2+"|"+itemprice+"|"+itemtotal+"|5]";
									alert("The minimum order is 5 license plates.");
								} else {
									newItemList = newItemList + "["+theitem+"|"+whichitem+"|"+thesize+"|"+thecolor+"|"+thebgcolor+"|"+thecopy1+"|"+thecopy2+"|"+itemprice+"|"+itemtotal+"|"+newquant+"]";
								}
							} else {
								newItemList = newItemList + "["+theitem+"|"+whichitem+"|"+thesize+"|"+thecolor+"|"+thebgcolor+"|"+thecopy1+"|"+thecopy2+"|"+itemprice+"|"+itemtotal+"|"+newquant+"]";
							}															
					}



					//Flat Rate reset
					if (whichitem == "Flat Rate Yard Sign Panel")
						{	totalFRYSPqty = getCookie('totalFRYSPqty');
							if (newquant < thequantity)
							{	totalFRYSPqty = (parseInt(totalFRYSPqty) - (parseInt(thequantity) -(parseInt(newquant))));
								setCookie('totalFRYSPqty',totalFRYSPqty)
							} else	{
								totalFRYSPqty = (parseInt(totalFRYSPqty) + (parseInt(newquant) -(parseInt(thequantity))));
								setCookie('totalFRYSPqty',totalFRYSPqty)
							}
						}
																		
						
//alert(whichitem + '  line 1261');	
					// resets totalMsgqty value to compensate for Message rider qty change
					if (whichitem.substr(0,14) == "Message Riders")
					{
						if (thesize == "4x18")
						{	totalMsgqty18 = getCookie('totalMsgqty18');
							if (newquant < thequantity)
							{	totalMsgqty18 = (parseInt(totalMsgqty18) - (parseInt(thequantity) -(parseInt(newquant))));
								setCookie('totalMsgqty18',totalMsgqty18)
							} else	{
								totalMsgqty18 = (parseInt(totalMsgqty18) + (parseInt(newquant) -(parseInt(thequantity))));
								setCookie('totalMsgqty18',totalMsgqty18)
							}
						}
	
						if (thesize == "6x24")
						{	totalMsgqty24 = getCookie('totalMsgqty24');
							if (newquant < thequantity)
							{
								totalMsgqty24 = (parseInt(totalMsgqty24) - (parseInt(thequantity) -(parseInt(newquant))));
								setCookie('totalMsgqty24',totalMsgqty24)
							} else	{
								totalMsgqty24 = (parseInt(totalMsgqty24) + (parseInt(newquant) -(parseInt(thequantity))));
								setCookie('totalMsgqty24',totalMsgqty24)
							}
						}
						
						if (thesize == "6x28")
						{	totalMsgqty28 = getCookie('totalMsgqty28');
							if (newquant < thequantity)
							{
								totalMsgqty28 = (parseInt(totalMsgqty28) - (parseInt(thequantity) -(parseInt(newquant))));
								setCookie('totalMsgqty28',totalMsgqty28)
							} else	{
								totalMsgqty28 = (parseInt(totalMsgqty28) + (parseInt(newquant) -(parseInt(thequantity))));
								setCookie('totalMsgqty28',totalMsgqty28)
							}
						}
						
						
						
						
					}	 

					// end of totalMsgqty reset
	
					// resets totalDirectionalqty value to compensate for Directional qty change
					if (whichitem == "Directionals")
					{
						if (thesize == "ESQUIRE")
						{	totalEsquireqty = getCookie('totalEsquireqty');
							if (newquant < thequantity)
							{	totalEsquireqty = (parseInt(totalEsquireqty) - (parseInt(thequantity) -(parseInt(newquant))));
								setCookie('totalEsquireqty',totalEsquireqty)
							} else	{
								totalEsquireqty = (parseInt(totalEsquireqty) + (parseInt(newquant) -(parseInt(thequantity))));
								setCookie('totalEsquireqty',totalEsquireqty)
							}
						}
	
						if (thesize == "SIDEWALK")
						{	totalSidewalkqty = getCookie('totalSidewalkqty');
							if (newquant < thequantity)
							{	totalSidewalkqty = (parseInt(totalSidewalkqty) - (parseInt(thequantity) -(parseInt(newquant))));
								setCookie('totalSidewalkqty',totalSidewalkqty)
							} else	{
								totalSidewalkqty = (parseInt(totalSidewalkqty) + (parseInt(newquant) -(parseInt(thequantity))));
								setCookie('totalSidewalkqty',totalSidewalkqty)
							}
						}
						
						if (thesize == "CASTLE")
						{	totalCastleqty = getCookie('totalCastleqty');
							if (newquant < thequantity)
							{	totalCastleqty = (parseInt(totalCastleqty) - (parseInt(thequantity) -(parseInt(newquant))));
								setCookie('totalCastleqty',totalCastleqty)
							} else	{
								totalCastleqty = (parseInt(totalCastleqty) + (parseInt(newquant) -(parseInt(thequantity))));
								setCookie('totalCastleqty',totalCastleqty)
							}
						}
	
						if (thesize == "BUDGET")
						{	totalBudgetqty = getCookie('totalBudgetqty');
							if (newquant < thequantity)
							{	totalBudgetqty = (parseInt(totalBudgetqty) - (parseInt(thequantity) -(parseInt(newquant))));
								setCookie('totalBudgetqty',totalBudgetqty)
							} else	{
								totalBudgetqty = (parseInt(totalBudgetqty) + (parseInt(newquant) -(parseInt(thequantity))));
								setCookie('totalBudgetqty',totalBudgetqty)
							}
						}
	
						if (thesize == "ECONOMY")
						{	totalEconomyqty = getCookie('totalEconomyqty');
							if (newquant < thequantity)
							{	totalEconomyqty = (parseInt(totalEconomyqty) - (parseInt(thequantity) -(parseInt(newquant))));
								setCookie('totalEconomyqty',totalEconomyqty)
							} else	{
								totalEconomyqty = (parseInt(totalEconomyqty) + (parseInt(newquant) -(parseInt(thequantity))));
								setCookie('totalEconomyqty',totalEconomyqty)
							}
						}
	
						if (thesize == "9x24")
						{	total9x24qty = getCookie('total9x24qty');
							if (newquant < thequantity)
							{	total9x24qty = (parseInt(total9x24qty) - (parseInt(thequantity) -(parseInt(newquant))));
								setCookie('total9x24qty',total9x24qty)
							} else	{
								total9x24qty = (parseInt(total9x24qty) + (parseInt(newquant) -(parseInt(thequantity))));
								setCookie('total9x24qty',total9x24qty)
							}
						}
	
						if (thesize == "12x18")
						{	total12x18qty = getCookie('total12x18qty');
							if (newquant < thequantity)
							{	total12x18qty = (parseInt(total12x18qty) - (parseInt(thequantity) -(parseInt(newquant))));
								setCookie('total12x18qty',total12x18qty)
							} else	{
								total12x18qty = (parseInt(total12x18qty) + (parseInt(newquant) -(parseInt(thequantity))));
								setCookie('total12x18qty',total12x18qty)
							}
						}
						
						if (thesize == "18x24")
						{	total18x24qty = getCookie('total18x24qty');
							if (newquant < thequantity)
							{	total18x24qty = (parseInt(total18x24qty) - (parseInt(thequantity) -(parseInt(newquant))));
								setCookie('total18x24qty',total18x24qty)
							} else	{
								total18x24qty = (parseInt(total18x24qty) + (parseInt(newquant) -(parseInt(thequantity))));
								setCookie('total18x24qty',total18x24qty)
							}
						}
					}	 				
					// resets totalFrameqty value to compensate for Frame qty change
					if (whichitem == "Frames")
					{
						if (theitem.substr(0,3) == "CAF")
						{	totalCastleFqty = getCookie('totalCastleFqty');
							if (newquant < thequantity)
							{	totalCastleFqty = (parseInt(totalCastleFqty) - (parseInt(thequantity) -(parseInt(newquant))));
								setCookie('totalCastleFqty',totalCastleFqty)
							} else	{
								totalCastleFqty = (parseInt(totalCastleFqty) + (parseInt(newquant) -(parseInt(thequantity))));
								setCookie('totalCastleFqty',totalCastleFqty)
							}
						}
	
						if (theitem.substr(0,3) == "CRF")
						{	totalCrownFqty = getCookie('totalCrownFqty');
							if (newquant < thequantity)
							{	totalCrownFqty = (parseInt(totalCrownFqty) - (parseInt(thequantity) -(parseInt(newquant))));
								setCookie('totalCrownFqty',totalCrownFqty)
							} else	{
								totalCrownFqty = (parseInt(totalCrownFqty) + (parseInt(newquant) -(parseInt(thequantity))));
								setCookie('totalCrownFqty',totalCrownFqty)
							}
						}
						
						if (theitem.substr(0,2) == "ES")
						{	totalEsquireFqty = getCookie('totalEsquireFqty');
							if (newquant < thequantity)
							{	totalEsquireFqty = (parseInt(totalEsquireFqty) - (parseInt(thequantity) -(parseInt(newquant))));
								setCookie('totalEsquireFqty',totalEsquireFqty)
							} else	{
								totalEsquireFqty = (parseInt(totalEsquireFqty) + (parseInt(newquant) -(parseInt(thequantity))));
								setCookie('totalEsquireFqty',totalEsquireFqty)
							}
						}
						
						if (theitem.substr(0,4) == "Coro")
						{	totalUtilityFqty = getCookie('totalUtilityFqty');
							if (newquant < thequantity)
							{	totalUtilityFqty = (parseInt(totalUtilityFqty) - (parseInt(thequantity) -(parseInt(newquant))));
								setCookie('totalUtilityFqty',totalUtilityFqty)
							} else	{
								totalUtilityFqty = (parseInt(totalUtilityFqty) + (parseInt(newquant) -(parseInt(thequantity))));
								setCookie('totalUtilityFqty',totalUtilityFqty)
							}
						}						
						
						
	
						if (theitem.substring(0,3) == "STK")
						{	totalUtilityFqty = getCookie('totalUtilityFqty');
							if (newquant < thequantity)
							{	totalUtilityFqty = (parseInt(totalUtilityFqty) - (parseInt(thequantity) -(parseInt(newquant))));
								setCookie('totalUtilityFqty',totalUtilityFqty)
							} else	{
								totalUtilityFqty = (parseInt(totalUtilityFqty) + (parseInt(newquant) -(parseInt(thequantity))));
								setCookie('totalUtilityFqty',totalUtilityFqty)
							}
						}			
					}	
					
				
					// resets totalHotqty value to compensate for Hot Products qty change
					if (whichitem == "Hot Products") {
						totalHotqty = getCookie('totalHotqty');
						if (newquant < thequantity) {	
							totalHotqty = (parseInt(totalHotqty) - (parseInt(thequantity) -(parseInt(newquant))));
							setCookie('totalHotqty',totalHotqty);
						} else {
							totalHotqty = (parseInt(totalHotqty) + (parseInt(newquant) -(parseInt(thequantity))));
							setCookie('totalHotqty',totalHotqty);
						}
					} // end of totalHotqty reset
				} // end add modified order detail to cookie
		
			} else if (fulllist.substring(i,i+1) == '|') {	//found field separator
				if (thisitem==1) theitem = fulllist.substring(itemstart, i);
				if (thisitem==2) whichitem = fulllist.substring(itemstart, i);
				if (thisitem==3) thesize = fulllist.substring(itemstart, i);
				if (thisitem==4) thecolor = fulllist.substring(itemstart, i);
				if (thisitem==5) thebgcolor = fulllist.substring(itemstart, i);
				if (thisitem==6) thecopy1 = fulllist.substring(itemstart, i);
				if (thisitem==7) thecopy2 = fulllist.substring(itemstart, i);										
				thisitem++;
				itemstart=i+1;
			} //else if
		} //for
				
		setCookie('ShopCart', newItemList);
		self.location = "shop_view_cart_abq.htm";
	} //function
	
	// removes items from cart
//-------------------------------------------------------------------------------------------------------------------------------
function removeItem(itemno)
	{
		newItemList = null;
		itemlist = 0;
		
		for (var i = 0; i <= fulllist.length; i++)
		{
			if (fulllist.substring(i,i+1) == '[')
			{	thisitem = 1;
				itemstart = i+1;
				fullstart = i+1;
			} else if (fulllist.substring(i,i+1) == ']')
			  {	itemend = i;
				itemlist=itemlist+1;
				
				// used in total Message rider value computation
				thequantity = fulllist.substring(itemstart, itemend);
				if (itemlist != itemno)
				{	newItemList = newItemList+'['+fulllist.substring(fullstart, itemend)+']';
				} else
				{
				 // resets totalMsgqty value to compensate for Message rider item removal
				  if (whichitem.substr(0,14) == "Message Riders")
				  {
					if (thesize == "4x18")
					{
						totalMsgqty18 = getCookie('totalMsgqty18');
						totalMsgqty18 = (parseInt(totalMsgqty18) - parseInt(thequantity));
						setCookie('totalMsgqty18',totalMsgqty18);
					}

					if (thesize == "6x24")
					{
						totalMsgqty24 = getCookie('totalMsgqty24');
						totalMsgqty24 = (parseInt(totalMsgqty24) - parseInt(thequantity));
						setCookie('totalMsgqty24',totalMsgqty24);
					}
					
					if (thesize == "6x28")
					{
						totalMsgqty28 = getCookie('totalMsgqty28');
						totalMsgqty28 = (parseInt(totalMsgqty28) - parseInt(thequantity));
						setCookie('totalMsgqty28',totalMsgqty28);
					}					
					
					
				  }	

					 // end of totalMsgqty reset
					//resets totalDirectionalqty value to compensate for Directional item removal   
				if (whichitem == "Directionals")
				  {
					if (thesize == "ESQUIRE")
					{
						totalEsquireqty = getCookie('totalEsquireqty');
						totalEsquireqty = (parseInt(totalEsquireqty) - parseInt(thequantity));
						setCookie('totalEsquireqty',totalEsquireqty);
					}

					if (thesize == "SIDEWALK")
					{
						totalSidewalkqty = getCookie('totalSidewalkqty');
						totalSidewalkqty = (parseInt(totalSidewalkqty) - parseInt(thequantity));
						setCookie('totalSidewalkqty',totalSidewalkqty);
					}

					if (thesize == "CASTLE")
					{
						totalCastleqty = getCookie('totalCastleqty');
						totalCastleqty = (parseInt(totalCastleqty) - parseInt(thequantity));
						setCookie('totalCastleqty',totalCastleqty);
					}

					if (thesize == "BUDGET")
					{
						totalBudgetqty = getCookie('totalBudgetqty');
						totalBudgetqty = (parseInt(totalBudgetqty) - parseInt(thequantity));
						setCookie('totalBudgetqty',totalBudgetqty);
					}
					
					if (thesize == "ECONOMY")
					{
						totalEconomyqty = getCookie('totalEconomyqty');
						totalEconomyqty = (parseInt(totalEconomyqty) - parseInt(thequantity));
						setCookie('totalEconomyqty',totalEconomyqty);
					}

					if (thesize == "9x24")
					{
						total9x24qty = getCookie('total9x24qty');
						total9x24qty = (parseInt(total9x24qty) - parseInt(thequantity));
						setCookie('total9x24qty',total9x24qty);
					}

					if (thesize == "12x18")
					{
						total12x18qty = getCookie('total12x18qty');
						total12x18qty = (parseInt(total12x18qty) - parseInt(thequantity));
						setCookie('total12x18qty',total12x18qty);
					}

					if (thesize == "18x24")
					{
						total18x24qty = getCookie('total18x24qty');
						total18x24qty = (parseInt(total18x24qty) - parseInt(thequantity));
						setCookie('total118x24qty',total18x24qty);
					}

				  }	

 
				 // end of totalDirectionalqty reset

				//resets totalFrameqty value to compensate for Frames item removal   
				if (whichitem == "Frames")
				  {  
					if (theitem.substr(0,3) == "CAF")
					{
						totalCastleFqty = getCookie('totalCastleFqty');
						totalCastleFqty = (parseInt(totalCastleFqty) - parseInt(thequantity));
						setCookie('totalCastleFqty',totalCastleFqty);
					}

					if (theitem.substr(0,3) == "CRF")
					{
						totalCrownFqty = getCookie('totalCrownFqty');
						totalCrownFqty = (parseInt(totalCrownFqty) - parseInt(thequantity));
						setCookie('totalCrownFqty',totalCrownFqty);
					}

					if (theitem.substr(0,2) == "ES")
					{
						totalEsquireFqty = getCookie('totalEsquireFqty');
						totalEsquireFqty = (parseInt(totalEsquireFqty) - parseInt(thequantity));
						setCookie('totalEsquireFqty',totalEsquireFqty);
					}
					
					if (theitem.substr(0,4) == "Coro")
					{
						totalUtilityFqty = getCookie('totalUtilityFqty');
						totalUtilityFqty = (parseInt(totalUtilityFqty) - parseInt(thequantity));
						setCookie('totalUtilityFqty',totalUtilityFqty);
					}					

					if (theitem.substr(0,3) == "STK")
					{
						totalUtilityFqty = getCookie('totalUtilityFqty');
						totalUtilityFqty = (parseInt(totalUtilityFqty) - parseInt(thequantity));
						setCookie('totalUtilityFqty',totalUtilityFqty);
					}
																									
				  }	

				// end of totalFrameqty reset

				//resets totalHotqty value to compensate for Hot Products item removal   
				if (whichitem == "Hot Products")
				{
					totalHotqty = getCookie('totalHotqty');
					totalHotqty = (parseInt(totalHotqty) - (parseInt(thequantity)));
					setCookie('totalHotqty',totalHotqty)
				}	 

				// end of totalHotqty reset

				}

			} else if (fulllist.substring(i,i+1) == '|')
			  {
				if (thisitem==1) theitem = fulllist.substring(itemstart, i);
				if (thisitem==2) whichitem = fulllist.substring(itemstart, i);
				if (thisitem==3) thesize = fulllist.substring(itemstart, i);
				if (thisitem==4) thecolor = fulllist.substring(itemstart, i);
				if (thisitem==5) thebgcolor = fulllist.substring(itemstart, i);
				if (thisitem==6) thecopy1 = fulllist.substring(itemstart, i);
				if (thisitem==7) thecopy2 = fulllist.substring(itemstart, i);										
				thisitem++;
				itemstart=i+1;
			  }
		}
		
		setCookie('ShopCart',newItemList);
		self.location = "shop_view_cart_abq.htm";
	}
//-------------------------------------------------------------------------------------------------------------------------------
function goOrderPage(whereTo)
	{
		go = "index.htm";
/*		
		if (whereTo == "Business")
			go = "business.htm";
		if (whereTo == "Photo Riders")
			go = "shop_photo_riders.htm";
		if (whereTo == "Reflective Riders")
			go = "shop_reflective_name_riders.htm";
		if (whereTo == "Message Riders")
			go = "shop_message_riders.htm";
		if (whereTo == "Message Riders - Bilingual")
			go = "shop_bilingual_riders.htm";					
		if (whereTo == "Magnetic Riders")
			go = "shop_mag_riders.htm";
		if (whereTo == "Banner")
			go = "shop_banners_pennants.htm";
		if (whereTo == "Pennant")
			go = "shop_banners_pennants.htm";
		if (whereTo == "PP Open House")
			go = "shop_banners_pennants.htm";
		if (whereTo == "Directionals")
			go = "shop_direction_main.htm";
		if (whereTo == "Frames")
			go = "frames_main.htm";
		if (whereTo == "Accessories")
			go = "shop_accessories.htm";
		if (whereTo == "INFOLine")
			go = "/infoline/index.htm";			
			
		if (whereTo == "Hot Products")
			go = "shop_hot_new_products.htm";
		if (whereTo == "Decals")

		if (whereTo == "Magnetic Vehicle Sign")
			go = "car_magnetics.htm";
		if (whereTo == "Economy Directional Open House")
			go = "economy_directional_.htm";
		if (whereTo == "Economy Directional For Sale")
			go = "economy_directional_.htm";
		if (whereTo == "ED Sign Step1")
			go = "economy_directional_.htm";
		if (whereTo == "ED Sign Step2")
			go = "economy_directional_.htm";
		if (whereTo == "Die Cut House FOR SALE")
			go = "economy_directional_.htm";
		if (whereTo == "Die Cut House OPEN HOUSE")
			go = "economy_directional_.htm";
		if (whereTo == "Die Cut Arrow FOR SALE")
			go = "economy_directional_.htm";
		if (whereTo == "Die Cut Arrow OPEN HOUSE")
			go = "economy_directional_.htm";
		if (whereTo == "Open House Sign")
			go = "openhouse.htm";
		if (whereTo == "Open House Sign Frame")
			go = "openhouse.htm";
		if (whereTo == "Sign Panel 432")
			go = "yardsign.htm";
		if (whereTo == "Sign Panel 560")
			go = "yardsign.htm";
		if (whereTo == "Sign Panel 864")
			go = "yardsign.htm";
		if (whereTo == "Sign Panel & Esquire Frame Combo1")
			go = "yardsign.htm";
		if (whereTo == "Sign Panel & Esquire Frame Combo2")
			go = "yardsign.htm";
		if (whereTo == "Sign Panel & Castle Frame Combo1")
			go = "yardsign.htm";
		if (whereTo == "Sign Panel & Castle Frame Combo2")
			go = "yardsign.htm";
		if (whereTo == "Sign Panel & Castle Frame Combo3")
			go = "yardsign.htm";
		if (whereTo == "Sign Panel & Castle Frame Combo4")
			go = "yardsign.htm";
		if (whereTo == "Sign Panel & Castle Frame Combo5")
			go = "yardsign.htm";
		if (whereTo == "Deluxe Directional Open House")
			go = "deluxe_directional.htm";
		if (whereTo == "Deluxe Directional For Sale")
			go = "deluxe_directional.htm";
		if (whereTo == "Deluxe Directional Open House Combo")
			go = "deluxe_directional.htm";
		if (whereTo == "Deluxe Directional For Sale Combo")
			go = "deluxe_directional.htm";
		if (whereTo == "Agent Name Rider1")
			go = "nameriders.htm";
		if (whereTo == "Agent Name Rider2")
			go = "nameriders.htm";
		if (whereTo == "Reflective Agent Name Rider1")
			go = "nameriders.htm";
		if (whereTo == "Reflective Agent Name Rider2")
			go = "nameriders.htm";
		if (whereTo == "Flexible Sign Open House")
			go = "flex_sign.htm";
		if (whereTo == "Flexible Sign For Sale")
			go = "flex_sign.htm";
		if (whereTo == "Plastic 1")
			go = "EconomyLarge.htm";
		if (whereTo == "Plastic 2")
			go = "EconomyLarge.htm";
		if (whereTo == "Plastic 3")
			go = "EconomyLarge.htm";
		if (whereTo == "Wooden 1")
			go = "woodsign.htm";
		if (whereTo == "Wooden 2")
			go = "woodsign.htm";
		if (whereTo == "Wooden 3")
			go = "woodsign.htm";
		if (whereTo == "Metal")
			go = "metal_site.htm";
*/
		return go;
	}

//-------------------------------------------------------------------------------------------------------------------------------
// getPrice() calculates price as a function of qty and size
function getPrice(qty,size)
	{
		newPrice = 0;


		if (whichitem == "Message Riders")
		{
	 		if (size == "4x18")
			{
				totalMsgqty = getCookie('totalMsgqty18');

				// validates Message rider qty
				if (totalMsgqty < 5)
				{
					alert('INVALID QUANTITY for Item # '+(itemlist+1)+'. \nYou need to order '+(5 - parseInt(totalMsgqty))+' additional 4x18 message riders to meet the minimum quantity of 5. You will not be allowed to checkout until this is corrected. Please enter a valid quantity and hit the "UPDATE" feature on the shopping cart OR return to the Message Riders order page to add additional riders.');
					// sets flag for incorrect qty
					turnItemRed = 1;
					invalidQty = 1;
				} else
				{ 
					if (totalMsgqty >= 5 && totalMsgqty < 10 ) {
						newPrice = 4.25 }
					if (totalMsgqty >= 10) {
						newPrice = 3.60 }
				}
			}
				
			if (size == "6x24")
			{
				totalMsgqty = getCookie('totalMsgqty24');
				// validates Message rider qty
				if (totalMsgqty < 5)
				{
					alert('INVALID QUANTITY for Item # '+(itemlist+1)+'. \nYou need to order '+(5 - parseInt(totalMsgqty))+' additional 6x24 message riders to meet the minimum quantity of 5. You will not be allowed to checkout until this is corrected. Please enter a valid quantity and hit the "UPDATE" feature on the shopping cart OR return to the Message Riders order page to add additional riders.');
					// sets flag for incorrect qty
					turnItemRed = 1;
					invalidQty = 1;
				} else
				{
					if (totalMsgqty >= 5 && totalMsgqty < 10 ) {
						newPrice = 4.50 }
					if (totalMsgqty >= 10) {
						newPrice = 3.85 }
				}
			}
			
			
			if (size == "6x28")
			{
				totalMsgqty = getCookie('totalMsgqty28');
				// validates Message rider qty
				if (totalMsgqty < 5)
				{
					alert('INVALID QUANTITY for Item # '+(itemlist+1)+'. \nYou need to order '+(5 - parseInt(totalMsgqty))+' additional 6x28  message riders to meet the minimum quantity of 5. You will not be allowed to checkout until this is corrected. Please enter a valid quantity and hit the "UPDATE" feature on the shopping cart OR return to the Message Riders order page to add additional riders.');
					// sets flag for incorrect qty
					turnItemRed = 1;
					invalidQty = 1;
				} else
				{
					if (totalMsgqty >= 5 && totalMsgqty < 10 ) {
						newPrice = 5.50 }
					if (totalMsgqty >= 10) {
						newPrice = 4.95 }
				}
			}
			
			
		}
		if (whichitem == "Message Riders - Bilingual")
		{			
			if (size == "6x24")
			{
				totalMsgqty = getCookie('totalMsgqty24');
				// validates Message rider qty
				if (totalMsgqty < 5)
				{
					alert('INVALID QUANTITY for Item # '+(itemlist+1)+'. \nYou need to order '+(5 - parseInt(totalMsgqty))+' additional 6x24 message riders to meet the minimum quantity of 5. You will not be allowed to checkout until this is corrected. Please enter a valid quantity and hit the "UPDATE" feature on the shopping cart OR return to the Message Riders order page to add additional riders.');
					// sets flag for incorrect qty
					turnItemRed = 1;
					invalidQty = 1;
				} else
				{
					if (totalMsgqty >= 5 && totalMsgqty < 10 ) {
						newPrice = 4.50 }
					if (totalMsgqty >= 10) {
						newPrice = 3.85 }
				}
			}			
			if (size == "6x28")
			{
				totalMsgqty = getCookie('totalMsgqty28');
				// validates Message rider qty
				if (totalMsgqty < 5)
				{
					alert('INVALID QUANTITY for Item # '+(itemlist+1)+'. \nYou need to order '+(5 - parseInt(totalMsgqty))+' additional 6x28  message riders to meet the minimum quantity of 5. You will not be allowed to checkout until this is corrected. Please enter a valid quantity and hit the "UPDATE" feature on the shopping cart OR return to the Message Riders order page to add additional riders.');
					// sets flag for incorrect qty
					turnItemRed = 1;
					invalidQty = 1;
				} else
				{
					if (totalMsgqty >= 5 && totalMsgqty < 10 ) {
						newPrice = 5.50 }
					if (totalMsgqty >= 10) {
						newPrice = 4.95 }
				}
			}			
		}

		if (whichitem == "Magnetic Riders")
		{					

			// validates minimum agent rider qty
			if (qty < 5)
			{
				alert('INVALID QUANTITY for Item # '+(itemlist+1)+'. \nMagnetic Riders have a minimum quantity of 5. Please enter a valid quantity and hit the "UPDATE" feature on the shopping cart.');
				newPrice = 0;
	
				// sets flags for incorrect qty
				turnItemRed = 1;
				invalidQty = 1;
			} else
			{	if (qty >= 5 && qty <= 9) {
					newPrice = 4.95 }
				if (qty >= 10 && qty <=14) {
					newPrice = 4.50 }
				if (qty >= 14 && qty <=24) {
					newPrice = 3.75 }
				if (qty >= 25) {
					newPrice = 3.25 }
			}
		}
 
		if (whichitem == "Pennant")
		{	if (size == "30'")
			{	newPrice = 4.99 }
			if (size == "100'")
			{	newPrice = 14.99 }
        	}

		if (whichitem == "Banner")
		{	if (size == "3'x5'")
			{	newPrice = 34.95 }
			if (size == "3'x10'")
			{	newPrice = 59.95 }
		} 

        if (whichitem == "PP Open House")
		{	totalOHPPqty = getCookie('totalOHPPqty');

			if (totalOHPPqty >= 1 && totalOHPPqty < 3 ) {
				newPrice = 32.50 }
			if (totalOHPPqty >= 3 && totalOHPPqty < 5) {
				newPrice = 29.50 }
			if (totalOHPPqty >= 5) {
				newPrice = 24.50 }
		}
		
		// formats output to 2 decimals using formatDecimal()
		newPrice = formatDecimal(newPrice, true, 2);
		return newPrice;
	}

//-------------------------------------------------------------------------------------------------------------------------------	
// getPriceitem() calculates price as ? function of qty and item
function getPriceitem(qty,item)
	{	newPrice = 0;

	if (whichitem == "Accessories")
		{	if (item == "INFOPAK")
			{	if (qty >= 1 && qty <= 2) {
					newPrice = 6.99 }
				if (qty >= 3 ) {
					newPrice = 5.99 }
			}
			
			if (item == "INFOTUBE")
			{	if (qty >= 1 && qty <= 2) {
					newPrice = 9.95 }
				if (qty >= 3 ) {
					newPrice = 8.99 }
			}
			
			if (item == "ARROWS")
			{	newPrice = 3.95
			}

			if (item == "SLIPCOVER")
			{	if (qty >= 1 && qty <= 5) {
					newPrice = 3.99 }
				if (qty >= 6 ) {
					newPrice = 2.99 }
			}
	
			if (item == "FASTENERS")
			{	newPrice = 3.99
			}
			if (item == "INFO TO GO")
			{	if (qty >= 1 && qty <= 2) {
					newPrice = 19.95 }
				if (qty >= 3 ) {
					newPrice = 17.95 }
			}
			if (item == "INFO BOX")
			{	if (qty >= 1 && qty <= 2) {
					newPrice = 14.95 }
				if (qty >= 3 && qty <= 5) {
					newPrice = 12.95 }				
				if (qty >= 6 ) {
					newPrice = 7.88 }
			}
			if (item == "FLYER DISPENSER")
			{	if (qty >= 1 && qty <= 2) {
					newPrice = 14.95 }
				if (qty >= 3 ) {
					newPrice = 12.95 }
			}
			if (item == "INFO BOX with STAKE")
			
			// validates minimum INFO BOX with STAKE qty
			if (qty < 3)
			{
				alert('INVALID QUANTITY for Item # '+(itemlist+1)+'. \nINFO BOX with STAKE have a minimum quantity of 3 each. Please enter a valid quantity and hit the "UPDATE" feature on the shopping cart.');
				newPrice = 0; }
			else					
			{	if (qty >= 1 && qty <= 2) {
					newPrice = 22.98 }
				if (qty >= 3 && qty <= 5) {
					newPrice = 18.98 }				
				if (qty >= 6 ) {
					newPrice = 12.98 }
			}
			if (item == "SHURLOK")
			{	if (qty >= 1 && qty <= 2) {
					newPrice = 19.88 }
				if (qty >= 3 ) {
					newPrice = 14.88 }
			}
			if (item == "ShurLok Lever Grip")
			{	newPrice = 3.95
			}
			if (item == "ShurLok Message Tag")
			{	newPrice = 1.95
			}
			if (item == "Card Caddie")
			{	newPrice = 14.95
			}									
			
			if (item == "BrightFlyer")
			{	if (qty >= 1 && qty <= 5) {
					newPrice = 29.95 }
				if (qty >= 6 && qty <= 23) {
					newPrice = 27.95 }					
				if (qty >= 24 ) {
					newPrice = 21.95 }
			}			

			if (item == "House Flyer Dispenser")
			{	newPrice = 4.88
			}




			if (item == "COLONIAL POST")
			{	if (qty >= 1 && qty <= 3) {
					newPrice = 34.95 }	
				if (qty >= 4 ) {
					newPrice = 24.95 }
			}
			if (item == "HANDY POST")
			{	if (qty >= 1 && qty <= 3) {
					newPrice = 29.88 }	
				if (qty >= 4 ) {
					newPrice = 19.88 }
			}
			
			if (item == "E Z POST")
			// validates minimum E Z POST qty		
	//		if (qty = -2 ) //Price change JO 2/28/2007 remove groups of 2
 //
//			{
//				alert('INVALID QUANTITY for Item # '+(itemlist+1)+'. \nE Z POSTS must be ordered in GROUPS OF 2. Please enter a valid quantity and hit the "UPDATE" feature on the shopping cart.');
//				newPrice = 0; }
//			else					
			{	if (qty >= 1 && qty <=3) {
					newPrice = 59.95 }	
				if (qty >= 4 ) {
					newPrice = 54.88 }
			}		


		if (item == "cbumper")

			// validates minimum FSBO_local products qty
			if (qty < 10)
			{
				alert('INVALID QUANTITY for Item # '+(itemlist+1)+'. \nFSBO Local Products have a minimum quantity of 10 each. Please enter a valid quantity and hit the "UPDATE" feature on the shopping cart.');
				newPrice = 0; }
			else
			
					
			{	if (qty >= 10 && qty <= 24) {
					newPrice = 2.00 }
				if (qty >= 25 && qty <= 49) {
					newPrice = 1.50 }				
				if (qty >= 50 ) {
					newPrice = 1.00 }
			}
		}

	
		//######################################################

		if (whichitem == "Frames")
		{
	 		totalCastleFqty = getCookie('totalCastleFqty');
	 		totalCrownFqty = getCookie('totalCrownFqty');
	 		totalEsquireFqty = getCookie('totalEsquireFqty');
	 		totalUtilityFqty = getCookie('totalUtilityFqty');
	 		totalCoroFqty = getCookie('totalCoroFqty');
	 		
			if (isNaN(parseInt(totalCastleFqty)))  totalCastleFqty = 0;
			if (isNaN(parseInt(totalCrownFqty)))   totalCrownFqty = 0;
			if (isNaN(parseInt(totalEsquireFqty))) totalEsquireFqty = 0;
			if (isNaN(parseInt(totalUtilityFqty))) totalUtilityFqty = 0;
			if (isNaN(parseInt(totalCoroFqty))) totalCoroFqty = 0;			

			totalqty = parseInt(totalCastleFqty) + parseInt(totalCrownFqty) + parseInt(totalEsquireFqty) + parseInt(totalUtilityFqty);

  
			if (item.substr(0,3) == "CAF")
			{
	 			totalCastleFqty = getCookie('totalCastleFqty');

				// validates Castle Frames qty
				if (parseInt(totalqty) < 5)
				{
					alert('INVALID QUANTITY for Item # '+(itemlist+1)+'. \nYou need to order '+(5 - parseInt(totalqty))+' additional Frames to meet the minimum quantity of 5.  \nYou will not be allowed to checkout until this is corrected.  \n \nPlease enter a valid quantity and hit the "UPDATE" feature on the shopping cart OR return to the Frames order page to add additional products.');
					// sets flag for incorrect qty
					turnItemRed = 1;
					invalidQty = 1;
				 } else
				 {
					
					switch (item) {
						case "CAF1824" : {
							 newPrice = 14.00;
							 break;
						}
			 			case "CAF1830" : {
							 newPrice = 16.00;
							 break;
						}
				 		case "CAF2028" : {
							 newPrice = 16.00;
							 break;
						}
				 		case "CAF2424" : {
							 newPrice = 16.00;
							 break;
						}
        	                 		case "CAF2436" : {
							 newPrice = 18.50;
							 break;
						}
				 		case "CAF2418" : {
							 newPrice = 16.50;
							 break;
						}
					}
				 	
				 }
			}

			if (item.substr(0,3) == "CRF")
			{
	 			totalCrownFqty = getCookie('totalCrownFqty');

				// validates Crown Frames qty
				if (parseInt(totalqty) < 5)
				{
					alert('INVALID QUANTITY for Item # '+(itemlist+1)+'. \nYou need to order '+(5 - parseInt(totalqty))+' additional Frames to meet the minimum quantity of 5.  \nYou will not be allowed to checkout until this is corrected.  \n \nPlease enter a valid quantity and hit the "UPDATE" feature on the shopping cart OR return to the Frames order page to add additional products.');
					// sets flag for incorrect qty
					turnItemRed = 1;
					invalidQty = 1;
				} else {
					switch (item) {
						case "CRF1824" : {
							 newPrice = 17.00;
							 break;
						}
						case "CRF2028" : {
							 newPrice = 18.00;
							 break;
						}
 	 	                		case "CRF2424" : {
							 newPrice = 18.50;
							 break;
						}
			        		case "CRF2418" : {
							 newPrice = 20.00;
							 break;
						}
					}
				}
			}
	
			if (item.substr(0,2) == "ES")
			{
	 			totalEsquireFqty = getCookie('totalEsquireFqty');

				// validates Esquire Frames qty
				if (parseInt(totalqty) < 5)
				{
					alert('INVALID QUANTITY for Item # '+(itemlist+1)+'. \nYou need to order '+(5 - parseInt(totalqty))+' additional Frames to meet the minimum quantity of 5.  \nYou will not be allowed to checkout until this is corrected.  \n \nPlease enter a valid quantity and hit the "UPDATE" feature on the shopping cart OR return to the Frames order page to add additional products.');
					// sets flag for incorrect qty
					turnItemRed = 1;
					invalidQty = 1;
				} else {
					switch (item) {
						case "ES1218" : {
							 newPrice = 12.00;
							 break;
						}
						case "ES1824" : {
							 newPrice = 12.50;
							 break;
						}
			        		case "ES2028" : {
							 newPrice = 14.00;
							 break;
						}
			        		case "ES2418" : {
							 newPrice = 16.00;
							 break;
						}
					}
		 		}
			}
		
			if (item.substring(0,4) == "STK0")
			{
	 			totalUtilityFqty = getCookie('totalUtilityFqty');
	
				// validates Utility Frames qty
				if (parseInt(totalqty) < 5)
				{
					alert('INVALID QUANTITY for Item # '+(itemlist+1)+'. \nYou need to order '+(5 - parseInt(totalqty))+' additional Frames to meet the minimum quantity of 5.  \nYou will not be allowed to checkout until this is corrected.  \n \nPlease enter a valid quantity and hit the "UPDATE" feature on the shopping cart OR return to the Frames order page to add additional products.');
					// sets flag for incorrect qty
					turnItemRed = 1;
					invalidQty = 1;
				} 
				  else {
					switch (item) {
						case "STK012" : {
							 newPrice = 16.50;
							 break;
						}
						case "STK002" : {
							 newPrice = 9.75;
							 break;
						}
		        			case "STK003" : {
							 newPrice = 5.50;
							 break;
						}
		        			case "STK004" : {
							 newPrice = 8.50;
							 break;
						}
						case "STK013" : {
							 newPrice = 1.40;
							 break;
						}
						
					}
				}
			 }
			 
			if (item.substring(0,4) == "Coro" || item.substring(0,4) == "STKM")
			{
	 			totalUtilityFqty = getCookie('totalUtilityFqty');
	
				// validates Utility Frames qty
				if (parseInt(totalqty) < 1)
				{
//					alert('INVALID QUANTITY for Item # '+(itemlist+1)+'. \nYou need to order '+(5 - parseInt(totalqty))+' additional Frames to meet the minimum quantity of 5.  \nYou will not be allowed to checkout until this is corrected.  \n \nPlease enter a valid quantity and hit the "UPDATE" feature on the shopping cart OR return to the Frames order page to add additional products.');
					// sets flag for incorrect qty
					turnItemRed = 1;
//					invalidQty = 1;
				} 
				  else {
					switch (item) {
						case "CoroStakeRG" : {
							 newPrice = 1.40;
							 break;
						}
						case "CoroStakeHD" : {
							 newPrice = 2.50;
							 break;
						}
		        			case "CoroStakeSD" : {
							 newPrice = 5.95;
							 break;
						}
						case "STKMPS" : {
							 newPrice = 3.95;
							 break;
						}						

					}
				}
			 }			 
	
		}

		if (whichitem == "Decals")
		
		{	totalDecalsqty = getCookie('totalDecalsqty');

			if (totalDecalsqty >= 1 && totalDecalsqty <= 2) {
				newPrice = 4.99 }
			if (totalDecalsqty >= 3 && totalDecalsqty <= 4) {
				newPrice = 3.99 }
			if (totalDecalsqty >= 5 && totalDecalsqty <= 9) {
				newPrice = 3.50 }
			if (totalDecalsqty >= 10 ) {
				newPrice = 2.99 }
		}


		// formats output to 2 decimals using formatDecimal()
		newPrice = formatDecimal(newPrice, true, 2);
		return newPrice;
	}
//-------------------------------------------------------------------------------------------------------------------------------
	// getPhoto() calculates price as a function of qty and size and color
//-------------------------------------------------------------------------------------------------------------------------------
	// getPriceDir() calculates price as a function of qty, size, item, and copy2
	function getPriceDir(qty,size,item,copy)
	{
		newPrice = 0;

		if (whichitem == "Directionals")
		{	

			// validates Directionals qty
				
			if (size == "ESQUIRE")
			{
				totalEsquireqty = getCookie('totalEsquireqty');
				qty = totalEsquireqty;
	
				// validates minimum directional qty
				if (totalEsquireqty < 5)
				{
					// alert('INVALID QUANTITY for Item # '+(itemlist+1)+'. \nDirectionals have a minimum quantity of 5. Please enter a valid quantity and hit the "UPDATE" feature on the shopping cart.');
					newPrice = 0;
	
					// sets flags for incorrect qty
					turnItemRed = 1;
					invalidQty = 1;
				} else
				{
					if (totalEsquireqty  >= 5 && totalEsquireqty  <= 9) { 
					 	if (item == "Combo") {newPrice = 19.75 }
						if (item == "Frame") {newPrice = 11.50 }
					}
					if (totalEsquireqty  >= 10 && totalEsquireqty <= 14) {
					 	if (item == "Combo") {newPrice = 17.55 }
						if (item == "Frame") {newPrice = 10.95 }
					}
					if (totalEsquireqty  >= 15 && totalEsquireqty <= 24) {
					 	if (item == "Combo") {newPrice = 16.45 }
						if (item == "Frame") {newPrice = 9.95 }
					}
					if (totalEsquireqty  >= 25 && totalEsquireqty <= 49){
					 	if (item == "Combo") {newPrice = 15.35 }
						if (item == "Frame") {newPrice = 9.50 }
					}

					if (totalEsquireqty  >= 50) {
					 	if (item == "Combo") {newPrice = 14.50 }
						if (item == "Frame") {newPrice = 9.50 }
					}

				}
			}

			if (size == "SIDEWALK")
			{
				totalSidewalkqty = getCookie('totalSidewalkqty');
				qty = totalSidewalkqty;

				// validates minimum directional qty
				if (totalSidewalkqty < 5)
				{
					// alert('INVALID QUANTITY for Item # '+(itemlist+1)+'. \nDirectionals have a minimum quantity of 5. Please enter a valid quantity and hit the "UPDATE" feature on the shopping cart.');
					newPrice = 0;
	
					// sets flags for incorrect qty
					turnItemRed = 1;
					invalidQty = 1;
				} else
				{
					if (totalSidewalkqty  >= 5 && totalSidewalkqty <= 9) { 
					 	if (item == "Combo") {newPrice = 23.95 }
						if (item == "Frame") {newPrice = 12.50 }
					}
					if (totalSidewalkqty  >= 10 && totalSidewalkqty <= 14) {
					 	if (item == "Combo") {newPrice = 22.95 }
						if (item == "Frame") {newPrice = 12.00 }
					}
					if (totalSidewalkqty  >= 15 && totalSidewalkqty <= 24) {
					 	if (item == "Combo") {newPrice = 21.75 }
						if (item == "Frame") {newPrice = 11.75 }
					}
					if (totalSidewalkqty  >= 25 && totalSidewalkqty <= 49) {
					 	if (item == "Combo") {newPrice = 20.65 }
						if (item == "Frame") {newPrice = 11.25 }
					}
						if (totalSidewalkqty  >= 50) {
					 	if (item == "Combo") {newPrice = 19.95 }
						if (item == "Frame") {newPrice = 11.25 }

					}
				}
			}

			if (size == "CASTLE")
			{
				totalCastleqty = getCookie('totalCastleqty');
				qty = totalCastleqty;


				// validates minimum directional qty
				if (totalCastleqty < 5)
				{
					// alert('INVALID QUANTITY for Item # '+(itemlist+1)+'. \nDirectionals have a minimum quantity of 5. Please enter a valid quantity and hit the "UPDATE" feature on the shopping cart.');
					newPrice = 0;
	
					// sets flags for incorrect qty
					turnItemRed = 1;
					invalidQty = 1;
				} else
					{
					if (totalCastleqty >= 5 && totalCastleqty <= 9) { 
				 		if (item == "Combo") {newPrice = 22.95 }
						if (item == "Frame") {newPrice = 11.95 }
					}
					if (totalCastleqty >= 10 && totalCastleqty <= 14) {
				 		if (item == "Combo") {newPrice = 20.65 }
						if (item == "Frame") {newPrice = 10.95 }
					}
					if (totalCastleqty >= 15 && totalCastleqty <= 24) {
				 		if (item == "Combo") {newPrice = 19.50 }
						if (item == "Frame") {newPrice = 10.50 }
					}
					if (totalCastleqty >= 25 && totalCastleqty <= 49) {
				 		if (item == "Combo") {newPrice = 18.35 }
						if (item == "Frame") {newPrice = 9.95 }
					}
					if (totalCastleqty >= 50) {
				 		if (item == "Combo") {newPrice = 17.50 }
						if (item == "Frame") {newPrice = 9.95 }
					}
				}
			}	
		
			if (size == "ECONOMY")
			{
				totalEconomyqty = getCookie('totalEconomyqty');
				qty = totalEconomyqty;

				// validates minimum directional qty
				if (totalEconomyqty < 5)
				{
					// alert('INVALID QUANTITY for Item # '+(itemlist+1)+'. \nDirectionals have a minimum quantity of 5. Please enter a valid quantity and hit the "UPDATE" feature on the shopping cart.'); 
					newPrice = 0;
	
					// sets flags for incorrect qty
					turnItemRed = 1;
					invalidQty = 1;
				} else
					{
					if (totalEconomyqty >= 5 && totalEconomyqty <= 9) { 
				 		if (item == "Combo") {newPrice = 12.60 }
						if (item == "Frame") {newPrice = 5.50 }
					}
					if (totalEconomyqty >= 10 && totalEconomyqty <=14) {
				 		if (item == "Combo") {newPrice = 11.50 }
						if (item == "Frame") {newPrice = 4.50 }
					}
					if (totalEconomyqty >= 15 && totalEconomyqty <=24) {
					 	if (item == "Combo") {newPrice = 10.95 }
						if (item == "Frame") {newPrice = 4.00 }
					}
					if (totalEconomyqty >= 25 && totalEconomyqty <=49) {
					 	if (item == "Combo") {newPrice = 10.25 }
						if (item == "Frame") {newPrice = 3.50 }
					}
					if (totalEconomyqty >= 50) {
					 	if (item == "Combo") {newPrice = 9.50 }
						if (item == "Frame") {newPrice = 3.50 }

					}
				}
			}

			if (size == "BUDGET")
			{
				totalBudgetqty = getCookie('totalBudgetqty');
				qty = totalBudgetqty;

				// validates minimum directional qty
				if (totalBudgetqty < 5)
				{
					// alert('INVALID QUANTITY for Item # '+(itemlist+1)+'. \nDirectionals have a minimum quantity of 5. Please enter a valid quantity and hit the "UPDATE" feature on the shopping cart.'); 
					newPrice = 0;
	
					// sets flags for incorrect qty
					turnItemRed = 1;
					invalidQty = 1;
				} else
					{
			
					if (totalBudgetqty >= 5 && totalBudgetqty <= 9) { 
				 		if (item == "Combo") {newPrice = 15.35 }
						if (item == "Frame") {newPrice = 8.95 }
					}
					if (totalBudgetqty >= 10 && totalBudgetqty <=14) {
					 	if (item == "Combo") {newPrice = 14.25 }
						if (item == "Frame") {newPrice = 8.50 }
					}
					if (totalBudgetqty >= 15 && totalBudgetqty <=24) {
				 		if (item == "Combo") {newPrice = 13.75 }
						if (item == "Frame") {newPrice = 8.00 }
					}
					if (totalBudgetqty >= 25 && totalBudgetqty <=49) {
					 	if (item == "Combo") {newPrice = 12.65 }
						if (item == "Frame") {newPrice = 7.50 }
					}
					if (totalBudgetqty >= 50) {
					 	if (item == "Combo") {newPrice = 11.95 }
						if (item == "Frame") {newPrice = 7.50 }

					}
				}
			}

			if (size == "9x24")
			{
				total9x24qty = getCookie('total9x24qty');
				qty = total9x24qty;

				// validates minimum directional qty
				if (total9x24qty < 5)
				{
					/*alert('INVALID QUANTITY for Item # '+(itemlist+1)+'. \nDirectionals have a minimum quantity of 5. Please enter a valid quantity and hit the "UPDATE" feature on the shopping cart.');*/
					newPrice = 0;
	
					// sets flags for incorrect qty
					turnItemRed = 1;
					invalidQty = 1;
				} else
					{
			       	 	if (total9x24qty >= 5 && total9x24qty <= 9) { 
				 		newPrice = 7.70 					
					}
					if (total9x24qty >= 10 && total9x24qty <=14) {
				 		newPrice = 6.60 					
					}
					if (total9x24qty >= 15 && total9x24qty <=24) {
				 		newPrice = 5.95 					
					}
					if (total9x24qty >= 25 && total9x24qty <=49) {
				 		newPrice = 5.50 					
					}
					if (total9x24qty >= 50) {
				 		newPrice = 5.00
					}
				}
			}
				
			if (size == "12x18")
			{
				total12x18qty = getCookie('total12x18qty');
				qty = total12x18qty;

				// validates minimum directional qty
				if (total12x18qty < 5)
				{
					/*alert('INVALID QUANTITY for Item # '+(itemlist+1)+'. \nDirectionals have a minimum quantity of 5. Please enter a valid quantity and hit the "UPDATE" feature on the shopping cart.');*/
					newPrice = 0;
	
					// sets flags for incorrect qty
					turnItemRed = 1;
					invalidQty = 1;
				} else
					{
					if (total12x18qty >= 5 && total12x18qty <= 9) { 
				 		newPrice = 7.70 					
					}
					if (total12x18qty >= 10 && total12x18qty <=14) {
					 	newPrice = 6.60 					
					}
					if (total12x18qty >= 15 && total12x18qty <=24) {
					 	newPrice = 5.95 					
					}
					if (total12x18qty >= 25 && total12x18qty <=49) {
				 		newPrice = 5.50 					
					}
					if (total12x18qty >= 50) {
				 		newPrice = 5.00
					}

				}
			}

			if (size == "18x24")
			{
				total18x24qty = getCookie('total18x24qty');
				qty = total18x24qty;

				// validates minimum directional qty
				if (total18x24qty < 5)
				{
					/*alert('INVALID QUANTITY for Item # '+(itemlist+1)+'. \nDirectionals have a minimum quantity of 5. Please enter a valid quantity and hit the "UPDATE" feature on the shopping cart.');*/
					newPrice = 0;
	
					// sets flags for incorrect qty
					turnItemRed = 1;
					invalidQty = 1;
				} else
					{
					if (total18x24qty  >= 5 && total18x24qty  <= 9) { 
				 		newPrice = 8.25 					
					}
					if (total18x24qty  >= 10 && total18x24qty  <=14) {
					 	newPrice = 7.70 					
					}
					if (total18x24qty  >= 15 && total18x24qty  <=24) {
					 	newPrice = 7.15 					
					}
					if (total18x24qty  >= 25 && total18x24qty  <=49) {
					 	newPrice = 6.60					
					}
					if (total18x24qty  >= 50) {
					 	newPrice = 6.00
					}

				}
			}
		
			// perform IMPRINT pricing for directionals
			if (item != "Frame" && copy != "" && copy != " ")
			{
				if (qty >= 5 && qty <= 9) { 
			 		newPrice = newPrice + 4.50 }
				if (qty >= 10 && qty <=14) {
				 	newPrice = newPrice + 3.50 }
				if (qty >= 15 && qty <=24) {
			 		newPrice = newPrice + 2.50 }
				if (qty >= 25 && qty <=49) {
			 		newPrice = newPrice + 1.50 }
				if (qty >= 50) {
			 		newPrice = newPrice + 1.00 }
			}
			
		} 
	
		// formats output to 2 decimals using formatDecimal()
		newPrice = formatDecimal(newPrice, true, 2);
		return newPrice;
        }
//-------------------------------------------------------------------------------------------------------------------------------
// getPriceHot() calculates price as a function of qty 
	function getPriceHot(qty)
	{
		newPrice = 0;
		if (whichitem == "Hot Products")
		{
	 		totalHotqty = getCookie('totalHotqty');

			// validates Hot Products qty
			if (totalHotqty < 5)
			{
				alert('INVALID QUANTITY for Item # '+(itemlist+1)+'. \nYou need to order '+(5 - parseInt(totalHotqty))+' additional Hot Products to meet the minimum quantity of 5. You will not be allowed to checkout until this is corrected. Please enter a valid quantity and hit the "UPDATE" feature on the shopping cart OR return to the Hot Products order page to add additional products.');
				// sets flag for incorrect qty
				turnItemRed = 1;
				invalidQty = 1;
			} else
			{ 
				if (totalHotqty >= 5 && totalHotqty < 10 ) {
					newPrice = 9.95 }
				if (totalHotqty >= 10 && totalHotqty < 14) {
					newPrice = 8.75 }
				if (totalHotqty >= 15 && totalHotqty < 24) {
					newPrice = 7.75 }
				if (totalHotqty >= 25 && totalHotqty < 49) {
					newPrice = 7.25 }
				if (totalHotqty >= 50) {
					newPrice = 6.95 }
			}
						
		}
	
 
		
		// formats output to 2 decimals using formatDecimal()
		newPrice = formatDecimal(newPrice, true, 2);
		return newPrice;
	}
//-------------------------------------------------------------------------------------------------------------------------------
	// clearCart() - removes all items from the basket
	function clearCart()
	{
		if (confirm('Empty the Shopping Cart?'))
		{

			delCookie('totalEsquireqty');
			delCookie('totalSidewalkqty');
			delCookie('totalCastleqty');
			delCookie('totalBudgetqty');
			delCookie('totalEconomyqty');
			delCookie('total9x24qty');
			delCookie('total12x18qty');
			delCookie('total18x24qty');
			delCookie('totalMsgqty18');
			delCookie('totalMsgqty24');
			delCookie('totalMsgqty28');			
			delCookie('totalCastleFqty');
			delCookie('totalCrownFqty');
			delCookie('totalEsquireFqty');
			delCookie('totalCoroFqty');
			
			delCookie('totalUtilityFqty');
			delCookie('totalHotqty');
			delCookie('totalDecalsqty');
			delCookie('totalOHPPqty');
				
			
			delCookie('ShopCart');
			setCookie('ShopCart', 'null');
			self.location = "shop_view_cart_abq.htm";
		}
	}
//-------------------------------------------------------------------------------------------------------------------------------
	function validQty(check)
	{
		valid = chkForNum(check);
		if (!valid)
		{
			alert('Please enter only numeric quantity values.');
			thequantity = 0;
			return false;
		} 

		if (check <= 0)
		{
			alert('Quantity must be greater than zero.');
			return false;
		}

		return true;
	}
//-------------------------------------------------------------------------------------------------------------------------------
	function checkOut()
	{
		// checks for empty cart
		if (areItems == 0)
		{
			alert('You cannot checkout with an empty shopping cart.');
			return;
		}

		// invalidQty is set in getPrice
		if (invalidQty == 1)
		{
			alert('You cannot checkout until all quantities are valid. If the item is highlighted in red, you need to purchase the minimum quanitity for that product.');
			return;
		}
		totalEsquireqty = getCookie('totalEsquireqty');
		totalSidewalkqty = getCookie('totalSidewalkqty');
		totalCastleqty = getCookie('totalCastleqty');
		totalBudgetqty = getCookie('totalBudgetqty');
		totalEconomyqty = getCookie('totalEconomyqty');
		total9x24qty = getCookie('total9x24qty');
		total12x18qty = getCookie('total12x18qty');
		total18x24qty = getCookie('total18x24qty');
		totalMsgqty18 = getCookie('totalMsgqty18');
		totalMsgqty24 = getCookie('totalMsgqty24');
		totalMsgqty28 = getCookie('totalMsgqty28');		
		totalCastleFqty = getCookie('totalCastleFqty');
		totalCrownFqty = getCookie('totalCrownFqty');
		totalEsquireFqty = getCookie('totalEsquireFqty');
		totalCoroFqty = getCookie('totalCoroFqty');
		totalUtilityFqty = getCookie('totalUtilityFqty');		
		totalHotqty = getCookie('totalHotqty');
		totalDecalsqty = getCookie('totalDecalsqty');
		totalOHPPqty = getCookie('totalOHPPqty');
		totalMVSqty = getCookie('totalMVSqty');
		totaluED1qty = getCookie('totaluED1qty');
		totaluED2qty = getCookie('totaluED2qty');
		totaluED3qty = getCookie('totaluED3qty');
		totaluED4qty = getCookie('totaluED4qty');
		totaluED5qty = getCookie('totaluED5qty');
		totaluED6qty = getCookie('totaluED6qty');
		totaluED7qty = getCookie('totaluED7qty');
		totaluED8qty = getCookie('totaluED8qty');
		totaluDD1qty = getCookie('totaluDD1qty');
		totaluDD2qty = getCookie('totaluDD2qty');
		totaluDD3qty = getCookie('totaluDD3qty');
		totaluDD4qty = getCookie('totaluDD4qty');
		totaluOH1qty = getCookie('totaluOH1qty');
		totaluOH2qty = getCookie('totaluOH2qty');
		totaluYS1qty = getCookie('totaluYS1qty');
		totaluYS2qty = getCookie('totaluYS2qty');
		totaluYS3qty = getCookie('totaluYS3qty');
		totaluYS4qty = getCookie('totaluYS4qty');
		totaluYS5qty = getCookie('totaluYS5qty');
		totaluYS6qty = getCookie('totaluYS6qty');
		totaluYS7qty = getCookie('totaluYS7qty');
		totaluYS8qty = getCookie('totaluYS8qty');
		totaluYS9qty = getCookie('totaluYS9qty');
		totaluYS10qty = getCookie('totaluYS10qty');
		totaluANR1qty = getCookie('totaluANR1qty');
		totaluANR2qty = getCookie('totaluANR2qty');
		totaluANR3qty = getCookie('totaluANR3qty');
		totaluANR4qty = getCookie('totaluANR4qty');
		totaluFS1qty = getCookie('totaluFS1qty');
		totaluFS2qty = getCookie('totaluFS2qty');
		totaluP1qty = getCookie('totaluP1qty');
		totaluP2qty = getCookie('totaluP2qty');
		totaluP3qty = getCookie('totaluP3qty');
		totaluW1qty = getCookie('totaluW1qty');
		totaluW2qty = getCookie('totaluW2qty');
		totaluW3qty = getCookie('totaluW3qty');
		totaluMqty = getCookie('totaluMqty'); 		  

  		totalInfoRider2_qty = getCookie('totalInfoRider2_qty');
	
 			
//--------------------------------------------------------------------------


		params = totalEsquireqty + "$" + totalSidewalkqty + "$" + totalCastleqty + "$" + totalBudgetqty + "$" + totalEconomyqty + "$" + total9x24qty + "$" + total12x18qty + "$" + total18x24qty + "$" + totalHotqty + "$" + totalMsgqty18 + "$" + totalMsgqty24 + "$" + totalCastleFqty + "$" + totalCrownFqty + "$" + totalEsquireFqty + "$" + totalUtilityFqty + "$" + totalCoroFqty + "$" +  totalDecalsqty + "$" +  totalOHPPqty + "$" + totalMsgqty28 + "$" + fulllist;
		nextstop = "https://cc.aswi.com/realtysignxpress/public_html/shop_check_out_ABQ.htm?" + escape(params) + "$source=eCatalog";
		top.location.href=nextstop;			 
	}

//-->