//=====================================================================||





//               NOP Design JavaScript Shopping Cart                   ||





//                                                                     ||





// For more information on SmartSystems, or how NOPDesign can help you ||





// Please visit us on the WWW at http://www.nopdesign.com              ||





//                                                                     ||





// Javascript portions of this shopping cart software are available as ||





// freeware from NOP Design under the GPL.  You must keep this comment ||





// unchanged in your code.  For more information contact               ||





// Scott@NopDesign.com                                                 ||





//                                                                     ||





// JavaScript Shop Module, V.4.1.0                                     ||





//=====================================================================||











//---------------------------------------------------------------------||





// FUNCTION:    CKquantity                                             ||





// PARAMETERS:  Quantity to                                            ||





// RETURNS:     Quantity as a number, and possible alert               ||





// PURPOSE:     Make sure quantity is represented as a number          ||





//---------------------------------------------------------------------||





function CKquantity(checkString) {





   strNewQuantity = "";











   for ( i = 0; i < checkString.length; i++ ) {





      ch = checkString.substring(i, i+1);





      if ( (ch >= "0" && ch <= "9") || (ch == '.') )





         strNewQuantity += ch;





      else





         return "1";





   }











   if ( strNewQuantity.length < 1 )





      strNewQuantity = "1";











   return(strNewQuantity);





}











//---------------------------------------------------------------------||





// FUNCTION:    AddToCart                                              ||





// PARAMETERS:  Form Object                                            ||





// RETURNS:     Cookie to user's browser, with prompt                  ||





// PURPOSE:     Adds a product to the user's shopping cart             ||





//---------------------------------------------------------------------||





function AddToCart(thisForm, origin) {





   iNumberOrdered = 0;





   iNumberOrdered = GetCookie("NumberOrdered");





   iNumberOrdered++;











   if ( iNumberOrdered > 12 ) {





      alert("I'm Sorry, your cart is full, please proceed to checkout.");





       SetCookie("OriginPage", origin, null, "/");





   }





   else {





      if ( thisForm.ID_NUM == null )





         strID_NUM    = "";





      else





         strID_NUM    = thisForm.ID_NUM.value;





      





      if ( thisForm.QUANTITY == null )





         strQUANTITY  = "1";





      else





         strQUANTITY  = thisForm.QUANTITY.value;





      





      if ( thisForm.PRICE == null )





         strPRICE     = "0.00";





      else





         strPRICE     = thisForm.PRICE.value;





      





      if ( thisForm.NAME == null )





         strNAME      = "";





      else





         strNAME      = thisForm.NAME.value;





      





      if ( thisForm.SHIPPING == null )





         strSHIPPING  = "0.00";





      else





         strSHIPPING  = thisForm.SHIPPING.value;





      





      if ( thisForm.ADDITIONALINFO == null )





         strADDTLINFO = "";





      else





         strADDTLINFO = thisForm.ADDITIONALINFO[thisForm.ADDITIONALINFO.selectedIndex].value;











      dbUpdatedOrder = strID_NUM    + "|" + 





                       strQUANTITY  + "|" +





                       strPRICE     + "|" +





                       strNAME      + "|" +





                       strSHIPPING  + "|" +





                       strADDTLINFO;











      strNewOrder = "Order." + iNumberOrdered;





      SetCookie(strNewOrder, dbUpdatedOrder, null, "/");





      SetCookie("NumberOrdered", iNumberOrdered, null, "/");





      SetCookie("OriginPage", origin, null, "/");





      notice = strQUANTITY + " " + strNAME + " added to your shopping cart.";





   }





}

















//---------------------------------------------------------------------||





// FUNCTION:    getCookieVal                                           ||





// PARAMETERS:  offset                                                 ||





// RETURNS:     URL unescaped Cookie Value                             ||





// PURPOSE:     Get a specific value from a cookie                     ||





//---------------------------------------------------------------------||





function getCookieVal (offset) {





   var endstr = document.cookie.indexOf (";", offset);











   if ( endstr == -1 )





      endstr = document.cookie.length;





   return(unescape(document.cookie.substring(offset, endstr)));





}

















//---------------------------------------------------------------------||





// FUNCTION:    FixCookieDate                                          ||





// PARAMETERS:  date                                                   ||





// RETURNS:     date                                                   ||





// PURPOSE:     Fixes cookie date, stores back in date                 ||





//---------------------------------------------------------------------||





function FixCookieDate (date) {





   var base = new Date(0);





   var skew = base.getTime();











   date.setTime (date.getTime() - skew);





}

















//---------------------------------------------------------------------||





// FUNCTION:    GetCookie                                              ||





// PARAMETERS:  Name                                                   ||





// RETURNS:     Value in Cookie                                        ||





// PURPOSE:     Retrieves cookie from users browser                    ||





//---------------------------------------------------------------------||





function GetCookie (name) {

















   var arg = name + "=";





   var alen = arg.length;





   var clen = document.cookie.length;











   





   var i = 0;











   while ( i < clen ) {





      var j = i + alen;





      if ( document.cookie.substring(i, j) == arg ) return(getCookieVal (j));





      i = document.cookie.indexOf(" ", i) + 1;





      if ( i == 0 ) break;





   }











   return(null);





}

















//---------------------------------------------------------------------||





// FUNCTION:    SetCookie                                              ||





// PARAMETERS:  name, value, expiration date, path, domain, security   ||





// RETURNS:     Null                                                   ||





// PURPOSE:     Stores a cookie in the users browser                   ||





//---------------------------------------------------------------------||





function SetCookie (name,value,expires,path,domain,secure) {





   document.cookie = name + "=" + escape (value) +





                     ((expires) ? "; expires=" + expires.toGMTString() : "") +





                     ((path) ? "; path=" + path : "") +





                     ((domain) ? "; domain=" + domain : "") +





                     ((secure) ? "; secure" : "");





}

















//---------------------------------------------------------------------||





// FUNCTION:    DeleteCookie                                           ||





// PARAMETERS:  Cookie name, path, domain                              ||





// RETURNS:     null                                                   ||





// PURPOSE:     Removes a cookie from users browser.                   ||





//---------------------------------------------------------------------||





function DeleteCookie (name,path,domain) {





   if ( GetCookie(name) ) {





      document.cookie = name + "=" +





                        ((path) ? "; path=" + path : "") +





                        ((domain) ? "; domain=" + domain : "") +





                        "; expires=Thu, 01-Jan-70 00:00:01 GMT";





   }





}

















//---------------------------------------------------------------------||





// FUNCTION:    MoneyFormat                                            ||





// PARAMETERS:  Number to be formatted                                 ||





// RETURNS:     Formatted Number                                       ||





