//
//  @(#)$Header:   //VM/ecom/archives/mbstore/htdocs/store/includes/shoppingBagMessages.js-arc   1.4   Jan 28 2008 09:42:32   flyjames  $
//

function cartHeader() 
{
 return "<td valign=\"top\">" +
        "  <span class=\"cartHeader\">Shopping Cart</span>" + 
        //"<img src=\"/store/assets/images/header_forgotten_password.gif\">" + 
        "</td>";
}

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 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_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 = 'Enter the Key Code from the back of your catalog (e.g., AA111).';
  document.write(sOutput);
}

function Write_QCart_Step2() {
  var sOutput = "";
  sOutput = sOutput + 'Enter Product Codes for items you wish to order (e.g., 50479). 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."';
  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 = "<b><font color=\"red\">You have either selected an item that requires a Club Membership, or you have reached the " +
            "item quantity limit on an online exclusive product. If you exceeded the quantity limit, your quantity " +
            "has been reset to the maximum available for the following item(s)</font></b>:";
  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 included by Smitha
function Write_Point_Limit_Message() {
  var sOutput = "";
  sOutput = '<font color="red">You have selected an item which requires a higher point balance than you currently have available for redemption. Please review your Current Point Balance, then <a href = "http://'+ location.hostname +'/store/hwdept.php?p_sale_group_name=REWARDS%20ITEMS">click here</a> to review which items you can redeem with your points today!</font> ';
  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 = "";
  sOutput = sOutput + '<br><br><br>';
  sOutput = sOutput + '<table width="98%">';
  sOutput = sOutput + '  <tr align="center">';
  sOutput = sOutput + '    <td align="center">';
  sOutput = sOutput + '      <font size="2" face="Arial, Helvetica, sans-serif">';
  sOutput = sOutput + '        <a href="wheels.wrap?proc=terms&action=&securid=" target="_top">Terms and Conditions</a>';
  sOutput = sOutput + '      </font>';
  sOutput = sOutput + '      | ';
  sOutput = sOutput + '      <font size="2" face="Arial, Helvetica, sans-serif">';
  sOutput = sOutput + '        <a href="wheels.wrap?proc=privacy&action=&securid=" target="_top">Privacy Policy</a>';
  sOutput = sOutput + '      </font>';
  sOutput = sOutput + '      | ';
  sOutput = sOutput + '      <font size="2" face="Arial, Helvetica, sans-serif">';
  sOutput = sOutput + '        <a href="wheels.wrap?proc=copyright&action=&securid=" target="_top">Trademarks </a>';
  sOutput = sOutput + '      </font>';
  sOutput = sOutput + '      <br><br>';
  sOutput = sOutput + '    </td>';
  sOutput = sOutput + '  </tr>';
  sOutput = sOutput + '</table>';
  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 still order an additional ' + tierRemaining + ' worth of product and stay at the same shipping rate.';
  document.write(sOutput);
}

function backToCatalog() {

  return '';

}

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

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

// Webtrends tracking code for HW
Tracker.name = "Shopping Bag"; 
Tracker.campaign = CAMPAIGN.NONE; 
Tracker.channel = CHANNEL.HOME; 
Tracker.contenttype = CONTENTTYPE.PRODUCT; 
Tracker.action = ACTION.VIEW;
