var
	iItemsInCart = 0,
	dfpStandardShippingTotal = 0.0,
	dfpExpressShippingTotal = 0.0,
	dfpOrderTotal = 0.0,
	dfpShippingCharge = 0.0;
var
	fIsNavigator = false;


	function queryItemsInCartCount()
	{
		return iItemsInCart;
	}
	function returnStandardShippingTotal() 
	{
		calculateShippingTotal();
		return dfpStandardShippingTotal;
	}
	function returnExpressShippingTotal() 
	{
		calculateShippingTotal();
		return dfpExpressShippingTotal;
	}
	function returnShippingTotal() 
	{
		return dfpShippingCharge;
	}
	function calculateShippingTotal() 
	{
		dfpExpressShippingTotal = 0.0;
		dfpStandardShippingTotal = 0.0;
		
		var
			sCalcItemCount = getCookieSubItem( "Items", "ItemCount" );
			
		if( sCalcItemCount == null )
			return;
	
		var
			fCalcItemsFound = false;
				
		for( var iCalcItem = 0; iCalcItem < sCalcItemCount; iCalcItem++ )
		{				
			var
				sCalcItem = getCookieSubItem( "Items",  "Item" + iCalcItem );

			if( sCalcItem == null )
				continue;

			fCalcItemsFound = true;
		}
		if( fCalcItemsFound == false )
			return;
		for( var iCalcItem = 0; iCalcItem < sCalcItemCount; iCalcItem++ )
		{				
			var
				sCalcItem = getCookieSubItem( "Items",  "Item" + iCalcItem );

			if( sCalcItem == null || sCalcItem == "null" )
				continue;
			
			var
				asCalcDetails = sCalcItem.split( "," );
					
			if( asCalcDetails.length >= 11 )
			{
				dfpExpressShippingTotal += asCalcDetails[ 10 ] * asCalcDetails[ 9 ]; 
				dfpStandardShippingTotal += asCalcDetails[ 11 ] * asCalcDetails[ 9 ]; 
			}
		}
	}
	function fillCartWithTaxInfo( doc )
	{
		determineBrowserType();	
		
		var
			objForm = fIsNavigator ? document.ProductOrderForm : ProductOrderForm;
			
		fillCartList(doc,true,objForm);
	}
	function fillCartList(doc,fShowTax,objForm)
	{
		dfpShippingCharge = 0.0;
		
		calculateShippingTotal();
		determineBrowserType();
		iItemsInCart = 0;
		
		var
			sItemCount = getCookieSubItem( "Items", "ItemCount" );
		if( sItemCount == null )
		{
			doc.writeln( "<SPAN class=\"text\"><I><B>Your list is empty</I></B></SPAN>" );
		}
		else
		{
			var
				fItemsFound = false;
			for( var iItem = 0; iItem < sItemCount; iItem++ )
			{				
				var
					sItem = getCookieSubItem( "Items",  "Item" + iItem );

				if( sItem == null )
					continue;

				fItemsFound = true;
			}

			if( fItemsFound == false )
			{
				doc.writeln( "<SPAN class=\"text\"><I><B>Your list is empty</I></B></SPAN>" );
				return;
			}

			doc.writeln( "<TABLE WIDTH=\"100%\" CELLSPACING=\"0\" CELLPADDING=\"0\" BORDER=\"0\">" );
			doc.writeln( "<TR>" );
			if( !fShowTax )
				doc.writeln( "<TD></TD>" );
			doc.writeln( "<TD class='mainheading'><U>Item</U></TD>" );
			doc.writeln( "<TD ALIGN='Center' class='mainheading'><U>Color</U></TD>" );
			doc.writeln( "<TD ALIGN='Center' class='mainheading'><U>Size</U></TD>" );
			doc.writeln( "<TD ALIGN='Center' class='mainheading'><U>Qty</U></TD>" );
			doc.writeln( "<TD ALIGN='Right' class='mainheading'><U>Unit Price</U></TD>" );
			doc.writeln( "<TD ALIGN='Right' class='mainheading'><U>Ext. Price</U></TD>" );
			doc.writeln( "</TR>" );


			dfpOrderTotal = 0.0;

			if( objForm != null )
				objForm.OrderInfo.value = "";
				
			var
				iItemsDisplayed = 0;
						

			for( var iItem = 0; iItem < sItemCount; iItem++ )
			{				
				var
					sItem = getCookieSubItem( "Items",  "Item" + iItem );

				if( sItem == null )
					continue;

				var
					asDetails = sItem.split( "," );								
				if( asDetails.length > 1 )
				{
					var
						fpPO1Charge = 0,
						fpPO2Charge = 0;
						
					if( objForm != null )
						objForm.OrderInfo.value += sItem + ";";
						
					var
						asPrintOptForItem = getCookieSubItem( "PrintOpt", asDetails[ 0 ] );
					if( asPrintOptForItem == null || ('' + asPrintOptForItem) == 'undefined' )
						asPrintOptForItem = '';
					var
						asPrintOpts = asPrintOptForItem.split( '|' );

					iItemsDisplayed++;
					doc.writeln( "<TR>" );

					if( !fShowTax )
						doc.writeln( "<TD VALIGN='middle' class='text'>" + 	
							"<INPUT type=\"checkbox\" name=\"ItemID_" +  iItem + "\" value=\"" + asDetails[ 0 ]+ "\">" +
							"</TD>" );
					doc.writeln( "<TD VALIGN=\"middle\" class='text'>" + asDetails[ 3 ] + "</TD>" );
						
					doc.writeln( "<TD VALIGN='middle' ALIGN='Center' class='text'>" + (asDetails[ 6 ] != 'null' ? asDetails[ 6 ] : "N/A") + "</TD>" );
					doc.writeln( "<TD VALIGN='middle' ALIGN='Center' class='text'>" + (asDetails[ 7 ] != 'null' ? asDetails[ 7 ] : "N/A") + "</TD>" );
					doc.writeln( "<TD VALIGN='middle' ALIGN='Center' class='text'>" + asDetails[ 9 ] + "</TD>" );
							
					doc.writeln( "<TD VALIGN='middle' ALIGN='Right' class='text'>$" + cleanDollarAmount( asDetails[ 8 ] ) + "</TD>" );				
					doc.writeln( "<TD VALIGN='middle' ALIGN='Right' class='text'>$" + cleanDollarAmount( Number( asDetails[ 8 ] ) * Number( asDetails[ 9 ] ) ) + "</TD>" );
					doc.writeln( "</TR>" );
					
					if( asDetails[ 12 ] != null  && asDetails[ 12 ] != 'null' )
					{					
						doc.writeln( "<TR>" );
						if( !fShowTax )
							doc.writeln( "<TD></TD>" );
						
						doc.writeln( "<TD VALIGN='middle' class='text'>" + asPrintOpts[ 0 ] + "  lettering \"" + asDetails[ 12 ] + "\"</TD>" );
						doc.writeln( "<TD></TD><TD></TD><TD VALIGN='middle' class='text' ALIGN='Center'>" + asDetails[ 9 ] + "</TD>");
						fpPO1Charge = cleanArgString( asPrintOpts[ 1 ] ).valueOf();
						doc.writeln( "<TD VALIGN='middle' ALIGN='Right' class='text'>$" + cleanDollarAmount( Number( asPrintOpts[ 1 ] ) ) + "</TD>" );
						doc.writeln( "<TD VALIGN='middle' ALIGN='Right' class='text'>$" + cleanDollarAmount( Number( asPrintOpts[ 1 ] ) * Number( asDetails[ 9 ] ) ) );
						doc.writeln( "</TR>" );
					}
					if( asDetails[ 13 ] != null  && asDetails[ 13 ] != 'null' )
					{					
						doc.writeln( "<TR>" );
						if( !fShowTax )
							doc.writeln( "<TD></TD>" );
						doc.writeln( "<TD VALIGN='middle' class='text'>" + asPrintOpts[ 2 ] + "  lettering \"" + asDetails[ 13 ] + "\"</TD>" );
						doc.writeln( "<TD></TD><TD></TD><TD VALIGN='middle' class='text' ALIGN='Center'>" + asDetails[ 9 ] + "</TD>");
						fpPO2Charge = cleanArgString( asPrintOpts[ 3 ] ).valueOf();
						doc.writeln( "<TD VALIGN='middle' ALIGN='Right' class='text'>$" + cleanDollarAmount( Number( asPrintOpts[ 3 ] ) ) + "</TD>" );
						doc.writeln( "<TD VALIGN='middle' ALIGN='Right' class='text'>$" + cleanDollarAmount( Number( asPrintOpts[ 3 ] ) * Number( asDetails[ 9 ] ) ) );
						doc.writeln( "</TR>" );
					}
					
					if( fShowTax )
						doc.writeln( "<TR><TD HEIGHT='10' COLSPAN='6'></TD></TR>" );
					
					dfpOrderTotal +=  (Number( asDetails[ 8 ] ) + Number( fpPO1Charge ) + Number( fpPO2Charge )) * Number( asDetails[ 9 ] );
					iItemsInCart++
				}
			}


			var
				dfpTaxAmount = 0.0,
				dfpTaxRate = getCookieSubItem( "CompanyInfo",  "TaxRate" ),
				dfpTaxRate2 = getCookieSubItem( "CompanyInfo",  "TaxRate2" ),
				sTaxState = getCookieSubItem( "CompanyInfo", "TaxStateAbbreviation" ),
				sTaxLabel1 = getCookieSubItem( "CompanyInfo", "TaxLabel1" ),
				sTaxLabel2 = getCookieSubItem( "CompanyInfo", "TaxLabel2" );
											
			if( fShowTax == true && sTaxState != null && 
				 ((sTaxLabel2 != null && sTaxLabel2 != "null") || sTaxState == getCookieSubItem( "CustomerInfo", "BillingAddressState" )) )
			{
				var					
					dfpTax2Amount = 0.0,
					dfpTotal = dfpOrderTotal + dfpTaxAmount;

				dfpTaxAmount = (dfpOrderTotal * dfpTaxRate),

				doc.writeln( "<TR><TD COLSPAN=6><HR></TD></TR>" );
				doc.writeln( "<TR><TD class='text'>Sub Total</TD>" );
				doc.writeln( "<TD></TD><TD></TD><TD></TD><TD></TD>" );
				doc.writeln( "<TD ALIGN='Right' class='text'>$" + cleanDollarAmount( dfpOrderTotal ) + "</TD>" );
				doc.writeln( "</TR>" );

				doc.writeln( "<TR><TD class='text'>" + (sTaxLabel1 != null ? sTaxLabel1 : sTaxState + " Sales Tax") + " (" + (dfpTaxRate * 100.0) + "%)</TD>" );
				doc.writeln( "<TD></TD><TD></TD><TD></TD><TD></TD>" );
				doc.writeln( "<TD ALIGN='Right' class='text'>$" + cleanDollarAmount( dfpTaxAmount ) + "</TD>" );
				doc.writeln( "</TR>" );
		
				if( dfpTaxRate2 != null && sTaxLabel2 != null && sTaxLabel2 != "null" && dfpTaxRate2 != 0 )
				{
					dfpTax2Amount = (dfpOrderTotal * dfpTaxRate2);
					dfpTaxAmount += dfpTax2Amount;
					
					doc.writeln( "<TR><TD class='text'>" + sTaxLabel2  + " (" + (dfpTaxRate2 * 100.0) + "%)</TD>" );
					doc.writeln( "<TD></TD><TD></TD><TD></TD><TD></TD>" );
					doc.writeln( "<TD ALIGN='Right' class='text'>$" + cleanDollarAmount( dfpTax2Amount ) + "</TD>" );
					doc.writeln( "</TR>" );
				}

				if( getCookieSubItem( "CustomerInfo", "CustomerDeliveryMethod" ) == "ExpressShipping" &&
					dfpExpressShippingTotal > 0 )
				{
					doc.writeln( "<TR><TD class='text'>Express Shipping</TD>" );
					doc.writeln( "<TD></TD><TD></TD><TD></TD><TD></TD>" );
					if( !fShowTax )
						doc.writeln( "<TD></TD>" );
					doc.writeln( "<TD ALIGN='Right' class='text'>$" + cleanDollarAmount( dfpExpressShippingTotal ) + "</TD>" );
					doc.writeln( "</TR>" );
					dfpShippingCharge = (dfpExpressShippingTotal * 1.0);					
				}

				if( getCookieSubItem( "CustomerInfo", "CustomerDeliveryMethod" ) == "StandardShipping" &&
					dfpStandardShippingTotal > 0 )
				{
					doc.writeln( "<TR><TD class='text'>Standard Shipping</TD>" );
					doc.writeln( "<TD></TD><TD></TD><TD></TD><TD></TD>" );
					if( !fShowTax )
						doc.writeln( "<TD></TD>" );
					doc.writeln( "<TD ALIGN='Right' class='text'>$" + cleanDollarAmount( dfpStandardShippingTotal ) + "</TD>" );
					doc.writeln( "</TR>" );
					dfpShippingCharge = (dfpStandardShippingTotal * 1.0);
				}
			}
			else
			{
				if( fShowTax == true && getCookieSubItem( "CustomerInfo", "CustomerDeliveryMethod" ) == "ExpressShipping" &&
					dfpExpressShippingTotal > 0 )
				{
					doc.writeln( "<TR><TD class='text'>Express Shipping</TD>" );
					doc.writeln( "<TD></TD><TD></TD><TD></TD><TD></TD>" );
					doc.writeln( "<TD ALIGN='Right' class='text'>$" + cleanDollarAmount( dfpExpressShippingTotal ) + "</TD>" );
					doc.writeln( "</TR>" );
					dfpShippingCharge = (dfpExpressShippingTotal * 1.0);
				}

				if( fShowTax == true && getCookieSubItem( "CustomerInfo", "CustomerDeliveryMethod" ) == "StandardShipping" &&
					dfpStandardShippingTotal > 0 )
				{
					doc.writeln( "<TR><TD class='text'>Standard Shipping</TD>" );
					doc.writeln( "<TD></TD><TD></TD><TD></TD><TD></TD>" );
					doc.writeln( "<TD ALIGN='Right' class='text'>$" + cleanDollarAmount( dfpStandardShippingTotal ) + "</TD>" );
					doc.writeln( "</TR>" );
					dfpShippingCharge = (dfpStandardShippingTotal * 1.0);
				}			
			}			
			
			doc.writeln( "<TR><TD COLSPAN=\"" + (fShowTax ? "6" : "7") + "\"><HR></TD></TR>" );
			doc.writeln( "<TR><TD ALIGN=\"Left\" COLSPAN=\"" + (fShowTax ? "5" : "6") + "\" BGCOLOR=\"#E0E0E0\" class='text'>" + (!fShowTax ? "*" : "") + "Total</TD>" );
			doc.writeln( "<TD ALIGN='Right' BGCOLOR=\"#E0E0E0\" class='text'>$" + cleanDollarAmount( dfpOrderTotal + dfpShippingCharge + dfpTaxAmount) + "</TD>" );
			doc.writeln( "</TR>" );			
			
			doc.writeln( "</TABLE>" );
			if( fShowTax == false && iItemsDisplayed > 0 )
				doc.writeln( "<P><INPUT onclick='removeSelectedItem()' class='text' Type='Button' Name='RemoveItem' value='Remove Selected Item'></P>" );
			
		}
	}
	function fillCart( doc )
	{
		fillCartList(doc,false,null)
	}
	function fillCartForSubmission( doc )
	{
		determineBrowserType();	
		
		var
			objForm = fIsNavigator ? document.ProductOrderForm : ProductOrderForm;
		fillCartList(doc,false,objForm)		
	}
	function fillCartForPrinting( doc )
	{
		determineBrowserType();
		
		var
			objForm = fIsNavigator ? document.ProductOrderForm : ProductOrderForm;

		iItemsInCart  = 0;
		calculateShippingTotal();
		
		var
			sItemCount = getCookieSubItem( "Items", "ItemCount" );
		
		if( sItemCount == null )
		{
			doc.writeln( "<SPAN class=\"text\"><I><B>Your list is empty</I></B></SPAN>" );
		}
		else
		{
			var
				fItemsFound = false;
			for( var iItem = 0; iItem < sItemCount; iItem++ )
			{				
				var
					sItem = getCookieSubItem( "Items",  "Item" + iItem );

				if( sItem == null )
					continue;
				if( sItem == "null" )
					continue;
				if( sItem.length < 1 )
					continue;
				fItemsFound = true;
			}


			if( fItemsFound == false )
			{
				doc.writeln( "<SPAN class=\"text\"><I><B>Your list is empty</I></B></SPAN>" );
				return;
			}
			doc.writeln( "<TABLE WIDTH=\"100%\" BORDER=\"0\">" );
			doc.writeln( "<TR>" );
			doc.writeln( "<TD class='mainheading'><U>Item</U></TD>" );
			doc.writeln( "<TD ALIGN='Center' class='mainheading'><U>Color</U></TD>" );
			doc.writeln( "<TD ALIGN='Center' class='mainheading'><U>Size</U></TD>" );
			doc.writeln( "<TD ALIGN='Center' class='mainheading'><U>Qty</U></TD>" );
			doc.writeln( "<TD ALIGN='Right' class='mainheading'><U>Unit Price</U></TD>" );
			doc.writeln( "<TD WIDTH='25'></TD>" );
			doc.writeln( "<TD ALIGN='Right' class='mainheading'><U>Ext. Price</U></TD>" );
			doc.writeln( "</TR>" );


			dfpOrderTotal = 0.0;
			
			var
				sTotalOrder = 0;
			
			// alert( "Items loaded, building items list: " + sItemCount + " items" );
			
			for( var iItem = 0; iItem < sItemCount; iItem++ )
			{				
				var
					sItem = getCookieSubItem( "Items",  "Item" + iItem );

				if( sItem == null )
					continue;

				var
					asDetails = sItem.split( "," );								
				if( asDetails.length > 1 )
				{								
					var
						fpPO1Charge = 0,
						fpPO2Charge = 0;
					var
						asPrintOptForItem = getCookieSubItem( "PrintOpt", asDetails[ 0 ] );
					if( asPrintOptForItem == null || ('' + asPrintOptForItem) == 'undefined' )
						asPrintOptForItem = '';
					var
						asPrintOpts = asPrintOptForItem.split( '|' );
										
					doc.writeln( "<TR>" );

					doc.writeln( "<TD VALIGN=\"middle\" class='text'>" + asDetails[ 3 ] + "</TD>" );
						
					doc.writeln( "<TD VALIGN='middle' ALIGN='Center' class='text'>" + (asDetails[ 6 ] != 'null' ? asDetails[ 6 ] : "N/A") + "</TD>" );
					doc.writeln( "<TD VALIGN='middle' ALIGN='Center' class='text'>" + (asDetails[ 7 ] != 'null' ? asDetails[ 7 ] : "N/A") + "</TD>" );
					doc.writeln( "<TD VALIGN='middle' ALIGN='Center' class='text'>" + asDetails[ 9 ] + "</TD>" );
							
					doc.writeln( "<TD VALIGN='middle' ALIGN='Right' class='text'>$" + cleanDollarAmount( asDetails[ 8 ] ) + "</TD>" );				
					doc.writeln( "<TD></TD><TD VALIGN='middle' ALIGN='Right' class='text'>$" + cleanDollarAmount( Number( asDetails[ 8 ] ) * Number( asDetails[ 9 ] ) ) + "</TD>" );
					doc.writeln( "</TR>" );
					
					if( asDetails[ 12 ] != null  && asDetails[ 12 ] != 'null' )
					{					
						doc.writeln( "<TR><TD VALIGN='middle' class='text'>" + asPrintOpts[ 0 ] + "  lettering \"" + asDetails[ 12 ] + "\"</TD>" );
						doc.writeln( "<TD></TD><TD></TD><TD VALIGN='middle' class='text' ALIGN='Center'>" + asDetails[ 9 ] + "</TD>");
						fpPO1Charge = cleanArgString( asPrintOpts[ 1 ] ).valueOf();
						doc.writeln( "<TD VALIGN='middle' ALIGN='Right' class='text'>$" + cleanDollarAmount( Number( asPrintOpts[ 1 ] ) ) + "</TD>" );
						doc.writeln( "<TD></TD><TD VALIGN='middle' ALIGN='Right' class='text'>$" + cleanDollarAmount( Number( asPrintOpts[ 1 ] ) * Number( asDetails[ 9 ] ) ) );
						doc.writeln( "</TR>" );
					}
					if( asDetails[ 13 ] != null  && asDetails[ 13 ] != 'null' )
					{					
						doc.writeln( "<TR><TD VALIGN='middle' class='text'>" + asPrintOpts[ 2 ] + "  lettering \"" + asDetails[ 13 ] + "\"</TD>" );
						doc.writeln( "<TD></TD><TD></TD><TD VALIGN='middle' class='text' ALIGN='Center'>" + asDetails[ 9 ] + "</TD>");
						fpPO2Charge = cleanArgString( asPrintOpts[ 3 ] ).valueOf();
						doc.writeln( "<TD VALIGN='middle' ALIGN='Right' class='text'>$" + cleanDollarAmount( Number( asPrintOpts[ 3 ] ) ) + "</TD>" );
						doc.writeln( "<TD></TD><TD VALIGN='middle' ALIGN='Right' class='text'>$" + cleanDollarAmount( Number( asPrintOpts[ 3 ] ) * Number( asDetails[ 9 ] ) ) );
						doc.writeln( "</TR>" );
					}
																	
					sTotalOrder +=  (Number( asDetails[ 8 ] ) + Number( fpPO1Charge ) + Number( fpPO2Charge )) * Number( asDetails[ 9 ]);
					dfpOrderTotal +=  (Number( asDetails[ 8 ] ) + Number( fpPO1Charge ) + Number( fpPO2Charge )) * Number( asDetails[ 9 ]);

		  			iItemsInCart++;
				}
			}
			doc.writeln( "<TR><TD COLSPAN=7><HR></TD></TR>" );
			doc.writeln( "<TR><TD class='text'>Sub Total</TD>" );
			doc.writeln( "<TD></TD><TD></TD><TD></TD><TD></TD><TD></TD>" );
			doc.writeln( "<TD ALIGN='RIGHT' class='text'>$" + cleanDollarAmount( sTotalOrder ) + "</TD>" );
			doc.writeln( "</TR>" );

			var
				dfpTaxRate = getCookieSubItem( "CompanyInfo",  "TaxRate" ),
				dfpTaxRate2 = getCookieSubItem( "CompanyInfo",  "TaxRate2" ),
				sTaxState = getCookieSubItem( "CompanyInfo", "TaxStateAbbreviation" );
			var
				fForPrint = true;
				
			if( fForPrint )
			{
				if( sTaxState != null  )
				{
					var
						dfpTaxAmount = (dfpOrderTotal * dfpTaxRate),
						dfpTaxAmount2 = dfpTaxRate2 != null ? dfpOrderTotal * dfpTaxRate2 : 0.0,
						dfpTotal = dfpOrderTotal + dfpTaxAmount + dfpTaxAmount2,
						sTaxLabel1 = getCookieSubItem( "CompanyInfo", "TaxLabel1" ),
						sTaxLabel2 = getCookieSubItem( "CompanyInfo", "TaxLabel2" );

					doc.writeln( "<TR><TD class='text'>" +
						(sTaxLabel2 != null && sTaxLabel2 != "null" ? sTaxLabel1 : sTaxState + " Residents add sales tax") +
						" (" + (dfpTaxRate * 100.0) + "%)</TD>" );
					doc.writeln( "<TD></TD><TD></TD><TD></TD>" );
					doc.writeln( "<TD ALIGN='Right' class='text'>$" + cleanDollarAmount( dfpTaxAmount ) + "</TD>" );
					doc.writeln( "<TD ></TD>" );
					doc.writeln( "<TD BGCOLOR='#C0C0C0'></TD>" );
					doc.writeln( "</TR>" );

					if( sTaxLabel2 != null && sTaxLabel2 != "null" )
					{					
						doc.writeln( "<TR><TD class='text'>" + sTaxLabel2 + " (" + (dfpTaxRate2 * 100.0) + "%)</TD>" );
						doc.writeln( "<TD></TD><TD></TD><TD></TD>" );
						doc.writeln( "<TD ALIGN='Right' class='text'>$" + cleanDollarAmount( dfpTaxAmount2 ) + "</TD>" );
						doc.writeln( "<TD ></TD>" );
						doc.writeln( "<TD BGCOLOR='#C0C0C0'></TD>" );
						doc.writeln( "</TR>" );
					}
					
				}
			
				if( dfpExpressShippingTotal > 0 )
				{
					doc.writeln( "<TR><TD class='text'>(&nbsp;&nbsp;&nbsp;) Express Shipping Option</TD>" );
					doc.writeln( "<TD></TD><TD></TD><TD></TD>" );
					doc.writeln( "<TD ALIGN='RIGHT' class='text'>$" + cleanDollarAmount( dfpExpressShippingTotal ) + "</TD>" );
					doc.writeln( "<TD ></TD>" );
					doc.writeln( "<TD BGCOLOR='#C0C0C0'></TD>" );
					doc.writeln( "</TR>" );
				}

				if( dfpStandardShippingTotal > 0 )
				{
					doc.writeln( "<TR><TD class='text'>(&nbsp;&nbsp;&nbsp;) Standard Shipping Option</TD>" );
					doc.writeln( "<TD></TD><TD></TD><TD></TD>" );
					doc.writeln( "<TD ALIGN='RIGHT' class='text'>$" + cleanDollarAmount( dfpStandardShippingTotal ) + "</TD>" );
					doc.writeln( "<TD ></TD>" );
					doc.writeln( "<TD BGCOLOR='#C0C0C0'></TD>" );
					doc.writeln( "</TR>" );
				}
			
				if( getCookieSubItem( "CompanyInfo", "OrderByCheck" ) != 'N' &&
	 				 getCookieSubItem( "CompanyInfo", "ShipOnly" ) != 'Y' &&
					 getCookieSubItem( "CompanyInfo", "HideDelivery" ) != 'Y' )
				{
					doc.writeln( "<TR><TD class='text'>(&nbsp;&nbsp;&nbsp;) Include items in next team or group delivery</TD>" );
					doc.writeln( "<TD></TD><TD></TD><TD></TD>" );
					doc.writeln( "<TD ALIGN='RIGHT' class='text'>No Charge</TD>" );
					doc.writeln( "<TD ></TD>" );
					doc.writeln( "<TD BGCOLOR='#C0C0C0'></TD>" );
				
					doc.writeln( "</TR>" );
					doc.writeln( "<TR><TD class='text'>(&nbsp;&nbsp;&nbsp;) Pick up at store or office (call for arrangements)</TD>" );
					doc.writeln( "<TD></TD><TD></TD><TD></TD>" );
					doc.writeln( "<TD ALIGN='RIGHT' class='text'>No Charge</TD>" );
					doc.writeln( "<TD ></TD>" );
					doc.writeln( "<TD BGCOLOR='#C0C0C0'></TD>" );
					doc.writeln( "</TR>" );
				}
			}		
			doc.writeln( "<TR><TD COLSPAN=7><HR></TD></TR>" );
			doc.writeln( "<TR><TD class='text'>Total</TD>" );
			doc.writeln( "<TD></TD><TD></TD><TD></TD><TD></TD><TD></TD>" );
			doc.writeln( "<TD BGCOLOR='#C0C0C0' class='text' ALIGN='Left'>$</TD>" );
			doc.writeln( "</TR>" );
			
			
			if( getCookieSubItem( "CompanyInfo", "HideDelivery" ) != 'Y' )
			{
				doc.writeln( "<TR><TD COLSPAN=7></TD></TR>" );
				doc.writeln( "<TR><TD COLSPAN=7><HR></TD></TR>" );
				doc.writeln( "<TR><TD COLSPAN=7>" +
								"<P><SPAN class='text'>Please choose a delivery method by checking the appropriate box and then enter the shipping cost in the right hand column.<BR>" +
								"Then place the total in the bottom right hand box.  Please make your payment for this amount.</SPAN></P>" + 
								"</TD></TR>" );
			}
			doc.writeln( "</TABLE" );
		}
	}

	function removeSelectedItem()
	{
		determineBrowserType();
	
		var
			sItemCount = getCookieSubItem( "Items",  'ItemCount' );

		if( sItemCount == null )
			return;

		var
			fFound = false;

		window.onerror = null;
		
		for( var iCheckbox = 0; iCheckbox < sItemCount; iCheckbox++ )
		{
			var
				sCheckbox = "ItemID_" + iCheckbox;

			var
				chkbItem = fIsNavigator ? 
								eval( "document.ProductOrderForm." + sCheckbox ) :
								eval( "ProductOrderForm." + sCheckbox );
			
			if( chkbItem == null || ("" + chkbItem) == "undefined" )
			{
				continue;
			}
				
			sItem = getCookieSubItem( "Items", "Item" + iCheckbox );
			if( sItem == null || sItem.length == 0 )
				continue;

			if( chkbItem.checked )
			{
				sItem = getCookieSubItem( "Items", "Item" + iCheckbox );
				setCookieSubItem( "Items",  "Item" + iCheckbox, null );
				fFound = true;
			}			
		}

		if( fFound )
			location.reload();			
		else
			alert( "You must select at least one item's checkbox in order to remove an item from your Product Order Request List." );


	}