// PURPOSE:     Reformats Dollar Amount to #.## format                 ||





//---------------------------------------------------------------------||





function moneyFormat(input) {





   var dollars = Math.floor(input);





   var tmp = new String(input);











   for ( var decimalAt = 0; decimalAt < tmp.length; decimalAt++ ) {





      if ( tmp.charAt(decimalAt)=="." )





         break;





   }











   var cents  = "" + Math.round(input * 100);





   cents = cents.substring(cents.length-2, cents.length)





           dollars += ((tmp.charAt(decimalAt+2)=="9")&&(cents=="00"))? 1 : 0;











   if ( cents == "0" )





      cents = "00";











   return(dollars + "." + cents);





}











function zipFormat(input) {





   return Math.floor(input);











}

















//---------------------------------------------------------------------||





// FUNCTION:    RemoveFromCart                                         ||





// PARAMETERS:  Order Number to Remove                                 ||





// RETURNS:     Null                                                   ||





// PURPOSE:     Removes an item from a users shopping cart             ||





//---------------------------------------------------------------------||





function RemoveFromCart(RemOrder) {





   if ( confirm("Click 'Ok' to remove this product from your shopping cart.") ) {





      NumberOrdered = GetCookie("NumberOrdered");





      if (NumberOrdered <= 0)





      	return;





      for ( i=RemOrder; i < NumberOrdered; i++ ) {





         NewOrder1 = "Order." + (i+1);





         NewOrder2 = "Order." + (i);





         database = GetCookie(NewOrder1);





         SetCookie (NewOrder2, database, null, "/");





      }





      NewOrder = "Order." + NumberOrdered;





      SetCookie ("NumberOrdered", NumberOrdered-1, null, "/");





      DeleteCookie(NewOrder, "/");





      location.href=location.href;





   }





}

















//---------------------------------------------------------------------||





// FUNCTION:    GetFromCart                                            ||





// PARAMETERS:  Null                                                   ||





// RETURNS:     Product Table Written to Document                      ||





// PURPOSE:     Draws current cart product table on HTML page          ||





//---------------------------------------------------------------------||





function GetFromCart( wShipping ) {





   if( wShipping )





      WriteToForm( true, true );





   else





      WriteToForm( true, false );





}











function UpdateQuantity( OrderNum, newQuant, oldQuant ) {





   strQuant = CKquantity(newQuant);   











      strNewOrder = "Order." + OrderNum;











      database = "";





      database = GetCookie(strNewOrder);











      Token0 = database.indexOf("|", 0);





      Token1 = database.indexOf("|", Token0+1);





      Token2 = database.indexOf("|", Token1+1);





      Token3 = database.indexOf("|", Token2+1);





      Token4 = database.indexOf("|", Token3+1);











      fields = new Array;





      strID_NUM = database.substring( 0, Token0 );





      strQUANTITY = strQuant;





      strPRICE = database.substring( Token1+1, Token2 );





      strNAME = database.substring( Token2+1, Token3 );





      strSHIPPING = database.substring( Token3+1, Token4 );





      strADDTLINFO = database.substring( Token4+1, database.length );











      dbUpdatedOrder = strID_NUM    + "|" + 





                       strQUANTITY  + "|" +





                       strPRICE     + "|" +





                       strNAME      + "|" +





                       strSHIPPING  + "|" +





                       strADDTLINFO;





      SetCookie(strNewOrder, dbUpdatedOrder, null, "/");





      location.href=location.href;





   





}











function CalculateTS( ZipCode ) {





   newzip = "";





   if (ZipCode == null) {





      alert("The Zip Code you entered is invalid.");





      return;





   }





   else if (ZipCode == "INTER") {





   	TSdata = "0.00|0.00|" + ZipCode; 





   	SetCookie("TaxShip", TSdata, null, "/");   





   	return;





   }





//   if (ZipCode.length != 5) {





   if ((ZipCode.length < 5) || (ZipCode.length > 6)) {





      alert("The Zip Code you entered is invalid.");





      return;





   }   





   for ( i = 0; i < ZipCode.length; i++ ) {





      ch = ZipCode.substring(i, i+1);





      if ( (ch >= "0" && ch <= "9"))





         newzip += ch;





      else {





         alert("The Zip Code you entered is invalid.");





         return;





      }





   }











   fWeight = 0;





   fTax = 0;





   fShip = 0;





   fWeight=0;





   fSubTotal = 0;





   addTax1 = false;





   addTax2 = false;





   iNumberOrdered = GetCookie("NumberOrdered");





   





    TSdata = moneyFormat(fTax) + "|" + moneyFormat(fShip) + "|" + ZipCode;   





   SetCookie("TaxShip", TSdata, null, "/");











   if ( parseInt(ZipCode) >= 90000 && parseInt(ZipCode) < 96600 )





         addTax2 = true;





   





   if ( parseInt(ZipCode) == 94501 || parseInt(ZipCode) == 94502 || parseInt(ZipCode) == 94706 || 





	( parseInt(ZipCode) >= 94701 && parseInt(ZipCode) <= 94720 ) || parseInt(ZipCode) == 94546 || parseInt(ZipCode) == 94552 || 





	parseInt(ZipCode) == 94568 || parseInt(ZipCode) == 94608 || parseInt(ZipCode) == 94662 || 





	parseInt(ZipCode) == 94536 || parseInt(ZipCode) == 94537 || parseInt(ZipCode) == 94538 ||





	parseInt(ZipCode) == 94539 || parseInt(ZipCode) == 94555 || parseInt(ZipCode) == 94552 || 





	( parseInt(ZipCode) >= 94540 && parseInt(ZipCode) <= 94546 ) || parseInt(ZipCode) == 94557 || parseInt(ZipCode) == 94550 ||





	parseInt(ZipCode) == 94551 || parseInt(ZipCode) == 94560 || parseInt(ZipCode) == 94602 ||  





	parseInt(ZipCode) == 94610 || parseInt(ZipCode) == 94611 || parseInt(ZipCode) == 94618 ||  





	parseInt(ZipCode) == 94620 || parseInt(ZipCode) == 94566 || parseInt(ZipCode) == 94568 ||   





	parseInt(ZipCode) == 94588 || parseInt(ZipCode) == 94577 || parseInt(ZipCode) == 94578 ||   





	parseInt(ZipCode) == 94579 || parseInt(ZipCode) == 94580 || parseInt(ZipCode) == 94586 ||    





	parseInt(ZipCode) == 94587 || ( parseInt(ZipCode) >= 94601 && parseInt(ZipCode) <= 94666 ) )





         addTax1 = true;











   for ( i = 1; i <= iNumberOrdered; i++ ) {





      NewOrder = "Order." + i;





      database = "";





      database = GetCookie(NewOrder);











      Token0 = database.indexOf("|", 0);





      Token1 = database.indexOf("|", Token0+1);





      Token2 = database.indexOf("|", Token1+1);





      Token3 = database.indexOf("|", Token2+1);





      Token4 = database.indexOf("|", Token3+1);











      fields = new Array;





      fields[0] = database.substring( 0, Token0 );





      fields[1] = database.substring( Token0+1, Token1 );





      fields[2] = database.substring( Token1+1, Token2 );





      fields[3] = database.substring( Token2+1, Token3 );





      fields[4] = database.substring( Token3+1, Token4 );





      fields[5] = database.substring( Token4+1, database.length );











      if (fields[4] == "wpackage" || parseFloat(fields[4]) > 10 || fWeight > 100)





      	fShip += parseInt(fields[1]) * parseFloat(calculateGround( fields[4], ZipCode ));





      else





      	fWeight += parseInt(fields[1]) * parseFloat(fields[4]);





      fSubTotal += ( parseInt(fields[1]) * parseFloat( fields[2] ));











   }





   fShip += parseFloat(calculateGround(moneyFormat(fWeight), ZipCode ));





   





   if (addTax1) {





      fTax = ( (fShip + fSubTotal) * 0.0875 );





   }  





   else if (addTax2) {





      fTax = ( (fShip + fSubTotal) * 0.0875 );





   }





   fShip = fShip * 1.05;





   





   zip = parseInt(ZipCode);





   if ((zip >= 600 && zip <= 999) || (zip >= 9000 && zip <= 9999) || (zip >= 34000 && zip <= 34099) ||





      (zip >= 96200 && zip <= 96999) || (zip >= 99500 && zip <= 99999)) {





   	TSdata = moneyFormat(fTax) + "|" + moneyFormat(fShip) + "|CONTACT US";  





   }





   else





   	TSdata = moneyFormat(fTax) + "|" + moneyFormat(fShip) + "|" + ZipCode; 





   





   SetCookie("TaxShip", TSdata, null, "/");   





}











