//<!-- Copyright (c) 1999-2007 UniteU Technologies Inc.  All rights reserved.   //-->
// ************************************************************************************
// ****    DO NOT MODIFY THIS FILE!!!  **************************************************
// **************************************************************************************
//This file will be re-generated any time the site is upgrade, any changes will be lost.
//	Also, This folder is NOT included in Transfers.  Please make your own js file.
// <% version = " 4.94ac 12/12/2006 " %>
//<!--

function write_errors (){
	if (errors == 1){
		document.write("<TABLE WIDTH=500 >");
		document.write("<TR><TD><FONT class=BasketErrors >");
		document.write(error_msg);
		document.write("</FONT></TD></TR>");
		document.write("</TABLE>");
	    document.write(gen_error_msg);
	}
	if(basket_errors.length>0){
		document.write("<TABLE WIDTH=500 >");
		for (atn=0;atn< basket_errors.length ;atn++){
			document.write("<TR><TD><FONT class=BasketErrors >");
			document.write(basket_errors[atn].error_msg);
			document.write("</FONT></TD></TR>");
		}
		document.write("</TABLE>");
	}
}

function draw_messages() {
	if (sbasket.no_items==0){
		document.write("<BLOCKQUOTE><STRONG>");
		document.write(empty_msg);
		document.write("</STRONG></BLOCKQUOTE>");
	}
	else {

		if(sbasket.no_items> 1) {
		 document.write(before_msg);
		 document.write(" " + sbasket.no_items + " " );
		 document.write(more_1_item_msg);
		}
		else {
		 document.write(one_item_msg);
		}
	}
}

