// @(#)$Header:$
function cartHeader() 
{
 return "<td bgcolor=\"FFFFFF\" width=\"100%\" valign=\"top\">" +
        "<img src=\"/images/sc_header2.gif\" border=\"0\" ALT=\"Shopping Cart\">" +
        "</td>";

// return "<td height=\"0\">"+
 //       "<span class=\"hdrLargeBold\">Shopping Cart</span>"+
  //      "</td>";
}

function keyCodeLabel()
{
 return "<span class=\"txtInfo\">Enter key code or promotional code (optional):</span>";
}

function Write_add_to_Cart() {
  var sOutput = "";
  sOutput = sOutput + 'Add to Shopping Cart. ';
  sOutput = sOutput + '<a class="actionOn" href="javascript:document.cartform.submit();"><img src="/checkout/images/bag/addtobag.gif" alt="Add to Cart" border="0"></a>';
  document.write(sOutput);
}

function Write_Cart_Instructions() {
  var sOutput = "";
  sOutput = '<b>If you make any changes to your shopping cart, be sure to press the "Update Items" button.</b>';
  document.write(sOutput);
}

function Write_Save_Cart_Instructions() {
  var sOutput = "";
  sOutput = sOutput + '<b>To save your shopping cart contents for 30 days, ';
  sOutput = sOutput + '<a href="shopping_cart_interface.save_cart?p_sc_type=S" target="_main">click here</a>.</b>';
  document.write(sOutput);
}

function Write_Cart_Saved() {
  var sOutput = "";
  sOutput = sOutput + '<b class=hl1b>The contents of your shopping cart will be stored for 30 days. ';
  sOutput = sOutput + 'Please log in when you return to shop.fisher-price.com to access your order. ';
  sOutput = sOutput + 'Note that saving the contents does not guarantee item availability.</b>';
  document.write(sOutput);
}

function Write_Sold_Out_Message() {
  var sOutput = "";
  sOutput = 'We are sorry, the following item(s) you selected are Sold Out and cannot be purchased at this time: ';
  document.write(sOutput);
}

function Write_Invalid_Key_Code() {
  var sOutput = "";
  sOutput = sOutput + 'is an invalid Key Code. Please check the back of your catalog and re-enter the code. ';
  sOutput = sOutput + 'If you continue to get this error, leave the Key Code blank and proceed to Step 2.';
  document.write(sOutput);
}

function Write_Invalid_Key_Code_Msg() {
  var sOutput = "";
  sOutput = sOutput + 'is an invalid Key Code. Please check the back of your catalog and re-enter the code. ';
  sOutput = sOutput + 'If you continue to get this error, leave the Key Code blank and proceed with shopping.';
  document.write(sOutput);
}

function Write_Invalid_Item(prodcode) {
  var sOutput = "";
  sOutput = "! We're sorry. " + prodcode + " is an invalid Product Code.";
  document.write(sOutput);
}

function Write_Unavailable_Item(prodcode) {
  var sOutput = "";
  sOutput = "! We're sorry. " + prodcode + " is currently sold out.";
  document.write(sOutput);
}

function Write_Note_Item(pagelink) {
  var sOutput = "";
  sOutput = sOutput + "! We're sorry. Gift Certificates cannot be ordered using Catalog Quick Order.  ";
  sOutput = sOutput + 'Please go to the <a href="' + pagelink + '">Gift Certificate</a> product page.';
  document.write(sOutput);
}

function Write_Club_Item(pagelink) {
  var sOutput = "";
  sOutput = "! We're sorry. " + pagelink + " is a club item and must be entered from its product page.";
  document.write(sOutput);
}

function Write_QCart_Step1() {
  var sOutput = "";
  sOutput = sOutput + 'Please enter the key code that appears on the back cover of your catalog in the ';
  sOutput = sOutput + 'yellow box above your mailing address. If your key code is from a special promotion, ';
  sOutput = sOutput + 'please enter that key code instead to take advantage of your special offer. If you ';
  sOutput = sOutput + 'don\'t have a key code, leave this field blank.';
  document.write(sOutput);
}