//---------------------------------------------------------------------||





// FUNCTION:    WriteToForm                                            ||





// PARAMETERS:  Null                                                   ||





// RETURNS:     Product hidden fields Written to Document              ||





// PURPOSE:     Draws current cart product hidden fields on HTML form  ||





//              if bDisplay == true, shows cart output as HTML table   ||





//---------------------------------------------------------------------||





function ShowSubtotal() {











   iNumberOrdered = 0;





   fTotal         = 0;





   strSubTotal       = "";





   strOutput      = "";





   





   iNumberOrdered = GetCookie("NumberOrdered");











   if (iNumberOrdered == null) {





      strOutput = "<font face=\"VERDANA\" size=\"2\">Your Shopping Cart is Empty</font>";





      originURL = GetCookie("OriginPage");





      if (originURL == null)





      	originURL = "../index.htm"; 





  	else if (originURL.substring( originURL.length-4, originURL.length ) != ".htm")





   		originURL = "../index.htm";  











      strOutput +="<br><br><a href=\"" + originURL + "\"><img border=0 SRC=\"../images/bresume.gif\"></a>"





    	strOutput += "<br>";





	document.write(strOutput);





   	document.close();





   	return;





   }





   





   if (iNumberOrdered < 1) {





      strOutput = "<font face=\"VERDANA\" size=\"2\">Your Shopping Cart is Empty</font>";





      originURL = GetCookie("OriginPage");





      if (originURL == null)





      	originURL = "../index.htm"; 





  	else if (originURL.substring( originURL.length-4, originURL.length ) != ".htm")





   		originURL = "../index.htm";  











      strOutput +="<br><br><a href=\"" + originURL + "\"><img border=0 SRC=\"../images/bresume.gif\"></a>"





    	strOutput += "<br>";





	document.write(strOutput);





   	document.close();





   	return;





   }

















   strOutput = "<TABLE><TR>" +





               "<TD><font face=\"VERDANA\" size=\"2\"><B>PRODUCT ID&nbsp;&nbsp;</B></font></TD>" +





               "<TD><font face=\"VERDANA\" size=\"2\"><B>&nbsp;&nbsp;PRODUCT NAME / DESCRIPTION&nbsp;&nbsp;</B></font></TD>"+





               "<TD><font face=\"VERDANA\" size=\"2\"><B>&nbsp;&nbsp;QUANTITY&nbsp;&nbsp;</B></font></TD>" +





               "<TD><font face=\"VERDANA\" size=\"2\"><B>&nbsp;&nbsp;PRICE&nbsp;&nbsp;</B></font></TD>" +





               "<TD><font face=\"VERDANA\" size=\"2\"><B></B></font></TD></TR>";





               





   











   for ( i = 1; i <= iNumberOrdered; i++ ) {





      NewOrder = "Order." + i;





      database = "";





      database = GetCookie(NewOrder);











      Token0 = database.indexOf("|", 0);





      Token1 = database.indexOf("|", Token0+1);





      Token2 = database.indexOf("|", Token1+1);





      Token3 = database.indexOf("|", Token2+1);





      Token4 = database.indexOf("|", Token3+1);











      fields = new Array;





      fields[0] = database.substring( 0, Token0 );





      fields[1] = database.substring( Token0+1, Token1 );





      fields[2] = database.substring( Token1+1, Token2 );





      fields[3] = database.substring( Token2+1, Token3 );





      fields[4] = database.substring( Token3+1, Token4 );





      fields[5] = database.substring( Token4+1, database.length );











      fTotal     += (parseInt(fields[1]) * parseFloat(fields[2]) );





      strSubTotal    = moneyFormat(fTotal);

















      strOutput += "<TR valign=\"CENTER\"><form><TD><font face=\"tahoma\" size=\"2\">"  + fields[0] + "</font>&nbsp;&nbsp;</TD>";











      if ( fields[5] == "" )





         strOutput += "<TD>&nbsp;&nbsp;<font face=\"tahoma\" size=\"2\">"  + fields[3] + "</font>&nbsp;&nbsp;</TD>";





      else





         strOutput += "<TD>&nbsp;&nbsp;<font face=\"tahoma\" size=\"2\">"  + fields[3] + " - <I>"+ fields[5] + "</I></font>&nbsp;&nbsp;</TD>";











      strOutput += "<TD  valign=\"CENTER\">&nbsp;&nbsp;<font face=\"tahoma\" size=\"2\"><input type=text size=2 maxlength=3 name=QUANTITY value=\"" + fields[1] + "\">&nbsp;<input type=image SRC=\"../images/bupdate.gif\" onClick=\"UpdateQuantity("+i+", this.form.QUANTITY.value, "+fields[1]+")\"></font>&nbsp;&nbsp;</TD>";





                      





      strOutput += "<TD>&nbsp;&nbsp;<font face=\"tahoma\" size=\"2\">$" + moneyFormat(fields[2]) + "/ea</font>&nbsp;&nbsp;</TD>";











      strOutput += "<TD>&nbsp;&nbsp;<font face=\"tahoma\" size=\"2\"><input type=image SRC=\"../images/bremove.gif\" onClick=\"RemoveFromCart("+i+")\"></font>&nbsp;&nbsp;</TD></form></TR>";





   }











   strOutput += "<TR><TD><BR></TD></TR>";





   strOutput += "<TR><TD COLSPAN=2 align=right></TD><TD><font face=\"VERDANA\" size=\"2\"><B>SUBTOTAL</B></font></TD>";





   strOutput += "<TD>&nbsp;&nbsp;<font face=\"TAHOMA\" size=\"2\"><B>$" + strSubTotal + "</B></font></TD>";





   strOutput += "</TR>";





   strOutput += "</TABLE></font><BR>";





   





   originURL = GetCookie("OriginPage");





   if (originURL.substring( originURL.length-4, originURL.length ) != ".htm")





   	originURL = "../index.htm";  











   strOutput +="<A HREF=\"javascript:history.back()\" onMouseOver=\"window.status=\'\'; return true\"><img border=0 SRC=\"../images/bresume.gif\"></a>"





   strOutput += "<br><br><br>";





   





   strOutput += "<table border=0 cellspacing=2 width=550 align=center>";





   strOutput += "<tr><FORM><td>";





   strOutput += "<FONT FACE=\"VERDANA\" SIZE=2>Enter Zip Code to calculate taxes and shipping charges&nbsp;</FONT>";





   strOutput += "<input type=text size=6 maxlength=6 name=ZIP onChange='CalculateTS(this.form.ZIP.value)'>";





   strOutput += "</td><td>";





   strOutput += "<a href=\"https://gruppe-s.com/scripts/shipcart.htm\"><img border=0 src=\"../images/bcontinue.gif\"></a>";





   strOutput += "</td></FORM></tr></table>";





   





   strOutput +="<br>"





    strOutput +="<FONT FACE=\"VERDANA\" SIZE=2>(For International and HI/AK orders, please <a href=\"mailto:sales@german-autowerks.com\"><B>CONTACT US</B></a>)</FONT>";





   strOutput += "<br><br><br>"





      





   document.write(strOutput);





   document.close();











} 