function draw_table()
{
	var theURL = "";
	var numCols = 7;
	if(sbasket.no_items > 0) {
		document.write("<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\" class=\"SubHeadbgcolor\"><tr><td><table cellpadding=\"3\" cellspacing=\"1\" border=\"0\" width=\"100%\">");
		document.write("<tr><td align=\"center\" class=\"SubHeadText\">");
		if (page_option_5 == "1"){document.write("Availability");}else{document.write("Item#");}
		document.write("</td>");
		document.write("<td class=\"SubHeadText\">Description</td>");
		document.write("<td align=\"center\" class=\"SubHeadText\">Qty</td>");
		document.write("<td align=\"center\" class=\"SubHeadText\">Reg. Price</td>");
		document.write("<td align=\"center\" class=\"SubHeadText\">Your Price</td>");
		if (page_option_2 =="1")
		{
			numCols++;
			document.write("<td align=\"center\" class=\"SubHeadText\">Discount</td>");
		}
		document.write("<td align=\"center\" class=\"SubHeadText\">Total</td>");
		document.write("<td align=\"center\"  class=\"SubHeadText\"></td></TR>");
		for (atn=0;atn< sbasket.items.length ;atn++){
		  	document.write("<tr class=\"tablebgcolor\" valign=top><td class=cart_list_item align=center>");
			if (page_option_5 =="1"){document.write(sbasket.items[atn].stock_msg);}else{document.write(sbasket.items[atn].sku);	}
			document.write("</td><td class=cart_list_item><table width=\"100%\" border=0 cellspacing=0 cellpadding=2><tr valign=top>");
            theURL = "<a href=\"product.asp?dept_id=" + sbasket.items[atn].dept_id + "&pf_id="+ sbasket.items[atn].pf_id + "&\"  onClick=\"return(visitargs('product.asp','dept_id=" + sbasket.items[atn].dept_id + "&pf_id="+ sbasket.items[atn].pf_id + "&px_id="+ sbasket.items[atn].px_id + "&wish_id="+ sbasket.items[atn].wish_id + "&order_sid="+ order_sid + "&so_number="+ so_number + "&','URL'));\" class=\"basketlinkP\">";
			if (sbasket.items[atn].image !=""){
				document.write("<td>" + theURL + "<img src=\"assets/product_images/" + sbasket.items[atn].image + "\" border=0 align=left width=50 /></a></td>");
			}
			document.write("<td>" + theURL + sbasket.items[atn].name + "</a>");
			document.write(" <br>&nbsp;&nbsp;");
			var tempstr ="";
			if (sbasket.items[atn].attr_value1 !=""){ tempstr = sbasket.items[atn].attr_value1; }
			if (sbasket.items[atn].attr_value2 !=""){ tempstr += ", " + sbasket.items[atn].attr_value2; }
			if (sbasket.items[atn].attr_value3 !=""){ tempstr += ", " + sbasket.items[atn].attr_value3; }
			if (sbasket.items[atn].attr_value4 !=""){ tempstr += ", " + sbasket.items[atn].attr_value4; }
			if (sbasket.items[atn].attr_value5 !=""){ tempstr += ", " + sbasket.items[atn].attr_value5; }
			if (sbasket.items[atn].info_attr1 !=""){ tempstr += ", " + sbasket.items[atn].info_attr1; }
			if (sbasket.items[atn].info_attr2 !=""){ tempstr += ", " + sbasket.items[atn].info_attr2; }
			if (sbasket.items[atn].info_attr3 !=""){ tempstr += ", " + sbasket.items[atn].info_attr3; }
			if (sbasket.items[atn].info_parent !="")
			{
				var packmsg = sbasket.items[atn].info_parent.split(':');
				if (sbasket.items[atn].info_parent.indexOf(":OA")>=0){
					tempstr += " " + packmsg[0] + " -package quantity exceeded";
				}else{
					tempstr += " " + packmsg[0] + " " + packmsg[2];
				}
			}
			document.write(tempstr + "</td></tr></table></td>");
			document.write("<td class=cart_list_item ALIGN=CENTER><INPUT style=\"text-align: center\" TYPE=Text NAME=qty_"+ atn + " SIZE=2,1 VALUE="+ sbasket.items[atn].quantity +" ></TD> ");
			if (page_option_1 =="1")
			{
				document.write("<td class=cart_list_item  ALIGN=CENTER> $" + OKStrOfPenny(sbasket.items[atn].item_listprice) +" </TD>");
				document.write("<td class=cart_list_item  ALIGN=CENTER> $" + OKStrOfPenny(sbasket.items[atn].item_price) +" </TD>");
				if (page_option_2 =="1")
				{
					document.write("<td class=cart_list_item  ALIGN=CENTER> $" + OKStrOfPenny(sbasket.items[atn].discount) +" </TD>");
				}
				document.write("<td class=cart_list_item  ALIGN=right> $" + OKStrOfPenny(sbasket.items[atn].item_total) +" </TD>");
		  	}
			document.write("<td class=cart_list_item ALIGN=CENTER> ");
			if (sbasket.items[atn].award_qty_added=="")
			{
				document.write("<a HREF=xt_orderform_delitem.asp onClick=return(visitargs('xt_orderform_delitem.asp','addto=" + addto + "&index="+ atn + "&','SURL')); class=basketlinkP target=_top >");
				document.write("<IMG SRC=assets/images/" +remove_image+ " BORDER=0 ALT=\""+  remove_image_alt + "\" ALIGN=CENTER></a>");
			}
			document.write("</TD></TR>");
		}
		if (page_option_1 =="1")
		{
			document.write("<tr class=\"tablebgcolor\"><td colspan=\"" + (numCols-2) + "\" align=\"right\" class=\"cart_list_total\">Sub-Total:</td>");
			document.write("<td ALIGN=right class=\"cart_list_total\"> $"+ OKStrOfPenny(sbasket.sub_total) +" </TD><td></td></TR>");
		}
		if (typeof sbasket.ship_to_zip != "undefined" && sbasket.shipping_methods.length > 0 && sbasket.ship_to_zip != '')
		{
			document.write("<tr class=\"tablebgcolor\"><td colspan=\"" + (numCols-2) + "\" align=\"right\" class=\"cart_list_total\">Estimated Shipping:</td>");
			document.write("<td ALIGN=right class=\"cart_list_total\"> $"+ OKStrOfPenny(sbasket.shipping_total) +" </TD><td></td></TR>");
		}
		document.write("</TABLE></td></tr></table><br><br>");
	}
}