function Write_QCart_Step2(p_gift_registry_number) {
  var sOutput = "";
  if (p_gift_registry_number == ""){
    sOutput = sOutput + 'Enter Product Codes for items you would like to order (e.g., F3-P73510). When finished, ';
    sOutput = sOutput + 'or if you need to enter additional items, click "Add to Shopping Cart." If prompted, ';
    sOutput = sOutput + 'please make color or size selections for marked items and re-click "Add to Shopping Cart."';
  } else {
    sOutput = sOutput + 'In order to update a Gift Registry through Catalog Quick Entry, simply enter the ';
    sOutput = sOutput + 'desired product codes in the spaces provided.';
  }

  document.write(sOutput);
}

function Write_QCart_Step3() {
  var sOutput = "";
  sOutput = 'To view or remove items added to your Shopping Cart using Catalog Quick Order, click "Confirm."';
  document.write(sOutput);
}

function Write_Max_Club_Qty_Message() {
  var sOutput = "";
  sOutput = 'The following product(s) have club purchase quantity limits. Your item quantity has been set to the maximum quantity.: ';
  document.write(sOutput);
}

function Write_Max_Order_Qty_Message() {
  var sOutput = "";
  sOutput = 'The following product(s) have purchase quantity limits. Your item quantity has been set to the maximum quantity.: ';
  document.write(sOutput);
}

function Write_Note_Item_Qty_Message() {
  var sOutput = "";
  sOutput = 'Additional quantities for the following product(s) can be entered through their product page(s): ';
  document.write(sOutput);
}

function Write_QCart_Added_Message() {
  var sOutput = "";
  sOutput = '<span class="txtError">The following items have been added to your Shopping Cart using Catalog Quick Order.</span>';
  document.write(sOutput);
}

function Write_Cart_Footer() {
  var sOutput = "";
  //replaced by shared navigation
  document.write(sOutput);
}

function Write_Expired_Item() {
  var sOutput = "";
  sOutput = 'The following item(s) you had saved in your shopping cart are no longer available, and have been removed from your cart:';
  document.write(sOutput);
}

function Write_Cart_Specials_Link() {
  var sOutput = "";
  sOutput = '<a href="" target="_top">';
  document.write(sOutput);
}

function Write_Empty_Form() {
  var sOutput = "";
  sOutput = 'Please enter a valid Product Code from your catalog.';
  document.write(sOutput);
}

function Write_Need_Selection() {
  var sOutput = "";
  sOutput = '* Please make a selection for the item(s) marked below.';
  document.write(sOutput);
}

function Write_Ship_Tier_Max() {
  var sOutput = "";
  sOutput = 'Your shipping rate will not increase if you add any additional products to your order.';
  document.write(sOutput);
}

function Write_Ship_Tier(tierRemaining) {
  var sOutput = "";
  sOutput = 'You may purchase an additional ' + tierRemaining + ' of products without increasing your shipping costs.';
  document.write(sOutput);
}

function backToCatalog() {

  return '';

}

function backToShopLink() {
  var cookieString = document.cookie;
  var refererUrl = "REFERURL";
  var refererUrlExists = cookieString.indexOf(refererUrl);
  var sOutput = "";
  var linkStr = "";

  if(refererUrlExists != -1)
  {
     var start = cookieString.indexOf(refererUrl) + refererUrl.length + 1;
     var end = cookieString.indexOf(";",start);

     if (end == -1)
     {
        end = cookieString.length;
     }

     linkStr = cookieString.substring(start,end);
     if ((linkStr.indexOf('fisher-price.com') == -1) ||
         (linkStr.indexOf('wishlist') > -1) 
        )
     {
        linkStr = "/";
     }

  }
  else
  {
     linkStr = "/";
  }
  return "<a href=\"javaScript:backToShopping('" +
         linkStr + 
         "');\"><img src=\"/checkout/images/bag/btn_backtoshop.gif\" alt=\"Back to Shopping\" border=0></a>";

}
