//<!-- Copyright (c) 1999-2005 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.
//
//<!--

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() {
	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%\">");
		if (page_option_2 =="1"){
			document.write("<tr><td align=\"center\"  class=\"CartLabels\">Item#</td><td class=\"CartLabels\">Name / Attributes</td><td align=\"center\"  class=\"CartLabels\">Qty</td><td align=\"center\"  class=\"CartLabels\">Unit Price</td><td align=\"center\"  class=\"CartLabels\">Your Price</td><td align=\"center\"  class=\"CartLabels\">Discount</td><td align=\"center\"  class=\"CartLabels\">Total</td></TR>");
		}else{
			document.write("<tr><td align=\"center\"  class=\"CartLabels\">Item#</td><td class=\"CartLabels\">Name / Attributes</td><td align=\"center\"  class=\"CartLabels\">Qty</td><td align=\"center\"  class=\"CartLabels\">Unit Price</td><td align=\"center\"  class=\"CartLabels\">Total</td><td align=\"center\"  class=\"CartLabels\"></td></TR>");
		}
		for (atn=0;atn< sbasket.items.length ;atn++){
		  	document.write("<tr bgcolor=\"#FFFFFF\" 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>"); 
			document.write("<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 + "&','URL'));  class=basketlinkP target=_top > " + sbasket.items[atn].name + "</A>");	
			if (sbasket.items[atn].attr_value1 !="" || sbasket.items[atn].info_attr1 !=""){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 + " "; }
			document.write(tempstr.substring(0,tempstr.length-1));            
			document.write(" </TD><td class=cart_list_item ALIGN=CENTER >");
			document.write("<INPUT style=\"text-align: center\" TYPE=Text NAME=qty_"+ atn + " SIZE=2,1 VALUE="+ sbasket.items[atn].quantity +" > ");
			document.write("</TD> ");		
			if (page_option_1 =="1"){
				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].item_price) +" </TD>");
					document.write("<td class=cart_list_item  ALIGN=CENTER> $" + OKStrOfPenny(sbasket.items[atn].discount) +" </TD>");
				}
				document.write("<td class=cart_list_item  ALIGN=CENTER> $" + 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") && (page_option_2 =="1")){
			document.write("<tr bgcolor=\"#FFFFFF\"><td colspan=\"6\" align=\"right\"  class=\"cart_list_total\">Sub-Total:</td><td ALIGN=CENTER  class=\"cart_list_total\">");
			document.write(" $"+ OKStrOfPenny(sbasket.sub_total) +" </TD><td></td></TR>");
		}else if((page_option_1 =="1") && (page_option_2 !="1")){
			document.write("<tr bgcolor=\"#FFFFFF\"><td colspan=\"4\" align=\"right\"  class=\"cart_list_total\">Sub-Total:</td><td ALIGN=CENTER  class=\"cart_list_total\">");
			document.write(" $"+ OKStrOfPenny(sbasket.sub_total) +" </TD><td></td></TR>");
		}
		document.write("</TABLE></td></tr><tr><td height=\"10\" bgcolor=\"ffffff\"></td></tr></table>");
	}
}

function draw_buttons() {
	if(sbasket.no_items > 0) {
		document.write("<TABLE width=100% BORDER=0 CELLPADDING=0 CELLSPACING=0 ><TR><TD>");
		document.write("<INPUT TYPE=Image VALUE=\"Update Order\" SRC=\"assets/images/" + update_image + "\" ALT=\"click to update your cart\" ALIGN =CENTER id=Image4 name=Image4 >");
		document.write("</TD><td><a href=\"javascript:history.go(-2);\"><img src=\"assets/images/btn_continue_shopping.gif\" alt=\"click to return to the catalog\" border=\"0\" ALIGN =bottom></a></td><TD>");
		document.write("<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 >");
		document.write("</TD><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 >");
		}
		document.write("</TD></TR></TABLE>");
	}
}

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%\" bgcolor=\"#FFFFFF\"><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("</span></tr></td></tr></table></td></tr><tr><td height=\"25\" bgcolor=\"ffffff\"></td></tr></table>");			     
		}
		document.write("<table cellpadding=\"1\" cellspacing=\"0\" border=\"0\" width=\"100%\" class=\"SubHeadbgcolor\"><tr><td><table cellpadding=\"10\" cellspacing=\"0\" border=\"0\" width=\"100%\" bgcolor=\"#FFFFF\"><tr><td>");
		document.write("<b>Promotion/Discount Code</b><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><tr><td height=\"25\" bgcolor=\"ffffff\"></td></tr></TABLE>");
	}
}

//-->	