function ShowPP() {





   iNumberOrdered = 0;





   fSubTotal      = 0;





   fTax           = 0;





   fShip          = 0;





   fTotal         = 0;





   strSubTotal    = "";





   strTax         = "";





   strShip        = "";  





   strTotal       = "";





   strOutput      = "";





   out            = "";





   iNumberOrdered = GetCookie("NumberOrdered");











   for ( i = 1; i <= iNumberOrdered; i++ ) {





      NewOrder = "Order." + i;





      database = "";





      database = GetCookie(NewOrder);











      Token0 = database.indexOf("|", 0);





      Token1 = database.indexOf("|", Token0+1);





      Token2 = database.indexOf("|", Token1+1);





      Token3 = database.indexOf("|", Token2+1);





      Token4 = database.indexOf("|", Token3+1);











      fields = new Array;





      fields[0] = database.substring( 0, Token0 );





      fields[1] = database.substring( Token0+1, Token1 );





      fields[2] = database.substring( Token1+1, Token2 );





      fields[3] = database.substring( Token2+1, Token3 );





      fields[4] = database.substring( Token3+1, Token4 );





      fields[5] = database.substring( Token4+1, database.length );











      fSubTotal     += (parseInt(fields[1]) * parseFloat(fields[2]) );





      strSubTotal    = moneyFormat(fSubTotal);











      strOutput += fields[0] + "*";





      strOutput += fields[1] + " ";





      strOutput += "(" + moneyFormat(fields[2]) + ")|";





   }











   strOutput += "SUB: ";





   strOutput += "$" + strSubTotal + "\n";











   TSdb = GetCookie("TaxShip");











   Token0 = TSdb.indexOf("|", 0);





   Token1 = TSdb.indexOf("|", Token0+1);





   





   fields = new Array;





   fields[0] = TSdb.substring( 0, Token0 );





   fields[1] = TSdb.substring( Token0+1, Token1 );





   fields[2] = TSdb.substring( Token1+1, TSdb.length );











   fTax     = parseFloat(fields[0]);





   strTax   = moneyFormat(fTax);





   fShip    = parseFloat(fields[1]);





   strShip  = moneyFormat(fShip);





   zip = fields[2];





   fTotal   = fSubTotal + fTax + fShip;





   strTotal = moneyFormat(fTotal);





   





   strOutput += "SHIP: $" + strShip + "\n";











   strOutput += "TAX: $" + strTax + "\n";











   





   strOutput += "TOTAL: $";





   if (zip == "CONTACT US") {





   	strOutput += strSubTotal;





   }





   else {





      strOutput += strTotal;





   }











   out += "<form action=\"https://www.paypal.com/cgi-bin/webscr\" method=\"post\">\n";





   out += "<input type=\"hidden\" name=\"cmd\" value=\"_xclick\">\n";





   out += "<input type=\"hidden\" name=\"business\" value=\"orders@gruppe-s.com\">\n";





   out += "<input type=\"hidden\" name=\"item_name\" value=\"" + strOutput + "\">\n";





   out += "<input type=\"hidden\" name=\"item_number\" value=\"PayPal Order\">\n";





   out += "<input type=\"hidden\" name=\"amount\" value=\"" + strTotal + "\">\n";





   out += "<input type=\"image\" src=\"paypal.gif\" border=\"0\" name=\"submit\" alt=\"Make Payment Through PayPal\">\n";





   out += "</form>\n";











   document.write(out);





   document.close();











}











