 var c = {   MAKER:  1,   YEAR:   2,   MODEL:  3,   PHOTO:  3,   COVER:  0,   FABRIC: 0,   COST:   0,   COLOR:  1,   MAXITEMS: 10,   SHIPUS: 0,   SHIPALASKA: 45,   SHIPCANADA: 35,   SHIPEUROPE: 75,   SHIPASIA: 95,   SHIPAUSTRALIA: 105,   SEARCH_START: 3,   BAG: 15,   BAG_DES: "TRUNK STORAGE BAG",   MID: "342152724278094",  //"750286320693519",   SB: "checkout.",         //"sandbox",   ITEM_COLOR: "#FF0000" } var extras = { bag: 0, item: 0 } var temp_cost = ""; var temp_maker = ""; var temp_model = ""; var temp_fabric = ""; var temp_cover = ""; var temp_year = ""; function pickSB ( ref ) {   extractCar(ref);   parent.frames[0].location.href = "pick_sb.html"; } function extractCar(ref){   var xx = ref.parentNode.parentNode;   var x = ref.parentNode.parentNode.parentNode;   var fabric = xx.childNodes[c.FABRIC].innerHTML.toUpperCase();   var cost = fabric.substring( fabric.indexOf("$")+1 );   temp_maker = x.childNodes[c.MAKER].innerHTML;   temp_model = x.childNodes[c.MODEL].innerHTML;   if ( temp_model.indexOf("PHOTO") > 0) temp_model = temp_model.substring( 0,temp_model.indexOf("<span") ); //remove photo   temp_cover = x.childNodes[c.COVER].innerHTML.replace(' ','');   temp_cost = parseInt(cost.replace('<B>','').replace('</B>',''));   temp_year = x.childNodes[c.YEAR].innerHTML;} function allClear() { hideFabrics(); hideSwatch();} var makers = new Array(); var years = new Array(); var models = new Array(); var fabrics = new Array(); var photos = new Array(); var costs = new Array(); var covers = new Array(); var searchLoaded = false; var searchWaiting = false; function addToCartFabric( button ) { try {   var xx = button.parentNode;   var x = button.parentNode.parentNode;   var fabric = xx.childNodes[c.FABRIC].innerHTML.toUpperCase().replace('<BR>',' ').replace('<BR>',' ').replace('- ','');   fabric = x.id.substring(0,2).replace("TG","Top Gun - ").replace("SB","Sunbrella - ").replace("AQ","Aqualon - ").replace("SU","SurLast - ") + fabric;   var i = covers.length;   if ( i < c.MAXITEMS ) {      makers[i] = temp_maker;      years[i] = temp_year;      models[i] = temp_model;      fabrics[i] = fabric;      costs[i] = temp_cost;      photos[i] = '-'      covers[i] = temp_cover;   }   showCart(); } catch (e) { alert(e); } } function addToCart( button ) {   var xx = button.parentNode;   var x = button.parentNode.parentNode;//   var fabric = xx.childNodes[c.FABRIC].innerHTML.toUpperCase().replace('DF','DURAFIN').replace('SF','SUNFORGER').replace('NH','NOAH').replace('MX','MATRIX');//   var cost = fabric.substring( fabric.indexOf("$")+1 );//   fabric = fabric.substring( 0, fabric.indexOf("$")-1 );   var fabric = xx.className.toUpperCase().replace('DF','DURAFIN').replace('SF','SUNFORGER').replace('NH','NOAH').replace('MX','MATRIX');   var cost = xx.childNodes[c.COST].innerHTML   cost = cost.substring( cost.indexOf("$")+1 );//   fabric = fabric.substring( 0, fabric.indexOf("$")-1 );   if ( fabric.indexOf( "SUNBRELLA" ) >= 0 ){        var list = xx.childNodes[c.FABRIC].childNodes[c.COLOR];        fabric = "SUNBRELLA - " + list.options[ list.selectedIndex ].text + " ( SPECIAL ORDER* )";   }   var i = covers.length;   if ( i < c.MAXITEMS ) {      makers[i] = x.childNodes[c.MAKER].innerHTML;      years[i] = x.childNodes[c.YEAR].innerHTML;      models[i] = x.childNodes[c.MODEL].innerHTML;      if ( models[i].indexOf("PHOTO") > 0) models[i] = models[i].substring( 0,models[i].indexOf("<span") ); //remove photo      fabrics[i] = fabric;      costs[i] = parseInt(cost);      photos[i] = '-'      covers[i] = x.childNodes[c.COVER].innerHTML   }   showCart(); } function addExtra ( extra ) {    extras[extra] += 1;    showCart(); } function removeExtra ( extra ) {    extras[extra] = 0;    showCart(); } function showExtras(extra) { if ( extras[extra] <= 0 ) return ""; return "<tr align='center'>" +        " <td class='text_6' valign='middle'><a href='#' onclick='parent.removeExtra( \"" + extra + "\" );return false'><u>R</u>EMOVE</a>" +        "<img align='middle' src='images/1x1.gif' height='40px' width='1px'></td>" +        " <td>" + (++extras.item) + "</td>" +        " <td class=text_14 align=right>$<b>" + extras[extra] * c[extra.toUpperCase()] + "</b></td>" +        " <td align=left class='text_10'><font color=" + c.ITEM_COLOR + "><b>" + extras[extra] + " - " + c[extra.toUpperCase()+"_DES"] + "</b></font>" +        " </td>" +        " <td></td>" +        " <td></td>" +        " <td></td>" +        " <td></td>" +        "</tr>\n"} function checkoutExtras(extra,j) {    return  "" +      "<input type='hidden' name='item_name_"+(j+1)+"'            value='OPTION #"+extra+"'/>\n" +      "<input type='hidden' name='item_description_"+(j+1)+"'     value=' "+c[extra.toUpperCase()+"_DES"]+"'/>\n" +      "<input type='hidden' name='item_quantity_"+(j+1)+"'        value='"+extras[extra]+"'/>\n" +      "<input type='hidden' name='item_price_"+(j+1)+"'           value='"+( c[extra.toUpperCase()] )+"'/>\n" +      "<input type='hidden' name='item_currency_"+(j+1)+"'        value='USD'/>\n" } function totalExtras() {    return extras["bag"]*c["BAG"]; } function showCart() {  allClear();  var header = "<html><link rel='stylesheet' href='scripts/mcc.css' type='text/css' /><body bgcolor='white'>\n"+               "<form target='_top' method='POST' action='https://checkout.google.com/api/checkout/v2/checkoutForm/Merchant/"+c.MID+"' accept-charset='utf-8'>\n";  var cart = "<br><table class='text_9' cellspacing='2px' cellpadding='4px' align=center>" +             "<tr><td colspan=3 class='header1'>Cart... </td><td colspan=20 class=text_8>Thank you for shopping with us today. Please verify that your selection is correct.<br>" +             "You can still add more items or proceed to the <b>SSL Secure</b> Google Checkout button below. &nbsp;&nbsp;" +             "</td></tr>" +             "<tr align='center' bgcolor=#D6DFF7 class='text_6'><td width='40px'>&nbsp;</td><td width='40px'>ITEM</td><td width='50px'>COST</td><td width='375px' align='left'>COVER - FABRIC - COLOR<br>FOR VEHICLE YEAR-MAKE-MODEL</td>" +             "<td>CONT.<br>U.S.</td><td>ALASKA<br>HAWAII</td><td>CANADA<br>MEXICO</td><td>EUROPE<br>U.K.</td><td>ASIA</td><td>AUSTRALIA<br>NEW<br>ZEALAND</td><td>OTHER<br>COUNTRIES</td></tr>";  var total  = 0;  var j = 0;  for ( j=0; j < covers.length; j++ ) {      cart += "<tr align='center'>" +              " <td class='text_6' valign='middle'><a href='javascript:return(0);' onclick='parent.removeCart(" + j + ")'><u>R</u>EMOVE</a>" +              "<img align='middle' src='images/1x1.gif' height='30px' width='1px'></td>" +              " <td>" + (j+1) + "</td>" +              " <td class=text_14>$<b>" + costs[j] + "</b></td>" +              " <td align=left class='text_10'><font color=" + c.ITEM_COLOR + "><b>Cover " + covers[j] + " : " + fabrics[j] + "</b></font><br>" +              "fits... <b class='text_8'>" + years[j] + " " + makers[j] + " " + (( makers[j] === models[j])?" ":models[j]) + "</b></td>" +              " <td>Free</td>" +              " <td>$" + c.SHIPALASKA + "</td>" +              " <td>$" + c.SHIPCANADA + "</td>" +              " <td>$" + c.SHIPEUROPE + "</td>" +              " <td>$" + c.SHIPASIA + "</td>" +              " <td>$" + c.SHIPAUSTRALIA + "</td>" +              " <td class='text_6'>QUOTE<br>BY EMAIL</td>" +              "</tr>"       total += costs[j] + totalExtras();  }  extras.item = j; //?  cart += showExtras("bag");  cart += "<tr align='center'><td>&nbsp;</td><td align=right>TOTAL</td><td class=text_14 bgcolor=#D6DFF7>$<b>" + total + "</b></td><td align=right>SHIPPING & HANDLING</td>" +          "<td  bgcolor=#D6DFF7>Free</td>" +          "<td  bgcolor=#D6DFF7>$" + (covers.length * c.SHIPALASKA) + "</td>" +          "<td  bgcolor=#D6DFF7>$" + (covers.length * c.SHIPCANADA) + "</td>" +          "<td  bgcolor=#D6DFF7>$" + (covers.length * c.SHIPEUROPE) + "</td>" +          "<td  bgcolor=#D6DFF7>$" + (covers.length * c.SHIPASIA) + "</td>" +          "<td  bgcolor=#D6DFF7>$" + (covers.length * c.SHIPAUSTRALIA) + "</td>" +          "<td  bgcolor=#D6DFF7 class='text_6'>SEE<br>BELOW</td>" +          "</tr>";  cart += "<tr><td>&nbsp;</td></tr>"; // +  "</td></tr>"  cart += "</table>";  var checkout = "<div style='margin-left:80px'>\n"  for ( j=0; j < covers.length; j++ ) {      checkout += "" +                  "<input type='hidden' name='item_name_"+(j+1)+"'            value='Cover "+covers[j]+" - "+fabrics[j]+" Fabric'/>\n" +                  "<input type='hidden' name='item_description_"+(j+1)+"'     value='Fits "+years[j]+" "+makers[j]+" "+models[j]+"'/>\n" +                  "<input type='hidden' name='item_quantity_"+(j+1)+"'        value='1'/>\n" +                  "<input type='hidden' name='item_price_"+(j+1)+"'           value='"+costs[j]+"'/>\n" +                  "<input type='hidden' name='item_currency_"+(j+1)+"'        value='USD'/>\n"  }  if (extras["bag"]) checkout += checkoutExtras("bag",j++);  checkout +=     "<input type='hidden' name='ship_method_name_1'     value='UPS Ground'/>\n" +                  "<input type='hidden' name='ship_method_price_1'    value='" + (covers.length * c.SHIPUS) + "'/>\n" +                  "<input type='hidden' name='ship_method_currency_1' value='USD'/>\n" +                  "<input type='hidden' name='ship_method_us_area_1'  value='CONTINENTAL_48'/>\n" +                  "<input type='hidden' name='checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-2.name' value='UPS AK-HI'/>\n" +                  "<input type='hidden' name='checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-2.price' value='" + (covers.length * c.SHIPALASKA) + "'/>\n" +                  "<input type='hidden' name='checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-2.price.currency' value='USD'/>\n" +                  "<input type='hidden' name='checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-2.shipping-restrictions.allowed-areas.us-state-area-1.state' value='AK'/>\n" +                  "<input type='hidden' name='checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-2.shipping-restrictions.allowed-areas.us-state-area-2.state' value='HI'/>\n" +                  "<input type='hidden' name='checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-3.name' value='USPS UK-Europe'>\n" +                  "<input type='hidden' name='checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-3.price' value='" + (covers.length * c.SHIPEUROPE) + "'>\n" +                  "<input type='hidden' name='checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-3.price.currency' value='USD'>\n" +                  "<input type='hidden' name='checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-3.shipping-restrictions.allowed-areas.postal-area-1.country-code' value='GB'>\n" +                  "<input type='hidden' name='checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-3.shipping-restrictions.allowed-areas.postal-area-2.country-code' value='IE'>\n" +                  "<input type='hidden' name='checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-3.shipping-restrictions.allowed-areas.postal-area-3.country-code' value='FR'>\n" +                  "<input type='hidden' name='checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-3.shipping-restrictions.allowed-areas.postal-area-4.country-code' value='DE'>\n" +                  "<input type='hidden' name='checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-3.shipping-restrictions.allowed-areas.postal-area-5.country-code' value='ES'>\n" +                  "<input type='hidden' name='checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-3.shipping-restrictions.allowed-areas.postal-area-6.country-code' value='IT'>\n" +                  "<input type='hidden' name='checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-3.shipping-restrictions.allowed-areas.postal-area-7.country-code' value='SE'>\n" +                  "<input type='hidden' name='checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-3.shipping-restrictions.allowed-areas.postal-area-8.country-code' value='CH'>\n" +                  "<input type='hidden' name='checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-3.shipping-restrictions.allowed-areas.postal-area-9.country-code' value='NL'>\n" +                  "<input type='hidden' name='checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-3.shipping-restrictions.allowed-areas.postal-area-10.country-code' value='NO'>\n" +                  "<input type='hidden' name='checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-3.shipping-restrictions.allowed-areas.postal-area-11.country-code' value='FI'>\n" +                  "<input type='hidden' name='checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-3.shipping-restrictions.allowed-areas.postal-area-12.country-code' value='AT'>\n" +                  "<input type='hidden' name='checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-3.shipping-restrictions.allowed-areas.postal-area-13.country-code' value='DK'>\n" +                  "<input type='hidden' name='checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-4.name' value='USPS CAN-MEX'>\n" +                  "<input type='hidden' name='checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-4.price' value='" + (covers.length * c.SHIPCANADA) + "'>\n" +                  "<input type='hidden' name='checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-4.price.currency' value='USD'>\n" +                  "<input type='hidden' name='checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-4.shipping-restrictions.allowed-areas.postal-area-1.country-code' value='CA'>\n" +                  "<input type='hidden' name='checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-4.shipping-restrictions.allowed-areas.postal-area-2.country-code' value='MX'>\n" +                  "<input type='hidden' name='checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-5.name' value='USPS ASIA'>\n" +                  "<input type='hidden' name='checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-5.price' value='" + (covers.length * c.SHIPASIA) + "'>\n" +                  "<input type='hidden' name='checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-5.price.currency' value='USD'>\n" +                  "<input type='hidden' name='checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-5.shipping-restrictions.allowed-areas.postal-area-1.country-code' value='JP'>\n" +                  "<input type='hidden' name='checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-5.shipping-restrictions.allowed-areas.postal-area-2.country-code' value='CN'>\n" +                  "<input type='hidden' name='checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-5.shipping-restrictions.allowed-areas.postal-area-3.country-code' value='KR'>\n" +                  "<input type='hidden' name='checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-5.shipping-restrictions.allowed-areas.postal-area-4.country-code' value='TW'>\n" +                  "<input type='hidden' name='checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-5.shipping-restrictions.allowed-areas.postal-area-5.country-code' value='SG'>\n" +                  "<input type='hidden' name='checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-6.name' value='USPS AUST-NZ'>\n" +                  "<input type='hidden' name='checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-6.price' value='" + (covers.length * c.SHIPAUSTRALIA) + "'>\n" +                  "<input type='hidden' name='checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-6.price.currency' value='USD'>\n" +                  "<input type='hidden' name='checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-6.shipping-restrictions.allowed-areas.postal-area-1.country-code' value='AU'>\n" +                  "<input type='hidden' name='checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-6.shipping-restrictions.allowed-areas.postal-area-2.country-code' value='NZ'>\n" +                  "<input type='hidden' name='tax_us_state'         value='MI'/>\n" +                  "<input type='hidden' name='tax_rate'             value='0.06'/>\n" +                  "<input type='hidden' name='_charset_'/>\n" +                  "<table><tr><td>" +                  "<div style='padding:10px;border-style:solid;border-width:1px;border-color:gray;width:420px;' class='text_8'>" +                  "<img src='images/bag.gif' align=left>" +                  "&nbsp;<span class='text_10'><b>Keep Your Cover Clean When Not In Use.</b></span><br><br>" +                  "&nbsp;<img src='images/order.gif' onclick='parent.addExtra(\"bag\")' />&nbsp;$15 Trunk Storage Bag<br><br><br></div>" +                  "</td><td></td><td align=center class=text_7 valign=middle width=450px>\n" +                  "<span style='color:red'>Required:</span>" +                  //"<input id='i_agree' name='i_agree' type='checkbox' onchange='ia()'/>" +                  "&nbsp;Please read the purchase terms below before checking out.<br><br>\n" +                  "<input type='image' id='sbc_gcgo' name='Google Checkout' alt='Fast checkout through Google' " +                   "src='http://" + c.SB + "google.com/buttons/checkout.gif?merchant_id=" + c.MID +                   "&w=180&h=46&style=white&variant=text&loc=en_US' height='46' width='180'/>\n" +                  "<img src='images/1x1.gif' width='50px' height='1px'><img src='images/allcards2x2.gif' alt='Google Checkout Accepted Cards' /><img src='images/1x1.gif' width='1px' />" +                  "<input type='hidden' name='checkout-flow-support.merchant-checkout-flow-support.continue-shopping-url' value='http://miCarCovers.com'>" +                  "<br><br>\n" +                  "</td></tr></table>"+                  "</div>\n";  var disclaimer = "<div class='text_7' style='margin-left:80px;color:gray'>" +                   "<b>PURCHASE TERMS</b>:<br><br>" +                   "&nbsp;- PAYMENT: Online via Google Checkout with AMEX, DISCOVER, MASTERCARD, VISA: By Phone with MASTERCARD, VISA.<br><br>" +//                   "&nbsp;- CANCELLATIONS are not allowed after your fabric has been cut (typically within 24 hours of ordering).<br><br>" +                   "&nbsp;- RETURNS within 14 days. A restocking fee may apply. <br><br>" +                   "&nbsp;- NO RETURNS on covers with <b>PREMIUM FABRICS</b> (Sunbrella), <b>CUSTOM ADDITIONS</b> or for <b>OLDER MODEL-YEAR</b> cars (pre 1940)...<br> &nbsp;&nbsp;&nbsp; These covers are made special for your order and cannot be returned.<br><br>" +                   "<b>SHIP METHOD</b>: U.S. - UPS Ground, International - USPS.<br><br>" +                   "<b>INTERNATIONAL SHIPPING</b>: If your country does not appear on our list then please email us your ship-to location and cover selections ... <b>'info@miCarCovers.com'</b>.<br>" +                   "We will email you an invoice with the calculated shipping fee and a <b>link to process that invoice via Google Checkout online</b>.<br><br>" +                   "<b>MULTIPLE COVER SHIPPING DISCOUNT</b>: Our international shipping rates are listed at or below our cost for shipping one cover per box. On multiple cover orders<br>" +                   "we will attempt to combine 2-3 per box and deduct any savings when your card is charged. Continental U.S. shipping is unchanged with multiple covers.<br><br>" +                   "</div>" +                   "<script language='javascript'>function ia(){if(document.getElementById(\"i_agree\").checked==false){document.getElementById(\"sbc_gcgo\").disabled=true;}else{document.getElementById(\"sbc_gcgo\").disabled=false;}}</script>;"  if (covers.length==0){     cart += "<br>";  } else {     cart += checkout;  }  parent.frames[0].document.open();  parent.frames[0].document.write( header + cart + "</form>" + disclaimer + "</body></html>");  parent.frames[0].document.close();  document.getElementById("IFRAME_PANEL").style.visibility="visible";  document.getElementById("IFRAME_SEARCH").style.visibility="hidden";  document.getElementById("HOME_PANEL").style.visibility="hidden"; } function showGroupOrderForm ( group ) {  document.getElementById("IFRAME_PANEL").style.visibility="visible";  document.getElementById("IFRAME_SEARCH").style.visibility="hidden";  document.getElementById("HOME_PANEL").style.visibility="hidden";  frames[0].location.href = group + ".htm"; } function showHomePage ( ) {  allClear();  document.getElementById("IFRAME_PANEL").style.visibility="hidden";  document.getElementById("IFRAME_SEARCH").style.visibility="hidden";  document.getElementById("HOME_PANEL").style.visibility="visible"; } function showInline ( ) {  allClear();  document.getElementById("IFRAME_PANEL").style.visibility="visible";  document.getElementById("IFRAME_SEARCH").style.visibility="hidden";  document.getElementById("HOME_PANEL").style.visibility="hidden"; } function showBox ( box ) {  allClear();  document.getElementById("FLOAT_"+box).style.visibility="visible"; } function hideBox ( box ) {  document.getElementById("FLOAT_"+box).style.visibility="hidden"; } function showPhoto( link ) {  var x = link.parentNode.parentNode.parentNode;  var temp_model = x.childNodes[c.MODEL].innerHTML;  if ( temp_model.indexOf("PHOTO") > 0) temp_model = temp_model.substring( 0,temp_model.indexOf("<span") ); //remove photo  document.getElementById("photoimage").src="photos/"+link.id+".jpg";  document.getElementById("photoname").innerHTML=x.childNodes[c.YEAR].innerHTML+" "+x.childNodes[c.MAKER].innerHTML+" "+temp_model+" ( Cover "+x.childNodes[c.COVER].innerHTML+" )";  document.getElementById("photobox").style.visibility="visible"; } function showPhotoHome( photo, year, maker, model, cover ) {  document.getElementById("photoimage").src="photos/"+photo+".jpg";  document.getElementById("photoname").innerHTML=year+" "+maker+" "+model+" ( Cover "+cover+" )";  document.getElementById("photobox").style.visibility="visible"; } function hidePhoto() {  document.getElementById("photobox").style.visibility="hidden";  document.getElementById("photoimage").src="images/1x1.gif"; } function showSwatch( e ) {  var etarget = (e.target || e.srcElement);  var p = etarget.parentNode;  var x = 500;  var y = 250;//  var x = etarget.x;//  var y = etarget.y;  var price = p.childNodes[0].innerHTML  var swatch = p.className;  var model = p.parentNode.childNodes[c.YEAR].innerHTML + " " + p.parentNode.childNodes[c.MAKER].innerHTML + "<br>" + p.parentNode.childNodes[c.MODEL].innerHTML ;  var i,n,t;  switch ( swatch ) {   case "mx": i="matrix_fabric0"; n="MATRIX"; t="3-PLY WAFFLE"; break;   case "nh": i="noah_fabric0"; n="NOAH"; t="4-PLY WAFFLE"; break;   case "sf": i="sunforger_fabric0"; n="SUNFORGER"; t="Woven, Flannel Lined"; break;   case "df": i="durafin_fabric0"; n="DURAFIN"; t="Woven, Flannel Lined"; break;   default: i="1x1"; n=""; t=""; break;  }  document.getElementById("swatchimage").src="images/"+i+".jpg";  document.getElementById("swatchname").innerHTML=n;  document.getElementById("swatchtext").innerHTML=t;  document.getElementById("swatchprice").innerHTML=price;  document.getElementById("swatchmodel").innerHTML=model;  document.getElementById("swatchbox").style.left=Math.round(x/10)*10-150;  document.getElementById("swatchbox").style.top=y+20;  document.getElementById("swatchbox").style.visibility="visible"; } function hideSwatch() {  document.getElementById("swatchbox").style.visibility="hidden";  document.getElementById("swatchimage").src="images/1x1.gif"; } function flcrmb( nc ) {  document.getElementById('CRUMB_BAR').style.background=nc; } function removeCart(line) {    var s;    if ( covers.length == 1 ) {      makers = new Array();      years = new Array();      models = new Array();      fabrics = new Array();      photos = new Array();      costs = new Array();      covers = new Array();    } else if ( line < covers.length ){      for ( var j=line; j < covers.length-1; j++ ) {          costs[j] = costs[j+1];          covers[j] = covers[j+1];          fabrics[j] = fabrics[j+1];          years[j] = years[j+1];          makers[j] = makers[j+1];          models[j] = models[j+1];          costs[j] = costs[j+1];      }      s=makers.pop();      s=years.pop();      s=models.pop();      s=fabrics.pop();      s=photos.pop();      s=costs.pop();      s=covers.pop();    }    showCart(); }  // // FABRIC VIEWER // var safari = ( navigator.userAgent.toUpperCase().indexOf("SAFARI")>-1)?true:false; var viewing = false; var countDown = 0; function showFabric1( fabric, desc ) {  viewing = true;  document.getElementById("fabricimage1").src="images/1x1.gif";  document.getElementById("fabricimage3").src="images/1x1.gif";  document.getElementById("fabricimage1").src="images/fabrics/"+fabric+".jpg";  document.getElementById("fabricimage3").src="images/fabrics/"+fabric+".jpg";  document.getElementById("fabricname1").innerHTML = desc;  document.getElementById("fabricbox").style.visibility="visible"; } function setFabric2( fabric, desc ) {  document.getElementById("fabricimage2").src="images/1x1.gif";  document.getElementById("fabricimage4").src="images/1x1.gif";  document.getElementById("fabricimage2").src="images/fabrics/"+fabric+".jpg";  document.getElementById("fabricimage4").src="images/fabrics/"+fabric+".jpg";  document.getElementById("fabricname2").innerHTML = desc; } function hideFabrics() {  viewing = false;  document.getElementById("fabricbox").style.visibility="hidden"; } function scrollFabricsOff(e) { return;/*  if(viewing && safari){   if (countDown == 0){    document.getElementById("fabricbox").style.visibility="hidden";    setTimeout("scrollFabricsOn()",250);   }   countDown = 4;  }*/ } function scrollFabricsOn() {  if (--countDown == 1){   if (safari) frames[0].location.reload(); //do for safari only  }  if (countDown == 0){   document.getElementById("fabricbox").style.visibility="visible";   viewing = true;  } else {   setTimeout("scrollFabricsOn()",250);  } }//// SEARCH//  function loadSearch() {   parent.frames[0].document.open();   parent.frames[0].document.write( "<html><head> <link rel='stylesheet' href='scripts/mcc.css' type='text/css' /> </head>" +                                    "<body class='white_10' bgcolor=#404040><br><br><br><br><br><div align='center'>&nbsp;&nbsp;Loading Search...one moment please... </div></body></html>");   parent.frames[0].document.close();   frames[1].location.href = "all2.html"; } function initSearch() {    searchLoaded = true;    if (searchWaiting) {       searchWaiting = false;       searchFor();    } else {       parent.document.getElementById("srchtxt").style.background="#FFFFFF";    } } function searchFor() {    if (!searchLoaded) {       searchWaiting = true;       parent.frames[0].document.open();       parent.frames[0].document.write( "<html><head> <link rel='stylesheet' href='scripts/mcc.css' type='text/css' /> </head>" +                                        "<body class='white_10' bgcolor=#404040><br><br><br><br><br><div align='center'>&nbsp;&nbsp;Loading Search...one moment please... </div></body></html>");       parent.frames[0].document.close();       showInline();       return;    }    var found = "";    var bc = "#FFFFAA"    var key = parent.document.getElementById("srchtxt").value.toUpperCase();    if (key == "") key = "*";    var s = parent.frames[1].document.getElementsByTagName("tr");    var lastMake = "";    var header = "<html><head>\n <link rel='stylesheet' href='scripts/mcc.css' type='text/css' /> </head> <title></title>\n" +                 "<body class='text_8'>\n" +                 "<script language='javascript'>if (top.showInline){top.showInline();}else{top.location.href = 'index.htm';} function ss(e){parent.showSwatch(e);} function hs(){parent.hideSwatch();} function p1( fc ){parent.pickSB( fc );} function o( fc ){parent.addToCart( fc );} function r(fc){parent.remove(fc);} function s(name){parent.showPhoto(name);} function h(){parent.hidePhoto();}</script>\n" +                 "" +                 "<table class='text_7' width='970px' cellpadding=0 cellspacing=0>\n" +                 "<tr valign='middle' height='45px'><td colspan=20 background='images/blend45.jpg'>&nbsp;<font color='gray' class='text_12'><b>&nbsp; SEARCH FOR... '" + key + "'</b></font>&nbsp; To place a cover in the CART click <img src='images/order.gif' /> by the fabric choice.</td></tr>\n" +                 "<tr  height='20px' bgcolor=#FFFFAA align=center><td width='35px'><b>COVER</b></td><td align='right'width='75px'><b>MAKE</b></td><td width='75px'><b>YEAR</b></td><td align=left width='300px'><b>MODEL</b></td><td>&nbsp;&nbsp;&nbsp;</td><td><b>MATRIX</b></td><td><b>NOAH</b></td><td><b>SUNFORGER</b></td><td><b>DURAFIN</b></td><td><b>SUNBRELLA</b></td></tr>"//               "<tr  height='20px' bgcolor=#F0EFD4 align=center><td align='right'width='100px'><b>MAKE</b></td><td width='75px'><b>YEAR</b></td><td align=left width='210px'><b>MODEL</b></td><td width='60px'></td><td width='45px'><b>COVER</b></td><td>&nbsp;&nbsp;&nbsp;</td><td><b>NOAH</b></td><td><b>SUNFORGER</b></td><td><b>DURAFIN</b></td><td><b>SUNBRELLA</b></td></tr>\n";    if (key == "*") key = " ";    if (s){      for (var i=c.SEARCH_START;i<s.length;i++){        if ( s[i].cells[c.MODEL].innerHTML.indexOf(key) >=0 ||             s[i].cells[c.MAKER].innerHTML.indexOf(key) >=0 ||             s[i].cells[c.COVER].innerHTML.indexOf(key) >=0 ||             s[i].cells[c.YEAR].innerHTML.indexOf(key)>=0 )        {          if ( lastMake == "" )             lastMake = s[i].cells[c.MAKER].innerHTML;          if ( s[i].cells[c.MAKER].innerHTML.indexOf(lastMake) < 0 ) {             if ( bc=="#FFFFFF" ){                bc = "#FFFFAA";             } else {                bc = "#FFFFFF";             }             found += "<tr onmouseout='hs()' class='text_9' height='20px' bgcolor=" + bc + "><td colspan=20>&nbsp;</td></tr>\n";          }          lastMake = s[i].cells[c.MAKER].innerHTML;          s[i].style.background=bc;          if ( bc=="#FFFFFF" ){             bc = "#FFFFAA";             found += "<tr onmouseout='hs()' class='text_9' height='20px' bgcolor=" + bc + ">" + s[i].innerHTML + "</tr>\n";          } else {             bc = "#FFFFFF";             found += "<tr onmouseout='hs()' class='text_9' height='20px' bgcolor=" + bc + ">" + s[i].innerHTML + "</tr>\n";          }        }      }    }    s = null;    parent.frames[0].document.open();    parent.frames[0].document.write( header + found + "</table></body></html>");    parent.frames[0].document.close();    showInline(); }