function draw_buttons() {
	if(sbasket.no_items > 0) {
		document.write("<TABLE width=100% BORDER=0 CELLPADDING=0 CELLSPACING=0 ><TR>");
		document.write("<TD><INPUT TYPE=Image VALUE=\"Update Order\" SRC=\"assets/images/" + update_image + "\" ALT=\"click to update your cart\" ALIGN =CENTER id=Image4 name=Image4 ></TD>");
		document.write("<td><INPUT TYPE=Image VALUE=\"Clear Order\" Name=clearbasket SRC=\"assets/images/" + clear_image + "\" ALT=\"click to empty your cart\" ALIGN =CENTER id=Image2 name=Image2 ></td>");
		document.write("<TD><a href=\"default.asp\" onClick=\"return(visitargs('default.asp','','URL'));\"><img src=\"assets/images/btn_continue_shopping.gif\" alt=\"click to return to the catalog\" border=\"0\"></a></td>");
		document.write("<TD> ");
		if (nonship=="1"){
			document.write("<INPUT TYPE=Image VALUE=\"Quote\" Name=paybasket SRC=\"assets/images/" + continue_image + "\" ALT=\"click to check out\" ALIGN =CENTER id=Image3 name=Image3 >");
		}else{
			document.write("<INPUT TYPE=Image VALUE=\"Purchase\" Name=shipbasket SRC=\"assets/images/" + continue_image + "\" ALT=\"click to check out\" ALIGN =CENTER id=Image1 name=Image1 >");
		}
		//google stuff
		if (feature28 == "True" && ChkOutBtnURL.length > 0)
		{
			document.write("</TD><td><INPUT TYPE=Image VALUE=\"GoogleCheckout\" Name=googlebasket SRC=\"" + ChkOutBtnURL + "\" ALT=\"Pay With Google Checkout\" ALIGN =CENTER id=Image5 name=Image5 >");
		}
		document.write("</TD></TR></TABLE><br><br>");
	}
}

function draw_comment() {
	if(sbasket.no_items > 0) {
		if(comment_msg!=""){
			document.write("<table cellpadding=\"1\" cellspacing=\"0\" border=\"0\" width=\"100%\" class=\"SubHeadbgcolor\"><tr><td>");
			document.write("<table cellpadding=\"10\" cellspacing=\"0\" border=\"0\" width=\"100%\" class=\"tablebgcolor\"><tr><td>");
			document.write("<b>Comments</b><br>If you have any comments or special information for this order, enter it below before checking out:<br><br>");
			document.write("<INPUT TYPE=Text NAME=basket_comment SIZE=80 VALUE=\"" + sbasket.comment + "\">");
			document.write("</td></tr></table></td></tr></table><br><br>");
		}
		document.write("<table cellpadding=\"1\" cellspacing=\"0\" border=\"0\" width=\"100%\" class=\"SubHeadbgcolor\"><tr><td><table cellpadding=\"10\" cellspacing=\"0\" border=\"0\" width=\"100%\" class=\"tablebgcolor\"><tr><td>");
		document.write("<b>Promotion/Discount Code</b><br><br>To redeem a special Promotion or Discount Code, you may enter the code in the box on the right.</td>");
		document.write("<td align=\"right\"><INPUT TYPE=Text NAME=discount_code SIZE=20 VALUE=\"" + sbasket.discount_code + "\" >");
		document.write("</TD></TR></TABLE></TD></TR></TABLE><br><br>");
	}
}

//-->