function ShowTS() {





   iNumberOrdered = 0;





   fSubTotal      = 0;





   fTax           = 0;





   fShip          = 0;





   fTotal         = 0;





   strSubTotal    = "";





   strTax         = "";





   strShip        = "";  





   strTotal       = "";





   strOutput      = "";





   iNumberOrdered = GetCookie("NumberOrdered");

















   strOutput = "<TABLE><TR>" +





               "<TD><font face=\"VERDANA\" size=\"2\"><B>PRODUCT ID&nbsp;&nbsp;</B></font></TH>" +





               "<TD><font face=\"VERDANA\" size=\"2\"><B>&nbsp;&nbsp;PRODUCT NAME / DESCRIPTION&nbsp;&nbsp;</B></font></TH>"+





               "<TD><font face=\"VERDANA\" size=\"2\"><B>&nbsp;&nbsp;QUANTITY&nbsp;&nbsp;</B></font></TH>" +





               "<TD><font face=\"VERDANA\" size=\"2\"><B>&nbsp;&nbsp;PRICE&nbsp;&nbsp;</B></font></TH></TR>";











// Added the below line for Authorize.net as they require the x_Description field.





//strOutput2 = "<input type=\"hidden\" name=\"x_Description\" value=\"";











   for ( i = 1; i <= iNumberOrdered; i++ ) {





// Added the below line for Authorize.net as they require the x_Description field.





//strOutput2 += "* + fields[0] + * + fields[1] + * + fields[2] + * + fields[3] + * + fields[4] + * + fields[5]";











      NewOrder = "Order." + i;





      database = "";





      database = GetCookie(NewOrder);











      Token0 = database.indexOf("|", 0);





      Token1 = database.indexOf("|", Token0+1);





      Token2 = database.indexOf("|", Token1+1);





      Token3 = database.indexOf("|", Token2+1);





      Token4 = database.indexOf("|", Token3+1);











      fields = new Array;





      fields[0] = database.substring( 0, Token0 );





      fields[1] = database.substring( Token0+1, Token1 );





      fields[2] = database.substring( Token1+1, Token2 );





      fields[3] = database.substring( Token2+1, Token3 );





      fields[4] = database.substring( Token3+1, Token4 );





      fields[5] = database.substring( Token4+1, database.length );











      fSubTotal     += (parseInt(fields[1]) * parseFloat(fields[2]) );





      strSubTotal    = moneyFormat(fSubTotal);











      strOutput += "<TR valign=\"CENTER\"><form><TD><font face=\"tahoma\" size=\"2\">"  + fields[0] + "</font>&nbsp;&nbsp;</TD>";











      if ( fields[5] == "" )





         strOutput += "<TD>&nbsp;&nbsp;<font face=\"tahoma\" size=\"2\">"  + fields[3] + "</font>&nbsp;&nbsp;</TD>";





      else





         strOutput += "<TD>&nbsp;&nbsp;<font face=\"tahoma\" size=\"2\">"  + fields[3] + " - <I>"+ fields[5] + "</I></font>&nbsp;&nbsp;</TD>";











      strOutput += "<TD>&nbsp;&nbsp;<font face=\"tahoma\" size=\"2\">" + fields[1] + "</font>&nbsp;&nbsp;</TD>";





                      





      strOutput += "<TD>&nbsp;&nbsp;<font face=\"tahoma\" size=\"2\">$" + moneyFormat(fields[2]) + "/ea</font>&nbsp;&nbsp;</TD>";











      strOutput += "<input type=hidden name=\"ID_"       + i + "\" value=\"" + fields[0] + "\">";





      strOutput += "<input type=hidden name=\"QUANTITY_" + i + "\" value=\"" + fields[1] + "\">";





      strOutput += "<input type=hidden name=\"PRICE_"    + i + "\" value=\"" + fields[2] + "\">";





      strOutput += "<input type=hidden name=\"NAME_"     + i + "\" value=\"" + fields[3] + "\">";





      strOutput += "<input type=hidden name=\"SHIPPING_" + i + "\" value=\"" + fields[4] + "\">";





      strOutput += "<input type=hidden name=\"ADDTLINFO_"+ i + "\" value=\"" + fields[5] + "\">";





   }





// Added the below line for Authorize.net as they require the x_Description field.





//strOutput2 += "\">";











   strOutput += "<TR><TD><BR></TD></TR>";





   strOutput += "<TR><TD align=right></TD><TD COLSPAN=2><font face=\"VERDANA\" size=\"2\"><B>SUB</B></font></TD>";





   strOutput += "<TD>&nbsp;&nbsp;<font face=\"TAHOMA\" size=\"2\"><B>$" + strSubTotal + "</B></font></TD>";





   strOutput += "</TR>";











 strOutput += "<input type=\"hidden\" name=\"Subtotal\" value=\"" + strSubTotal + "\">\n";











   TSdb = GetCookie("TaxShip");











      Token0 = TSdb.indexOf("|", 0);





   Token1 = TSdb.indexOf("|", Token0+1);





   





   fields = new Array;





   fields[0] = TSdb.substring( 0, Token0 );





   fields[1] = TSdb.substring( Token0+1, Token1 );





   fields[2] = TSdb.substring( Token1+1, TSdb.length );











   fTax     = parseFloat(fields[0]);





   strTax   = moneyFormat(fTax);





   fShip    = parseFloat(fields[1]);





   strShip  = moneyFormat(fShip);





   zip = fields[2];





   fTotal   = fSubTotal + fTax + fShip;





   strTotal = moneyFormat(fTotal);











   strOutput += "<input type=hidden name=\"Total" + "\" value=\"" + strTotal + "\">";





   





   strOutput += "<TR><TD align=left></TD><TD COLSPAN=2><font face=\"VERDANA\" size=\"2\"><B>SHIPPING</B>&nbsp;&nbsp;&nbsp;(UPS Ground.  Contact us for rush orders.)</font></TD>";





   





   if (zip == "CONTACT US") {





      strOutput += "<TD>&nbsp;&nbsp;<font color=\"#FFFFFF\" face=\"TAHOMA\" size=\"2\"><a href=\"mailto:sales@german-autowerks.com\"><B>CONTACT US</B></a></font></TD>";





   }





   else {





      strOutput += "<TD>&nbsp;&nbsp;<font face=\"TAHOMA\" size=\"2\"><B>$" + strShip + "</B></font></TD>";





 strOutput += "<input type=\"hidden\" name=\"Shipping\" value=\"" + strShip + "\">\n";





   }





   strOutput += "</TR>";











   strOutput += "<TR><TD align=left></TD><TD COLSPAN=2><font face=\"VERDANA\" size=\"2\"><B>TAX</B>&nbsp;&nbsp;&nbsp;(CA Resident sales tax)</font></TD>";





   strOutput += "<TD>&nbsp;&nbsp;<font face=\"TAHOMA\" size=\"2\"><B>$" + strTax + "</B></font></TD>";





   strOutput += "</TR>";





 strOutput += "<input type=\"hidden\" name=\"Tax\" value=\"" + strTax + "\">\n";











   





   strOutput += "<TR><TD align=left></TD><TD COLSPAN=2><font face=\"VERDANA\" size=\"2\"><B>TOTAL</B></font></TD>";





   if (zip == "CONTACT US") {





   	strOutput += "<TD>&nbsp;&nbsp;<font face=\"TAHOMA\" size=\"2\"><B>$" + strSubTotal + "</B></font></TD>";





   }





   else {





      strOutput += "<TD>&nbsp;&nbsp;<font face=\"TAHOMA\" size=\"2\"><B>$" + strTotal + "</B></font></TD>";





   }





   strOutput += "</TR>";











   strOutput += "</TABLE></font><br>";





   





      originURL = GetCookie("OriginPage");





   if (originURL.substring( originURL.length-4, originURL.length ) != ".htm")





   	originURL = "../index.htm";  











   strOutput +="<A HREF=\"javascript:history.back()\" onMouseOver=\"window.status=\'\'; return true\"><img border=0 SRC=\"../images/back.gif\"></a>"





   strOutput += "<br>";











// Added the below line for Authorize.net as they require the x_Amount field.





   strOutput += "<input type=\"hidden\" name=\"x_Amount\" value=\"" + strTotal + "\">\n";





   





   document.write(strOutput);





//   document.write(strOutput2);





   document.close();











}











function calculateGround( theweight, zipCode) {





   zip = parseInt(zipCode);





   if (theweight == "wpackage")





      return (4 * calculateGround("60", zipCode));





   else { 











   weight = parseFloat(theweight);





  





   if (zip < 32499 || (zip >= 32600 && zip <= 34999) || (zip >= 36000 && zip <= 36399) || (zip >= 36800 && zip <= 36899) ||





      (zip >= 37300 && zip <= 37499) || (zip >= 37600 && zip <= 37999) || (zip >= 39900 && zip <= 39999) || 





      (zip >= 40300 && zip <= 41899) || (zip >= 42500 && zip <= 42699) || (zip >= 43000 && zip <= 45999) ||





      (zip >= 46700 && zip <= 46899) || (zip >= 47000 && zip <= 47099) || (zip >= 47300 && zip <= 47399) ||





      (zip >= 48000 && zip <= 49799))





      zone = 8;





   else if ((zip >= 32500 && zip <= 32599) || (zip >= 35000 && zip <= 35999) || (zip >= 36400 && zip <= 36799) || 





            (zip >= 36900 && zip <= 37299) || (zip >= 37500 && zip <= 37599) || (zip >= 38000 && zip <= 39799) || 





            (zip >= 40000 && zip <= 40299) || (zip >= 42000 && zip <= 42499) || (zip >= 42700 && zip <= 42799) || 





            (zip >= 46000 && zip <= 46699) || (zip >= 46900 && zip <= 46999) || (zip >= 47100 && zip <= 47299) || 





            (zip >= 47400 && zip <= 47999) || (zip >= 49800 && zip <= 49999) || (zip >= 50400 && zip <= 50499) || 





            (zip >= 50600 && zip <= 50799) || (zip >= 52000 && zip <= 56099) || (zip >= 56200 && zip <= 56799) || 





            (zip >= 58200 && zip <= 58299) || (zip >= 60000 && zip <= 63999) || (zip >= 65000 && zip <= 65299) || 





            (zip >= 65400 && zip <= 65599) || (zip >= 70000 && zip <= 70999) || (zip >= 71200 && zip <= 71799) ||





            (zip >= 72000 && zip <= 72599))





      zone = 7;





   else if ((zip >= 50000 && zip <= 50399) || (zip >= 50500 && zip <= 50599) || (zip >= 50800 && zip <= 51699) || 





            (zip >= 56100 && zip <= 56199) || (zip >= 57000 && zip <= 58199) || (zip >= 58300 && zip <= 58899) || 





            (zip >= 59200 && zip <= 59599) || (zip >= 64000 && zip <=64999) || (zip >= 65300 && zip <= 65399) || 





            (zip >= 65600 && zip <= 67699) || (zip >= 68000 && zip <= 69299) || (zip >= 71000 && zip <= 71199) || 





            (zip >= 71800 && zip <= 71999) || (zip >= 72600 && zip <= 73899) || (zip >= 74000 && zip <= 78999) || 





            (zip >= 79500 && zip <= 79699))





      zone = 6;





   else if ((zip >= 59000 && zip <= 59199) || (zip >= 59600 && zip <= 59999) || (zip >= 67700 && zip <= 67999) || 





            (zip >= 69300 && zip <= 73999) || (zip >= 79000 && zip <= 79499) || (zip >= 79700 && zip <= 79999) || 





            (zip >= 80000 && zip <= 81299) || (zip >= 81400 && zip <= 83899) || (zip >= 87000 && zip <= 87299) || 





            (zip >= 87500 && zip <= 87899) || (zip >= 88000 && zip <= 88599) || (zip >= 97000 && zip <= 99499) || 





            (zip >= 99500 && zip <= 99999))





      zone = 5;





   else if ((zip >= 81300 && zip <= 81399) || (zip >= 84000 && zip <= 85399) || (zip >= 85500 && zip <= 86399) || 





            (zip >= 86500 && zip <= 86599) || (zip >= 87300 && zip <= 87499) || (zip >= 87900 && zip <= 87999) || 





            (zip >= 89300 && zip <= 89899) || (zip >= 94000 && zip <= 96199) || (zip >= 96200 && zip <= 96699) || 





            (zip >= 96700 && zip <= 96899) || (zip >= 96900 && zip <= 96999))





      zone = 4;





   else if ((zip >= 85400 && zip <= 85499) || (zip >= 86400 && zip <= 86499) || (zip >= 88900 && zip <= 89299) || 





            (zip >= 93400 && zip <= 93499) || (zip >= 93600 && zip <= 93999))





      zone = 3;





   else if ((zip >= 90000 && zip <= 93399) || (zip >= 93500 && zip <= 93599))





      zone = 2;





      





   if (weight < 1)





   	return moneyFormat(0.00);





   else if (weight <= 5) {





      if (zone == 2)	





         return moneyFormat(4.58);





      if (zone == 3)	





         return moneyFormat(4.88);





      if (zone == 4)	





         return moneyFormat(5.38);





      if (zone == 5)	





         return moneyFormat(5.62);





      if (zone == 6)	





         return moneyFormat(5.92);





      if (zone == 7)	





         return moneyFormat(6.12);





      if (zone == 8)	





         return moneyFormat(6.65);





   }





   else if (weight <= 10) {





      if (zone == 2)	





         return moneyFormat(5.29);





      if (zone == 3)	





         return moneyFormat(5.5);





      if (zone == 4)	





         return moneyFormat(5.96);





      if (zone == 5)	





         return moneyFormat(6.37);





      if (zone == 6)	





         return moneyFormat(6.88);





      if (zone == 7)	





         return moneyFormat(7.61);





      if (zone == 8)	





         return moneyFormat(8.51);











   }





   else if (weight <= 15) {





      if (zone == 2)	





         return moneyFormat(5.92);





      if (zone == 3)	





         return moneyFormat(6.23);





      if (zone == 4)	





         return moneyFormat(6.46);





      if (zone == 5)	





         return moneyFormat(7.06);





      if (zone == 6)	





         return moneyFormat(8.47);





      if (zone == 7)	





         return moneyFormat(10);





      if (zone == 8)	





         return moneyFormat(11.38);





   }





   else if (weight <= 20) {





      if (zone == 2)	





         return moneyFormat(6.42);





      if (zone == 3)	





         return moneyFormat(7.15);





      if (zone == 4)	





         return moneyFormat(7.42);





      if (zone == 5)	





         return moneyFormat(8.49);





      if (zone == 6)	





         return moneyFormat(10.42);





      if (zone == 7)	





         return moneyFormat(12.34);





      if (zone == 8)	





         return moneyFormat(14.31);





   }





   else if (weight <= 25) {





      if (zone == 2)	





         return moneyFormat(7.1);





      if (zone == 3)	





         return moneyFormat(8.07);





      if (zone == 4)	





         return moneyFormat(8.54);





      if (zone == 5)	





         return moneyFormat(9.93);





      if (zone == 6)	





         return moneyFormat(12.39);





      if (zone == 7)	





         return moneyFormat(14.63);





      if (zone == 8)	





         return moneyFormat(17.23);





   }





   else if (weight <= 30) {





      if (zone == 2)	





         return moneyFormat(7.79);





      if (zone == 3)	





         return moneyFormat(8.91);





      if (zone == 4)	





         return moneyFormat(9.68);





      if (zone == 5)	





         return moneyFormat(11.32);





      if (zone == 6)	





         return moneyFormat(14.36);





      if (zone == 7)	





         return moneyFormat(16.86);





      if (zone == 8)	





         return moneyFormat(20.04);





   }





   else if (weight <= 35) {





      if (zone == 2)	





         return moneyFormat(8.46);





      if (zone == 3)	





         return moneyFormat(9.81);





      if (zone == 4)	





         return moneyFormat(10.83);





      if (zone == 5)	





         return moneyFormat(12.79);





      if (zone == 6)	





         return moneyFormat(16.29);





      if (zone == 7)	





         return moneyFormat(19.25);





      if (zone == 8)	





         return moneyFormat(22.95);





   }





   else if (weight <= 40) {





      if (zone == 2)	





         return moneyFormat(9.07);





      if (zone == 3)	





         return moneyFormat(10.71);





      if (zone == 4)	





         return moneyFormat(11.97);





      if (zone == 5)	





         return moneyFormat(14.23);





      if (zone == 6)	





         return moneyFormat(18.09);





      if (zone == 7)	





         return moneyFormat(21.64);





      if (zone == 8)	





         return moneyFormat(25.72);





   }





   else if (weight <= 45) {





      if (zone == 2)	





         return moneyFormat(9.63);





      if (zone == 3)	





         return moneyFormat(11.62);





      if (zone == 4)	





         return moneyFormat(13.04);





      if (zone == 5)	





         return moneyFormat(15.67);





      if (zone == 6)	





         return moneyFormat(19.72);





      if (zone == 7)	





         return moneyFormat(23.98);





      if (zone == 8)	





         return moneyFormat(28.39);





   }





   else if (weight <= 50) {





      if (zone == 2)	





         return moneyFormat(10.05);





      if (zone == 3)	





         return moneyFormat(12.36);





      if (zone == 4)	





         return moneyFormat(13.99);





      if (zone == 5)	





         return moneyFormat(17);





      if (zone == 6)	





         return moneyFormat(21.1);





      if (zone == 7)	





         return moneyFormat(26.05);





      if (zone == 8)	





         return moneyFormat(30.73);





   }





   else if (weight <= 55) {





      if (zone == 2)	





         return moneyFormat(10.47);





      if (zone == 3)	





         return moneyFormat(12.91);





      if (zone == 4)	





         return moneyFormat(14.79);





      if (zone == 5)	





         return moneyFormat(18.08);





      if (zone == 6)	





         return moneyFormat(22.33);





      if (zone == 7)	





         return moneyFormat(27.38);





      if (zone == 8)	





         return moneyFormat(32.32);





   }





   else if (weight <= 60) {





      if (zone == 2)	





         return moneyFormat(10.91);





      if (zone == 3)	





         return moneyFormat(13.42);





      if (zone == 4)	





         return moneyFormat(15.47);





      if (zone == 5)	





         return moneyFormat(18.98);





      if (zone == 6)	





         return moneyFormat(23.44);





      if (zone == 7)	





         return moneyFormat(28.18);





      if (zone == 8)	





         return moneyFormat(33.38);





   }





   else if (weight <= 65) {





      if (zone == 2)	





         return moneyFormat(11.33);





      if (zone == 3)	





         return moneyFormat(13.9);





      if (zone == 4)	





         return moneyFormat(16.04);





      if (zone == 5)	





         return moneyFormat(19.52);





      if (zone == 6)	





         return moneyFormat(24.3);





      if (zone == 7)	





         return moneyFormat(28.97);





      if (zone == 8)	





         return moneyFormat(34.44);





   }





   else if (weight <= 70) {





      if (zone == 2)	





         return moneyFormat(11.7);





      if (zone == 3)	





         return moneyFormat(14.38);





      if (zone == 4)	





         return moneyFormat(16.52);





      if (zone == 5)	





         return moneyFormat(20.21);





      if (zone == 6)	





         return moneyFormat(24.9);





      if (zone == 7)	





         return moneyFormat(29.77);





      if (zone == 8)	





         return moneyFormat(35.52);





   }





   else if (weight <= 75) {





      if (zone == 2)	





         return moneyFormat(27.43);





      if (zone == 3)	





         return moneyFormat(29.26);





      if (zone == 4)	





         return moneyFormat(31.13);





      if (zone == 5)	





         return moneyFormat(31.9);





      if (zone == 6)	





         return moneyFormat(33.93);





      if (zone == 7)	





         return moneyFormat(36.68);





      if (zone == 8)	





         return moneyFormat(39.76);





   }





   else if (weight <= 80) {





      if (zone == 2)	





         return moneyFormat(32.11);





      if (zone == 3)	





         return moneyFormat(33.99);





      if (zone == 4)	





         return moneyFormat(34.37);





      if (zone == 5)	





         return moneyFormat(35.52);





      if (zone == 6)	





         return moneyFormat(38.07);





      if (zone == 7)	





         return moneyFormat(39.39);





      if (zone == 8)	





         return moneyFormat(41.99);





   }





   else if (weight <= 85) {





      if (zone == 2)	





         return moneyFormat(34.56);





      if (zone == 3)	





         return moneyFormat(36.28);





      if (zone == 4)	





         return moneyFormat(36.66);





      if (zone == 5)	





         return moneyFormat(37.64);





      if (zone == 6)	





         return moneyFormat(40.2);





      if (zone == 7)	





         return moneyFormat(41.52);





      if (zone == 8)	





         return moneyFormat(44.13);





   }





   else if (weight <= 90) {





      if (zone == 2)	





         return moneyFormat(36.68);





      if (zone == 3)	





         return moneyFormat(38.4);





      if (zone == 4)	





         return moneyFormat(38.84);





      if (zone == 5)	





         return moneyFormat(39.76);





      if (zone == 6)	





         return moneyFormat(42.32);





      if (zone == 7)	





         return moneyFormat(43.64);





      if (zone == 8)	





         return moneyFormat(46.25);





   }





   else if (weight <= 95) {





      if (zone == 2)	





         return moneyFormat(38.81);





      if (zone == 3)	





         return moneyFormat(40.53);





      if (zone == 4)	





         return moneyFormat(40.85);





      if (zone == 5)	





         return moneyFormat(41.89);





      if (zone == 6)	





         return moneyFormat(44.46);





      if (zone == 7)	





         return moneyFormat(45.76);





      if (zone == 8)	





         return moneyFormat(48.37);





   }





   else if (weight <= 100) {





      if (zone == 2)	





         return moneyFormat(40.88);





      if (zone == 3)	





         return moneyFormat(42.39);





      if (zone == 4)	





         return moneyFormat(42.76);





      if (zone == 5)	





         return moneyFormat(44.01);





      if (zone == 6)	





         return moneyFormat(46.58);





      if (zone == 7)	





         return moneyFormat(47.9);





      if (zone == 8)	





         return moneyFormat(50.5);





   }





   else if (weight <= 105) {





      if (zone == 2)	





         return moneyFormat(42.74);





      if (zone == 3)	





         return moneyFormat(44.25);





      if (zone == 4)	





         return moneyFormat(44.67);





      if (zone == 5)	





         return moneyFormat(45.83);





      if (zone == 6)	





         return moneyFormat(48.55);





      if (zone == 7)	





         return moneyFormat(49.97);





      if (zone == 8)	





         return moneyFormat(52.57);





   }





   else if (weight <= 110) {





      if (zone == 2)	





         return moneyFormat(44.6);





      if (zone == 3)	





         return moneyFormat(46.1);





      if (zone == 4)	





         return moneyFormat(46.59);





      if (zone == 5)	





         return moneyFormat(47.63);





      if (zone == 6)	





         return moneyFormat(50.51);





      if (zone == 7)	





         return moneyFormat(52.04);





      if (zone == 8)	





         return moneyFormat(54.64);





   }





   else if (weight <= 115) {





      if (zone == 2)	





         return moneyFormat(46.4);





      if (zone == 3)	





         return moneyFormat(47.97);





      if (zone == 4)	





         return moneyFormat(48.5);





      if (zone == 5)	





         return moneyFormat(49.43);





      if (zone == 6)	





         return moneyFormat(52.48);





      if (zone == 7)	





         return moneyFormat(54.12);





      if (zone == 8)	





         return moneyFormat(56.71);





   }





   else if (weight <= 120) {





      if (zone == 2)	





         return moneyFormat(48.22);





      if (zone == 3)	





         return moneyFormat(49.83);





      if (zone == 4)	





         return moneyFormat(50.41);





      if (zone == 5)	





         return moneyFormat(51.24);





      if (zone == 6)	





         return moneyFormat(54.45);





      if (zone == 7)	





         return moneyFormat(56.19);





      if (zone == 8)	





         return moneyFormat(58.79);





   }





   else if (weight <= 125) {





      if (zone == 2)	





         return moneyFormat(50.02);





      if (zone == 3)	





         return moneyFormat(51.69);





      if (zone == 4)	





         return moneyFormat(52.33);





      if (zone == 5)	





         return moneyFormat(53.05);





      if (zone == 6)	





         return moneyFormat(56.4);





      if (zone == 7)	





         return moneyFormat(58.26);





      if (zone == 8)	





         return moneyFormat(60.86);





   }





   else if (weight <= 130) {





      if (zone == 2)	





         return moneyFormat(51.83);





      if (zone == 3)	





         return moneyFormat(53.55);





      if (zone == 4)	





         return moneyFormat(54.24);





      if (zone == 5)	





         return moneyFormat(54.86);





      if (zone == 6)	





         return moneyFormat(58.37);





      if (zone == 7)	





         return moneyFormat(60.33);





      if (zone == 8)	





         return moneyFormat(62.93);





   }





   else if (weight <= 135) {





      if (zone == 2)	





         return moneyFormat(53.63);





      if (zone == 3)	





         return moneyFormat(55.41);





      if (zone == 4)	





         return moneyFormat(56.16);





      if (zone == 5)	





         return moneyFormat(56.66);





      if (zone == 6)	





         return moneyFormat(60.34);





      if (zone == 7)	





         return moneyFormat(62.4);





      if (zone == 8)	





         return moneyFormat(65.01);





   }





   else if (weight <= 140) {





      if (zone == 2)	





         return moneyFormat(55.45);





      if (zone == 3)	





         return moneyFormat(57.27);





      if (zone == 4)	





         return moneyFormat(58.06);





      if (zone == 5)	





         return moneyFormat(58.47);





      if (zone == 6)	





         return moneyFormat(62.31);





      if (zone == 7)	





         return moneyFormat(64.48);





      if (zone == 8)	





         return moneyFormat(67.09);





   }





   else if (weight <= 145) {





      if (zone == 2)	





         return moneyFormat(57.25);





      if (zone == 3)	





         return moneyFormat(59.13);





      if (zone == 4)	





         return moneyFormat(59.98);





      if (zone == 5)	





         return moneyFormat(60.28);





      if (zone == 6)	





         return moneyFormat(64.27);





      if (zone == 7)	





         return moneyFormat(66.55);





      if (zone == 8)	





         return moneyFormat(69.16);





   }





   else if (weight <= 150) {





      if (zone == 2)	





         return moneyFormat(59.05);





      if (zone == 3)	





         return moneyFormat(60.99);





      if (zone == 4)	





         return moneyFormat(61.89);





      if (zone == 5)	





         return moneyFormat(62.09);





      if (zone == 6)	





         return moneyFormat(66.24);





      if (zone == 7)	





         return moneyFormat(68.62);





      if (zone == 8)	





         return moneyFormat(71.23);





   }





   }





}











//=====================================================================||





//               END NOP Design SmartPost Shopping Cart                ||





//                              V.4.0.0                                ||





//=====================================================================||








