<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
</head>
<PRE>//=====================================================================||
//               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.  You must keep this comment unchanged in  ||
// your code.  For more information contact FreeCart@NopDesign.com.    ||
//                                                                     ||
// JavaScript Shop Module, V.4.4.0                                     ||
//=====================================================================||</PRE>
<PRE>//---------------------------------------------------------------------||
//                       Global Options                                ||
//                      ----------------                               ||
// Shopping Cart Options, you can modify these options to change the   ||
// the way the cart functions.                                         ||
//                                                                     ||
// Language Packs                                                      ||
// ==============                                                      ||
// You may include any language pack before nopcart.js in your HTML    ||
// pages to change the language.  Simply include a language pack with  ||
// a script src BEFORE the &lt;SCRIPT SRC=&quot;nopcart.js&quot;&gt;... line.          ||
//  For example: &lt;SCRIPT SRC=&quot;language-en.js&quot;&gt;&lt;/SCRIPT&gt;                ||
//                                                                     ||
// Options For Everyone:                                               ||
// =====================                                               ||
// * MonetarySymbol: string, the symbol which represents dollars/euro, ||
//   in your locale.                                                   ||
// * DisplayNotice: true/false, controls whether the user is provided  ||
//   with a popup letting them know their product is added to the cart ||
// * DisplayShippingColumn: true/false, controls whether the managecart||
//   and checkout pages display shipping cost column.                  ||
// * DisplayShippingRow: true/false, controls whether the managecart   ||
//   and checkout pages display shipping cost total row.               ||
// * DisplayTaxRow: true/false, controls whether the managecart        ||
//   and checkout pages display tax cost total row.                    ||
// * TaxRate: number, your area's current tax rate, ie: if your tax    ||
//   rate was 7.5%, you would set TaxRate = 0.075                      ||
// * TaxByRegion: true/false, when set to true, the user is prompted   ||
//   with TaxablePrompt to determine if they should be charged tax.    ||
//   In the USA, this is useful to charge tax to those people who live ||
//   in a particular state, but no one else.                           ||
// * TaxPrompt: string, popup message if user has not selected either  ||
//   taxable or nontaxable when TaxByRegion is set to true.            ||
// * TaxablePrompt: string, the message the user is prompted with to   ||
//   select if they are taxable.  If TaxByRegion is set to false, this ||
//   has no effect. Example: 'Arizona Residents'                       ||
// * NonTaxablePrompt: string, same as above, but the choice for non-  ||
//   taxable people.  Example: 'Other States'                          ||
// * MinimumOrder: number, the minium dollar amount that must be       ||
//   purchased before a user is allowed to checkout.  Set to 0.00      ||
//   to disable.                                                       ||
// * MinimumOrderPrompt: string, Message to prompt users with when     ||
//   they have not met the minimum order amount.                       ||
//                                                                     ||
// Payment Processor Options:                                          ||
// ==========================                                          ||
// * PaymentProcessor: string, the two digit payment processor code    ||
//   for support payment processor gateways.  Setting this field to    ||
//   anything other than an empty string will override your OutputItem ||
//   settings -- so please be careful when receiving any form data.    ||
//   Support payment processor gateways are:                           ||
//    * Authorize.net (an)                                             ||
//    * Worldpay      (wp)                                             ||
//    * LinkPoint     (lp)
//                                                                     ||
// Options For Programmers:                                            ||
// ========================                                            ||
// * OutputItem&lt;..&gt;: string, the name of the pair value passed at      ||
//   checkouttime.  Change these only if you are connecting to a CGI   ||
//   script and need other field names, or are using a secure service  ||
//   that requires specific field names.                               ||
// * AppendItemNumToOutput: true/false, if set to true, the number of  ||
//   each ordered item will be appended to the output string.  For     ||
//   example if OutputItemId is 'ID_' and this is set to true, the     ||
//   output field name will be 'ID_1', 'ID_2' ... for each item.       ||
// * HiddenFieldsToCheckout: true/false, if set to true, hidden fields ||
//   for the cart items will be passed TO the checkout page, from the  ||
//   ManageCart page.  This is set to true for CGI/PHP/Script based    ||
//   checkout pages, but should be left false if you are using an      ||
//   HTML/Javascript Checkout Page. Hidden fields will ALWAYS be       ||
//   passed FROM the checkout page to the Checkout CGI/PHP/ASP/Script  ||
//---------------------------------------------------------------------||</PRE>
<PRE>//Options for Everyone:
MonetarySymbol        = '$';
DisplayNotice         = true;
DisplayShippingColumn = true;
DisplayShippingRow    = true;
DisplayTaxRow         = true;
TaxRate               = 0.07;
TaxByRegion           = true;
TaxPrompt             = 'For tax purposes, please select if you are an Arizona resident before continuing';
TaxablePrompt         = 'Arizona Residents';
NonTaxablePrompt      = 'Other States';
MinimumOrder          = 0.00;
MinimumOrderPrompt    = 'Your order is below our minimum order, please order more before checking out.';</PRE>
<PRE>//Payment Processor Options:
PaymentProcessor      = '';</PRE>
<PRE>//Options for Programmers:
OutputItemId          = 'ID_';
OutputItemQuantity    = 'QUANTITY_';
OutputItemPrice       = 'PRICE_';
OutputItemName        = 'NAME_';
OutputItemShipping    = 'SHIPPING_';
OutputItemAddtlInfo   = 'ADDTLINFO_';
OutputOrderSubtotal   = 'SUBTOTAL';
OutputOrderShipping   = 'SHIPPING';
OutputOrderTax        = 'TAX';
OutputOrderTotal      = 'TOTAL';
AppendItemNumToOutput = true;
HiddenFieldsToCheckout = true;
</PRE>
<PRE>//=====================================================================||
//---------------------------------------------------------------------||
//    YOU DO NOT NEED TO MAKE ANY MODIFICATIONS BELOW THIS LINE        ||
//---------------------------------------------------------------------||
//=====================================================================||
</PRE>
<PRE>//---------------------------------------------------------------------||
//                      Language Strings                               ||
//                     ------------------                              ||
// These strings will not be used unless you have not included a       ||
// language pack already.  You should NOT modify these, but instead    ||
// modify the strings in language-**.js where ** is the language pack  ||
// you are using.                                                      ||
//---------------------------------------------------------------------||
if ( !bLanguageDefined ) {
   strSorry  = &quot;I'm Sorry, your cart is full, please proceed to checkout.&quot;;
   strAdded  = &quot; added to your shopping cart.&quot;;
   strRemove = &quot;Click 'Ok' to remove this product from your shopping cart.&quot;;
   strILabel = &quot;Product Id&quot;;
   strDLabel = &quot;Product Name/Description&quot;;
   strQLabel = &quot;Quantity&quot;;
   strPLabel = &quot;Price&quot;;
   strSLabel = &quot;Shipping&quot;;
   strRLabel = &quot;Remove From Cart&quot;;
   strRButton= &quot;Remove&quot;;
   strSUB    = &quot;SUBTOTAL&quot;;
   strSHIP   = &quot;SHIPPING&quot;;
   strTAX    = &quot;TAX&quot;;
   strTOT    = &quot;TOTAL&quot;;
   strErrQty = &quot;Invalid Quantity.&quot;;
   strNewQty = 'Please enter new quantity:';
   bLanguageDefined = true;
}
</PRE>
<PRE>//---------------------------------------------------------------------||
// 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) {
   var strNewQuantity = &quot;&quot;;</PRE>
<PRE>   for ( i = 0; i &lt; checkString.length; i++ ) {
      ch = checkString.substring(i, i+1);
      if ( (ch &gt;= &quot;0&quot; &amp;&amp; ch &lt;= &quot;9&quot;) || (ch == '.') )
         strNewQuantity += ch;
   }</PRE>
<PRE>   if ( strNewQuantity.length &lt; 1 )
      strNewQuantity = &quot;1&quot;;</PRE>
<PRE>   return(strNewQuantity);
}
</PRE>
<PRE>//---------------------------------------------------------------------||
// 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) {
   var iNumberOrdered = 0;
   var bAlreadyInCart = false;
   var notice = &quot;&quot;;
   iNumberOrdered = GetCookie(&quot;NumberOrdered&quot;);</PRE>
<PRE>   if ( iNumberOrdered == null )
      iNumberOrdered = 0;</PRE>
<PRE>   if ( thisForm.ID_NUM == null )
      strID_NUM    = &quot;&quot;;
   else
      strID_NUM    = thisForm.ID_NUM.value;</PRE>
<PRE>   if ( thisForm.QUANTITY == null )
      strQUANTITY  = &quot;1&quot;;
   else
      strQUANTITY  = thisForm.QUANTITY.value;</PRE>
<PRE>   if ( thisForm.PRICE == null )
      strPRICE     = &quot;0.00&quot;;
   else
      strPRICE     = thisForm.PRICE.value;</PRE>
<PRE>   if ( thisForm.NAME == null )
      strNAME      = &quot;&quot;;
   else
      strNAME      = thisForm.NAME.value;</PRE>
<PRE>   if ( thisForm.SHIPPING == null )
      strSHIPPING  = &quot;0.00&quot;;
   else
      strSHIPPING  = thisForm.SHIPPING.value;</PRE>
<PRE>   if ( thisForm.ADDITIONALINFO == null ) {
      strADDTLINFO = &quot;&quot;;
   } else {
      strADDTLINFO = thisForm.ADDITIONALINFO[thisForm.ADDITIONALINFO.selectedIndex].value;
   }
   if ( thisForm.ADDITIONALINFO2 != null ) {
      strADDTLINFO += &quot;; &quot; + thisForm.ADDITIONALINFO2[thisForm.ADDITIONALINFO2.selectedIndex].value;
   }
   if ( thisForm.ADDITIONALINFO3 != null ) {
      strADDTLINFO += &quot;; &quot; + thisForm.ADDITIONALINFO3[thisForm.ADDITIONALINFO3.selectedIndex].value;
   }
   if ( thisForm.ADDITIONALINFO4 != null ) {
      strADDTLINFO += &quot;; &quot; + thisForm.ADDITIONALINFO4[thisForm.ADDITIONALINFO4.selectedIndex].value;
   }</PRE>
<PRE>   //Is this product already in the cart?  If so, increment quantity instead of adding another.
   for ( i = 1; i &lt;= iNumberOrdered; i++ ) {
      NewOrder = &quot;Order.&quot; + i;
      database = &quot;&quot;;
      database = GetCookie(NewOrder);</PRE>
<PRE>      Token0 = database.indexOf(&quot;|&quot;, 0);
      Token1 = database.indexOf(&quot;|&quot;, Token0+1);
      Token2 = database.indexOf(&quot;|&quot;, Token1+1);
      Token3 = database.indexOf(&quot;|&quot;, Token2+1);
      Token4 = database.indexOf(&quot;|&quot;, Token3+1);</PRE>
<PRE>      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 );</PRE>
<PRE>      if ( fields[0] == strID_NUM &amp;&amp;
           fields[2] == strPRICE  &amp;&amp;
           fields[3] == strNAME   &amp;&amp;
           fields[5] == strADDTLINFO
         ) {
         bAlreadyInCart = true;
         dbUpdatedOrder = strID_NUM    + &quot;|&quot; +
                          (parseInt(strQUANTITY)+parseInt(fields[1]))  + &quot;|&quot; +
                          strPRICE     + &quot;|&quot; +
                          strNAME      + &quot;|&quot; +
                          strSHIPPING  + &quot;|&quot; +
                          strADDTLINFO;
         strNewOrder = &quot;Order.&quot; + i;
         DeleteCookie(strNewOrder, &quot;/&quot;);
         SetCookie(strNewOrder, dbUpdatedOrder, null, &quot;/&quot;);
         notice = strQUANTITY + &quot; &quot; + strNAME + strAdded;
         break;
      }
   }
</PRE>
<PRE>   if ( !bAlreadyInCart ) {
      iNumberOrdered++;</PRE>
<PRE>      if ( iNumberOrdered &gt; 12 )
         alert( strSorry );
      else {
         dbUpdatedOrder = strID_NUM    + &quot;|&quot; + 
                          strQUANTITY  + &quot;|&quot; +
                          strPRICE     + &quot;|&quot; +
                          strNAME      + &quot;|&quot; +
                          strSHIPPING  + &quot;|&quot; +
                          strADDTLINFO;</PRE>
<PRE>         strNewOrder = &quot;Order.&quot; + iNumberOrdered;
         SetCookie(strNewOrder, dbUpdatedOrder, null, &quot;/&quot;);
         SetCookie(&quot;NumberOrdered&quot;, iNumberOrdered, null, &quot;/&quot;);
         notice = strQUANTITY + &quot; &quot; + strNAME + strAdded;
      }
   }</PRE>
<PRE>   if ( DisplayNotice )
      alert(notice);
}
</PRE>
<PRE>//---------------------------------------------------------------------||
// 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 (&quot;;&quot;, offset);</PRE>
<PRE>   if ( endstr == -1 )
      endstr = document.cookie.length;
   return(unescape(document.cookie.substring(offset, endstr)));
}
</PRE>
<PRE>//---------------------------------------------------------------------||
// 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();</PRE>
<PRE>   date.setTime (date.getTime() - skew);
}
</PRE>
<PRE>//---------------------------------------------------------------------||
// FUNCTION:    GetCookie                                              ||
// PARAMETERS:  Name                                                   ||
// RETURNS:     Value in Cookie                                        ||
// PURPOSE:     Retrieves cookie from users browser                    ||
//---------------------------------------------------------------------||
function GetCookie (name) {
   var arg = name + &quot;=&quot;;
   var alen = arg.length;
   var clen = document.cookie.length;
   var i = 0;</PRE>
<PRE>   while ( i &lt; clen ) {
      var j = i + alen;
      if ( document.cookie.substring(i, j) == arg ) return(getCookieVal (j));
      i = document.cookie.indexOf(&quot; &quot;, i) + 1;
      if ( i == 0 ) break;
   }</PRE>
<PRE>   return(null);
}
</PRE>
<PRE>//---------------------------------------------------------------------||
// 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 + &quot;=&quot; + escape (value) +
                     ((expires) ? &quot;; expires=&quot; + expires.toGMTString() : &quot;&quot;) +
                     ((path) ? &quot;; path=&quot; + path : &quot;&quot;) +
                     ((domain) ? &quot;; domain=&quot; + domain : &quot;&quot;) +
                     ((secure) ? &quot;; secure&quot; : &quot;&quot;);
}
</PRE>
<PRE>//---------------------------------------------------------------------||
// 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 + &quot;=&quot; +
                        ((path) ? &quot;; path=&quot; + path : &quot;&quot;) +
                        ((domain) ? &quot;; domain=&quot; + domain : &quot;&quot;) +
                        &quot;; expires=Thu, 01-Jan-70 00:00:01 GMT&quot;;
   }
}
</PRE>
<PRE>//---------------------------------------------------------------------||
// 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);</PRE>
<PRE>   for ( var decimalAt = 0; decimalAt &lt; tmp.length; decimalAt++ ) {
      if ( tmp.charAt(decimalAt)==&quot;.&quot; )
         break;
   }</PRE>
<PRE>   var cents  = &quot;&quot; + Math.round(input * 100);
   cents = cents.substring(cents.length-2, cents.length)
           dollars += ((tmp.charAt(decimalAt+2)==&quot;9&quot;)&amp;&amp;(cents==&quot;00&quot;))? 1 : 0;</PRE>
<PRE>   if ( cents == &quot;0&quot; )
      cents = &quot;00&quot;;</PRE>
<PRE>   return(dollars + &quot;.&quot; + cents);
}
</PRE>
<PRE>//---------------------------------------------------------------------||
// FUNCTION:    RemoveFromCart                                         ||
// PARAMETERS:  Order Number to Remove                                 ||
// RETURNS:     Null                                                   ||
// PURPOSE:     Removes an item from a users shopping cart             ||
//---------------------------------------------------------------------||
function RemoveFromCart(RemOrder) {
   if ( confirm( strRemove ) ) {
      NumberOrdered = GetCookie(&quot;NumberOrdered&quot;);
      for ( i=RemOrder; i &lt; NumberOrdered; i++ ) {
         NewOrder1 = &quot;Order.&quot; + (i+1);
         NewOrder2 = &quot;Order.&quot; + (i);
         database = GetCookie(NewOrder1);
         SetCookie (NewOrder2, database, null, &quot;/&quot;);
      }
      NewOrder = &quot;Order.&quot; + NumberOrdered;
      SetCookie (&quot;NumberOrdered&quot;, NumberOrdered-1, null, &quot;/&quot;);
      DeleteCookie(NewOrder, &quot;/&quot;);
      location.href=location.href;
   }
}
</PRE>
<PRE>//---------------------------------------------------------------------||
// FUNCTION:    ChangeQuantity                                         ||
// PARAMETERS:  Order Number to Change Quantity                        ||
// RETURNS:     Null                                                   ||
// PURPOSE:     Changes quantity of an item in the shopping cart       ||
//---------------------------------------------------------------------||
function ChangeQuantity(OrderItem,NewQuantity) {
   if ( isNaN(NewQuantity) ) {
      alert( strErrQty );
   } else {
      NewOrder = &quot;Order.&quot; + OrderItem;
      database = &quot;&quot;;
      database = GetCookie(NewOrder);</PRE>
<PRE>      Token0 = database.indexOf(&quot;|&quot;, 0);
      Token1 = database.indexOf(&quot;|&quot;, Token0+1);
      Token2 = database.indexOf(&quot;|&quot;, Token1+1);
      Token3 = database.indexOf(&quot;|&quot;, Token2+1);
      Token4 = database.indexOf(&quot;|&quot;, Token3+1);</PRE>
<PRE>      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 );</PRE>
<PRE>      dbUpdatedOrder = fields[0] + &quot;|&quot; +
                       NewQuantity + &quot;|&quot; +
                       fields[2] + &quot;|&quot; +
                       fields[3] + &quot;|&quot; +
                       fields[4] + &quot;|&quot; +
                       fields[5];
      strNewOrder = &quot;Order.&quot; + OrderItem;
      DeleteCookie(strNewOrder, &quot;/&quot;);
      SetCookie(strNewOrder, dbUpdatedOrder, null, &quot;/&quot;);
      location.href=location.href;      
   }
}
</PRE>
<PRE>//---------------------------------------------------------------------||
// FUNCTION:    GetFromCart                                            ||
// PARAMETERS:  Null                                                   ||
// RETURNS:     Product Table Written to Document                      ||
// PURPOSE:     Draws current cart product table on HTML page          ||
//              **DEPRECATED FUNCTION, USE ManageCart or Checkout**    ||
//---------------------------------------------------------------------||
function GetFromCart( fShipping ) {
   ManageCart( );
}
</PRE>
<PRE>//---------------------------------------------------------------------||
// FUNCTION:    RadioChecked                                           ||
// PARAMETERS:  Radio button to check                                  ||
// RETURNS:     True if a radio has been checked                       ||
// PURPOSE:     Form fillin validation                                 ||
//---------------------------------------------------------------------||
function RadioChecked( radiobutton ) {
   var bChecked = false;
   var rlen = radiobutton.length;
   for ( i=0; i &lt; rlen; i++ ) {
      if ( radiobutton[i].checked )
         bChecked = true;
   }    
   return bChecked;
} 
</PRE>
<PRE>//---------------------------------------------------------------------||
// FUNCTION:    QueryString                                            ||
// PARAMETERS:  Key to read                                            ||
// RETURNS:     value of key                                           ||
// PURPOSE:     Read data passed in via GET mode                       ||
//---------------------------------------------------------------------||
QueryString.keys = new Array();
QueryString.values = new Array();
function QueryString(key) {
   var value = null;
   for (var i=0;i&lt;QueryString.keys.length;i++) {
      if (QueryString.keys[i]==key) {
         value = QueryString.values[i];
         break;
      }
   }
   return value;
} </PRE>
<PRE>//---------------------------------------------------------------------||
// FUNCTION:    QueryString_Parse                                      ||
// PARAMETERS:  (URL string)                                           ||
// RETURNS:     null                                                   ||
// PURPOSE:     Parses query string data, must be called before Q.S.   ||
//---------------------------------------------------------------------||
function QueryString_Parse() {
   var query = window.location.search.substring(1);
   var pairs = query.split(&quot;&amp;&quot;); for (var i=0;i&lt;pairs.length;i++) {
      var pos = pairs[i].indexOf('=');
      if (pos &gt;= 0) {
         var argname = pairs[i].substring(0,pos);
         var value = pairs[i].substring(pos+1);
         QueryString.keys[QueryString.keys.length] = argname;
         QueryString.values[QueryString.values.length] = value;
      }
   }
}
</PRE>
<PRE>//---------------------------------------------------------------------||
// FUNCTION:    ManageCart                                             ||
// PARAMETERS:  Null                                                   ||
// RETURNS:     Product Table Written to Document                      ||
// PURPOSE:     Draws current cart product table on HTML page          ||
//---------------------------------------------------------------------||
function ManageCart( ) {
   var iNumberOrdered = 0;    //Number of products ordered
   var fTotal         = 0;    //Total cost of order
   var fTax           = 0;    //Tax amount
   var fShipping      = 0;    //Shipping amount
   var strTotal       = &quot;&quot;;   //Total cost formatted as money
   var strTax         = &quot;&quot;;   //Total tax formatted as money
   var strShipping    = &quot;&quot;;   //Total shipping formatted as money
   var strOutput      = &quot;&quot;;   //String to be written to page
   var bDisplay       = true; //Whether to write string to the page (here for programmers)</PRE>
<PRE>   iNumberOrdered = GetCookie(&quot;NumberOrdered&quot;);
   if ( iNumberOrdered == null )
      iNumberOrdered = 0;</PRE>
<PRE>   if ( bDisplay )
      strOutput = &quot;&lt;TABLE CLASS=\&quot;nopcart\&quot;&gt;&lt;TR&gt;&quot; +
                  &quot;&lt;TD CLASS=\&quot;nopheader\&quot;&gt;&lt;B&gt;&quot;+strILabel+&quot;&lt;/B&gt;&lt;/TD&gt;&quot; +
                  &quot;&lt;TD CLASS=\&quot;nopheader\&quot;&gt;&lt;B&gt;&quot;+strDLabel+&quot;&lt;/B&gt;&lt;/TD&gt;&quot; +
                  &quot;&lt;TD CLASS=\&quot;nopheader\&quot;&gt;&lt;B&gt;&quot;+strQLabel+&quot;&lt;/B&gt;&lt;/TD&gt;&quot; +
                  &quot;&lt;TD CLASS=\&quot;nopheader\&quot;&gt;&lt;B&gt;&quot;+strPLabel+&quot;&lt;/B&gt;&lt;/TD&gt;&quot; +
                  (DisplayShippingColumn?&quot;&lt;TD CLASS=\&quot;nopheader\&quot;&gt;&lt;B&gt;&quot;+strSLabel+&quot;&lt;/B&gt;&lt;/TD&gt;&quot;:&quot;&quot;) +
                  &quot;&lt;TD CLASS=\&quot;nopheader\&quot;&gt;&lt;B&gt;&quot;+strRLabel+&quot;&lt;/B&gt;&lt;/TD&gt;&lt;/TR&gt;&quot;;</PRE>
<PRE>   if ( iNumberOrdered == 0 ) {
      strOutput += &quot;&lt;TR&gt;&lt;TD COLSPAN=6 CLASS=\&quot;nopentry\&quot;&gt;&lt;CENTER&gt;&lt;BR&gt;&lt;B&gt;Your cart is empty&lt;/B&gt;&lt;BR&gt;&lt;BR&gt;&lt;/CENTER&gt;&lt;/TD&gt;&lt;/TR&gt;&quot;;
   }</PRE>
<PRE>   for ( i = 1; i &lt;= iNumberOrdered; i++ ) {
      NewOrder = &quot;Order.&quot; + i;
      database = &quot;&quot;;
      database = GetCookie(NewOrder);</PRE>
<PRE>      Token0 = database.indexOf(&quot;|&quot;, 0);
      Token1 = database.indexOf(&quot;|&quot;, Token0+1);
      Token2 = database.indexOf(&quot;|&quot;, Token1+1);
      Token3 = database.indexOf(&quot;|&quot;, Token2+1);
      Token4 = database.indexOf(&quot;|&quot;, Token3+1);</PRE>
<PRE>      fields = new Array;
      fields[0] = database.substring( 0, Token0 );                 // Product ID
      fields[1] = database.substring( Token0+1, Token1 );          // Quantity
      fields[2] = database.substring( Token1+1, Token2 );          // Price
      fields[3] = database.substring( Token2+1, Token3 );          // Product Name/Description
      fields[4] = database.substring( Token3+1, Token4 );          // Shipping Cost
      fields[5] = database.substring( Token4+1, database.length ); //Additional Information</PRE>
<PRE>      fTotal     += (parseInt(fields[1]) * parseFloat(fields[2]) );
      fShipping  += (parseInt(fields[1]) * parseFloat(fields[4]) );
      fTax        = (fTotal * TaxRate);
      strTotal    = moneyFormat(fTotal);
      strTax      = moneyFormat(fTax);
      strShipping = moneyFormat(fShipping);</PRE>
<PRE>      if ( bDisplay ) {
         strOutput += &quot;&lt;TR&gt;&lt;TD CLASS=\&quot;nopentry\&quot;&gt;&quot;  + fields[0] + &quot;&lt;/TD&gt;&quot;;</PRE>
<PRE>         if ( fields[5] == &quot;&quot; )
            strOutput += &quot;&lt;TD CLASS=\&quot;nopentry\&quot;&gt;&quot;  + fields[3] + &quot;&lt;/TD&gt;&quot;;
         else
            strOutput += &quot;&lt;TD CLASS=\&quot;nopentry\&quot;&gt;&quot;  + fields[3] + &quot; - &lt;I&gt;&quot;+ fields[5] + &quot;&lt;/I&gt;&lt;/TD&gt;&quot;;</PRE>
<PRE>         strOutput += &quot;&lt;TD CLASS=\&quot;nopentry\&quot;&gt;&lt;INPUT TYPE=TEXT NAME=Q SIZE=2 VALUE=\&quot;&quot; + fields[1] + &quot;\&quot; onChange=\&quot;ChangeQuantity(&quot;+i+&quot;, this.value);\&quot;&gt;&lt;/TD&gt;&quot;;
         strOutput += &quot;&lt;TD CLASS=\&quot;nopentry\&quot;&gt;&quot;+ MonetarySymbol + moneyFormat(fields[2]) + &quot;/ea&lt;/TD&gt;&quot;;</PRE>
<PRE>         if ( DisplayShippingColumn ) {
            if ( parseFloat(fields[4]) &gt; 0 )
               strOutput += &quot;&lt;TD CLASS=\&quot;nopentry\&quot;&gt;&quot;+ MonetarySymbol + moneyFormat(fields[4]) + &quot;/ea&lt;/TD&gt;&quot;;
            else
               strOutput += &quot;&lt;TD CLASS=\&quot;nopentry\&quot;&gt;N/A&lt;/TD&gt;&quot;;
         }</PRE>
<PRE>         strOutput += &quot;&lt;TD CLASS=\&quot;nopentry\&quot; ALIGN=CENTER&gt;&lt;input type=button value=\&quot; &quot;+strRButton+&quot; \&quot; onClick=\&quot;RemoveFromCart(&quot;+i+&quot;)\&quot; class=\&quot;nopbutton\&quot;&gt;&lt;/TD&gt;&lt;/TR&gt;&quot;;
      }</PRE>
<PRE>      if ( AppendItemNumToOutput ) {
         strFooter = i;
      } else {
         strFooter = &quot;&quot;;
      }
      if ( HiddenFieldsToCheckout ) {
         strOutput += &quot;&lt;input type=hidden name=\&quot;&quot; + OutputItemId        + strFooter + &quot;\&quot; value=\&quot;&quot; + fields[0] + &quot;\&quot;&gt;&quot;;
         strOutput += &quot;&lt;input type=hidden name=\&quot;&quot; + OutputItemQuantity  + strFooter + &quot;\&quot; value=\&quot;&quot; + fields[1] + &quot;\&quot;&gt;&quot;;
         strOutput += &quot;&lt;input type=hidden name=\&quot;&quot; + OutputItemPrice     + strFooter + &quot;\&quot; value=\&quot;&quot; + fields[2] + &quot;\&quot;&gt;&quot;;
         strOutput += &quot;&lt;input type=hidden name=\&quot;&quot; + OutputItemName      + strFooter + &quot;\&quot; value=\&quot;&quot; + fields[3] + &quot;\&quot;&gt;&quot;;
         strOutput += &quot;&lt;input type=hidden name=\&quot;&quot; + OutputItemShipping  + strFooter + &quot;\&quot; value=\&quot;&quot; + fields[4] + &quot;\&quot;&gt;&quot;;
         strOutput += &quot;&lt;input type=hidden name=\&quot;&quot; + OutputItemAddtlInfo + strFooter + &quot;\&quot; value=\&quot;&quot; + fields[5] + &quot;\&quot;&gt;&quot;;
      }</PRE>
<PRE>   }</PRE>
<PRE>   if ( bDisplay ) {
      strOutput += &quot;&lt;TR&gt;&lt;TD CLASS=\&quot;noptotal\&quot; COLSPAN=4&gt;&lt;B&gt;&quot;+strSUB+&quot;&lt;/B&gt;&lt;/TD&gt;&quot;;
      strOutput += &quot;&lt;TD CLASS=\&quot;noptotal\&quot; COLSPAN=2&gt;&lt;B&gt;&quot; + MonetarySymbol + strTotal + &quot;&lt;/B&gt;&lt;/TD&gt;&quot;;
      strOutput += &quot;&lt;/TR&gt;&quot;;</PRE>
<PRE>      if ( DisplayShippingRow ) {
         strOutput += &quot;&lt;TR&gt;&lt;TD CLASS=\&quot;noptotal\&quot; COLSPAN=4&gt;&lt;B&gt;&quot;+strSHIP+&quot;&lt;/B&gt;&lt;/TD&gt;&quot;;
         strOutput += &quot;&lt;TD CLASS=\&quot;noptotal\&quot; COLSPAN=2&gt;&lt;B&gt;&quot; + MonetarySymbol + strShipping + &quot;&lt;/B&gt;&lt;/TD&gt;&quot;;
         strOutput += &quot;&lt;/TR&gt;&quot;;
      }</PRE>
<PRE>      if ( DisplayTaxRow || TaxByRegion ) {
         if ( TaxByRegion ) {
            strOutput += &quot;&lt;TR&gt;&lt;TD CLASS=\&quot;noptotal\&quot; COLSPAN=4&gt;&lt;B&gt;&quot;+strTAX+&quot;&lt;/B&gt;&lt;/TD&gt;&quot;;
            strOutput += &quot;&lt;TD CLASS=\&quot;noptotal\&quot; COLSPAN=2&gt;&lt;B&gt;&quot;;
            strOutput += &quot;&lt;input type=radio name=\&quot;&quot;+OutputOrderTax+&quot;\&quot; value=\&quot;&quot; + strTax + &quot;\&quot;&gt;&quot;;
            strOutput += TaxablePrompt + &quot;: &quot; + MonetarySymbol + strTax;
            strOutput += &quot;&lt;BR&gt;&lt;input type=radio name=\&quot;&quot;+OutputOrderTax+&quot;\&quot; value=\&quot;0.00\&quot;&gt;&quot;;
            strOutput += NonTaxablePrompt + &quot;: &quot; + MonetarySymbol + &quot;0.00&quot;;
            strOutput += &quot;&lt;/B&gt;&lt;/TD&gt;&quot;;
            strOutput += &quot;&lt;/TR&gt;&quot;;
         } else {
            strOutput += &quot;&lt;TR&gt;&lt;TD CLASS=\&quot;noptotal\&quot; COLSPAN=4&gt;&lt;B&gt;&quot;+strTAX+&quot;&lt;/B&gt;&lt;/TD&gt;&quot;;
            strOutput += &quot;&lt;TD CLASS=\&quot;noptotal\&quot; COLSPAN=2&gt;&lt;B&gt;&quot; + MonetarySymbol + strTax + &quot;&lt;/B&gt;&lt;/TD&gt;&quot;;
            strOutput += &quot;&lt;/TR&gt;&quot;;
         }
      }</PRE>
<PRE>      if ( !TaxByRegion ) {
         strOutput += &quot;&lt;TR&gt;&lt;TD CLASS=\&quot;noptotal\&quot; COLSPAN=4&gt;&lt;B&gt;&quot;+strTOT+&quot;&lt;/B&gt;&lt;/TD&gt;&quot;;
         strOutput += &quot;&lt;TD CLASS=\&quot;noptotal\&quot; COLSPAN=2&gt;&lt;B&gt;&quot; + MonetarySymbol + moneyFormat((fTotal + fShipping + fTax)) + &quot;&lt;/B&gt;&lt;/TD&gt;&quot;;
         strOutput += &quot;&lt;/TR&gt;&quot;;
      }
      strOutput += &quot;&lt;/TABLE&gt;&quot;;</PRE>
<PRE>      if ( HiddenFieldsToCheckout ) {
         strOutput += &quot;&lt;input type=hidden name=\&quot;&quot;+OutputOrderSubtotal+&quot;\&quot; value=\&quot;&quot;+ MonetarySymbol + strTotal + &quot;\&quot;&gt;&quot;;
         strOutput += &quot;&lt;input type=hidden name=\&quot;&quot;+OutputOrderShipping+&quot;\&quot; value=\&quot;&quot;+ MonetarySymbol + strShipping + &quot;\&quot;&gt;&quot;;
         strOutput += &quot;&lt;input type=hidden name=\&quot;&quot;+OutputOrderTax+&quot;\&quot;      value=\&quot;&quot;+ MonetarySymbol + strTax + &quot;\&quot;&gt;&quot;;
         strOutput += &quot;&lt;input type=hidden name=\&quot;&quot;+OutputOrderTotal+&quot;\&quot;    value=\&quot;&quot;+ MonetarySymbol + moneyFormat((fTotal + fShipping + fTax)) + &quot;\&quot;&gt;&quot;;
      }
   }
   g_TotalCost = (fTotal + fShipping + fTax);</PRE>
<PRE>   document.write(strOutput);
   document.close();
}</PRE>
<PRE>//---------------------------------------------------------------------||
// FUNCTION:    ValidateCart                                           ||
// PARAMETERS:  Form to validate                                       ||
// RETURNS:     true/false                                             ||
// PURPOSE:     Validates the managecart form                          ||
//---------------------------------------------------------------------||
var g_TotalCost = 0;
function ValidateCart( theForm ) {
   if ( TaxByRegion ) {
      if ( !RadioChecked(eval(&quot;theForm.&quot;+OutputOrderTax)) ) {
         alert( TaxPrompt );
         return false;
      }
   }</PRE>
<PRE>   if ( MinimumOrder &gt;= 0.01 ) {
      if ( g_TotalCost &lt; MinimumOrder ) {
         alert( MinimumOrderPrompt );
         return false;
      }
   }</PRE>
<PRE>   return true;
}</PRE>
<PRE>//---------------------------------------------------------------------||
// FUNCTION:    CheckoutCart                                           ||
// PARAMETERS:  Null                                                   ||
// RETURNS:     Product Table Written to Document                      ||
// PURPOSE:     Draws current cart product table on HTML page for      ||
//              checkout.                                              ||
//---------------------------------------------------------------------||
function CheckoutCart( ) {
   var iNumberOrdered = 0;    //Number of products ordered
   var fTotal         = 0;    //Total cost of order
   var fTax           = 0;    //Tax amount
   var fShipping      = 0;    //Shipping amount
   var strTotal       = &quot;&quot;;   //Total cost formatted as money
   var strTax         = &quot;&quot;;   //Total tax formatted as money
   var strShipping    = &quot;&quot;;   //Total shipping formatted as money
   var strOutput      = &quot;&quot;;   //String to be written to page
   var bDisplay       = true; //Whether to write string to the page (here for programmers)
   var strPP          = &quot;&quot;;   //Payment Processor Description Field</PRE>
<PRE>   iNumberOrdered = GetCookie(&quot;NumberOrdered&quot;);
   if ( iNumberOrdered == null )
      iNumberOrdered = 0;</PRE>
<PRE>   if ( TaxByRegion ) {
      QueryString_Parse();
      fTax = parseFloat( QueryString( OutputOrderTax ) );
      strTax = moneyFormat(fTax);
   }</PRE>
<PRE>   if ( bDisplay )
      strOutput = &quot;&lt;TABLE CLASS=\&quot;nopcart\&quot;&gt;&lt;TR&gt;&quot; +
                  &quot;&lt;TD CLASS=\&quot;nopheader\&quot;&gt;&lt;B&gt;&quot;+strILabel+&quot;&lt;/B&gt;&lt;/TD&gt;&quot; +
                  &quot;&lt;TD CLASS=\&quot;nopheader\&quot;&gt;&lt;B&gt;&quot;+strDLabel+&quot;&lt;/B&gt;&lt;/TD&gt;&quot; +
                  &quot;&lt;TD CLASS=\&quot;nopheader\&quot;&gt;&lt;B&gt;&quot;+strQLabel+&quot;&lt;/B&gt;&lt;/TD&gt;&quot; +
                  &quot;&lt;TD CLASS=\&quot;nopheader\&quot;&gt;&lt;B&gt;&quot;+strPLabel+&quot;&lt;/B&gt;&lt;/TD&gt;&quot; +
                  (DisplayShippingColumn?&quot;&lt;TD CLASS=\&quot;nopheader\&quot;&gt;&lt;B&gt;&quot;+strSLabel+&quot;&lt;/B&gt;&lt;/TD&gt;&quot;:&quot;&quot;) +
                  &quot;&lt;/TR&gt;&quot;;</PRE>
<PRE>   for ( i = 1; i &lt;= iNumberOrdered; i++ ) {
      NewOrder = &quot;Order.&quot; + i;
      database = &quot;&quot;;
      database = GetCookie(NewOrder);</PRE>
<PRE>      Token0 = database.indexOf(&quot;|&quot;, 0);
      Token1 = database.indexOf(&quot;|&quot;, Token0+1);
      Token2 = database.indexOf(&quot;|&quot;, Token1+1);
      Token3 = database.indexOf(&quot;|&quot;, Token2+1);
      Token4 = database.indexOf(&quot;|&quot;, Token3+1);</PRE>
<PRE>      fields = new Array;
      fields[0] = database.substring( 0, Token0 );                 // Product ID
      fields[1] = database.substring( Token0+1, Token1 );          // Quantity
      fields[2] = database.substring( Token1+1, Token2 );          // Price
      fields[3] = database.substring( Token2+1, Token3 );          // Product Name/Description
      fields[4] = database.substring( Token3+1, Token4 );          // Shipping Cost
      fields[5] = database.substring( Token4+1, database.length ); //Additional Information</PRE>
<PRE>      fTotal     += (parseInt(fields[1]) * parseFloat(fields[2]) );
      fShipping  += (parseInt(fields[1]) * parseFloat(fields[4]) );
      if ( !TaxByRegion ) fTax = (fTotal * TaxRate);
      strTotal    = moneyFormat(fTotal);
      if ( !TaxByRegion ) strTax = moneyFormat(fTax);
      strShipping = moneyFormat(fShipping);</PRE>
<PRE>      if ( bDisplay ) {
         strOutput += &quot;&lt;TR&gt;&lt;TD CLASS=\&quot;nopentry\&quot;&gt;&quot;  + fields[0] + &quot;&lt;/TD&gt;&quot;;</PRE>
<PRE>         if ( fields[5] == &quot;&quot; )
            strOutput += &quot;&lt;TD CLASS=\&quot;nopentry\&quot;&gt;&quot;  + fields[3] + &quot;&lt;/TD&gt;&quot;;
         else
            strOutput += &quot;&lt;TD CLASS=\&quot;nopentry\&quot;&gt;&quot;  + fields[3] + &quot; - &lt;I&gt;&quot;+ fields[5] + &quot;&lt;/I&gt;&lt;/TD&gt;&quot;;</PRE>
<PRE>         strOutput += &quot;&lt;TD CLASS=\&quot;nopentry\&quot;&gt;&quot; + fields[1] + &quot;&lt;/TD&gt;&quot;;
         strOutput += &quot;&lt;TD CLASS=\&quot;nopentry\&quot;&gt;&quot;+ MonetarySymbol + moneyFormat(fields[2]) + &quot;/ea&lt;/TD&gt;&quot;;</PRE>
<PRE>         if ( DisplayShippingColumn ) {
            if ( parseFloat(fields[4]) &gt; 0 )
               strOutput += &quot;&lt;TD CLASS=\&quot;nopentry\&quot;&gt;&quot;+ MonetarySymbol + moneyFormat(fields[4]) + &quot;/ea&lt;/TD&gt;&quot;;
            else
               strOutput += &quot;&lt;TD CLASS=\&quot;nopentry\&quot;&gt;N/A&lt;/TD&gt;&quot;;
         }</PRE>
<PRE>         strOutput += &quot;&lt;/TR&gt;&quot;;
      }</PRE>
<PRE>      if ( AppendItemNumToOutput ) {
         strFooter = i;
      } else {
         strFooter = &quot;&quot;;
      }
      if ( PaymentProcessor != '' ) {
         //Process description field for payment processors instead of hidden values.
         //Format Description of product as:
         // ID, Name, Qty X
         strPP += fields[0] + &quot;, &quot; + fields[3];
         if ( fields[5] != &quot;&quot; )
            strPP += &quot; - &quot; + fields[5];
         strPP += &quot;, Qty. &quot; + fields[1] + &quot;\n&quot;;
      } else {
         strOutput += &quot;&lt;input type=hidden name=\&quot;&quot; + OutputItemId        + strFooter + &quot;\&quot; value=\&quot;&quot; + fields[0] + &quot;\&quot;&gt;&quot;;
         strOutput += &quot;&lt;input type=hidden name=\&quot;&quot; + OutputItemQuantity  + strFooter + &quot;\&quot; value=\&quot;&quot; + fields[1] + &quot;\&quot;&gt;&quot;;
         strOutput += &quot;&lt;input type=hidden name=\&quot;&quot; + OutputItemPrice     + strFooter + &quot;\&quot; value=\&quot;&quot; + fields[2] + &quot;\&quot;&gt;&quot;;
         strOutput += &quot;&lt;input type=hidden name=\&quot;&quot; + OutputItemName      + strFooter + &quot;\&quot; value=\&quot;&quot; + fields[3] + &quot;\&quot;&gt;&quot;;
         strOutput += &quot;&lt;input type=hidden name=\&quot;&quot; + OutputItemShipping  + strFooter + &quot;\&quot; value=\&quot;&quot; + fields[4] + &quot;\&quot;&gt;&quot;;
         strOutput += &quot;&lt;input type=hidden name=\&quot;&quot; + OutputItemAddtlInfo + strFooter + &quot;\&quot; value=\&quot;&quot; + fields[5] + &quot;\&quot;&gt;&quot;;
      } </PRE>
<PRE>   }</PRE>
<PRE>   if ( bDisplay ) {
      strOutput += &quot;&lt;TR&gt;&lt;TD CLASS=\&quot;noptotal\&quot; COLSPAN=3&gt;&lt;B&gt;&quot;+strSUB+&quot;&lt;/B&gt;&lt;/TD&gt;&quot;;
      strOutput += &quot;&lt;TD CLASS=\&quot;noptotal\&quot; COLSPAN=2 ALIGN=RIGHT&gt;&lt;B&gt;&quot; + MonetarySymbol + strTotal + &quot;&lt;/B&gt;&lt;/TD&gt;&quot;;
      strOutput += &quot;&lt;/TR&gt;&quot;;</PRE>
<PRE>      if ( DisplayShippingRow ) {
         strOutput += &quot;&lt;TR&gt;&lt;TD CLASS=\&quot;noptotal\&quot; COLSPAN=3&gt;&lt;B&gt;&quot;+strSHIP+&quot;&lt;/B&gt;&lt;/TD&gt;&quot;;
         strOutput += &quot;&lt;TD CLASS=\&quot;noptotal\&quot; COLSPAN=2 ALIGN=RIGHT&gt;&lt;B&gt;&quot; + MonetarySymbol + strShipping + &quot;&lt;/B&gt;&lt;/TD&gt;&quot;;
         strOutput += &quot;&lt;/TR&gt;&quot;;
      }</PRE>
<PRE>      if ( DisplayTaxRow || TaxByRegion ) {
         strOutput += &quot;&lt;TR&gt;&lt;TD CLASS=\&quot;noptotal\&quot; COLSPAN=3&gt;&lt;B&gt;&quot;+strTAX+&quot;&lt;/B&gt;&lt;/TD&gt;&quot;;
         strOutput += &quot;&lt;TD CLASS=\&quot;noptotal\&quot; COLSPAN=2 ALIGN=RIGHT&gt;&lt;B&gt;&quot; + MonetarySymbol + strTax + &quot;&lt;/B&gt;&lt;/TD&gt;&quot;;
         strOutput += &quot;&lt;/TR&gt;&quot;;
      }</PRE>
<PRE>      strOutput += &quot;&lt;TR&gt;&lt;TD CLASS=\&quot;noptotal\&quot; COLSPAN=3&gt;&lt;B&gt;&quot;+strTOT+&quot;&lt;/B&gt;&lt;/TD&gt;&quot;;
      strOutput += &quot;&lt;TD CLASS=\&quot;noptotal\&quot; COLSPAN=2 ALIGN=RIGHT&gt;&lt;B&gt;&quot; + MonetarySymbol + moneyFormat((fTotal + fShipping + fTax)) + &quot;&lt;/B&gt;&lt;/TD&gt;&quot;;
      strOutput += &quot;&lt;/TR&gt;&quot;;</PRE>
<PRE>      strOutput += &quot;&lt;/TABLE&gt;&quot;;</PRE>
<PRE>      
      if ( PaymentProcessor == 'an') {
         //Process this for Authorize.net WebConnect
         strOutput += &quot;&lt;input type=hidden name=\&quot;x_Version\&quot; value=\&quot;3.0\&quot;&gt;&quot;;
         strOutput += &quot;&lt;input type=hidden name=\&quot;x_Show_Form\&quot; value=\&quot;PAYMENT_FORM\&quot;&gt;&quot;;
         strOutput += &quot;&lt;input type=hidden name=\&quot;x_Description\&quot; value=\&quot;&quot;+ strPP + &quot;\&quot;&gt;&quot;;
         strOutput += &quot;&lt;input type=hidden name=\&quot;x_Amount\&quot; value=\&quot;&quot;+ moneyFormat((fTotal + fShipping + fTax)) + &quot;\&quot;&gt;&quot;;
      } else if ( PaymentProcessor == 'wp') {
         //Process this for WorldPay
         strOutput += &quot;&lt;input type=hidden name=\&quot;desc\&quot; value=\&quot;&quot;+ strPP + &quot;\&quot;&gt;&quot;;
         strOutput += &quot;&lt;input type=hidden name=\&quot;amount\&quot; value=\&quot;&quot;+ moneyFormat((fTotal + fShipping + fTax)) + &quot;\&quot;&gt;&quot;;
      } else if ( PaymentProcessor == 'lp') {
         //Process this for LinkPoint         
         strOutput += &quot;&lt;input type=hidden name=\&quot;mode\&quot; value=\&quot;fullpay\&quot;&gt;&quot;;
         strOutput += &quot;&lt;input type=hidden name=\&quot;chargetotal\&quot; value=\&quot;&quot;+ moneyFormat((fTotal + fShipping + fTax)) + &quot;\&quot;&gt;&quot;;
         strOutput += &quot;&lt;input type=hidden name=\&quot;tax\&quot; value=\&quot;&quot;+ MonetarySymbol + strTax + &quot;\&quot;&gt;&quot;;
         strOutput += &quot;&lt;input type=hidden name=\&quot;subtotal\&quot; value=\&quot;&quot;+ MonetarySymbol + strTotal + &quot;\&quot;&gt;&quot;;
         strOutput += &quot;&lt;input type=hidden name=\&quot;shipping\&quot; value=\&quot;&quot;+ MonetarySymbol + strShipping + &quot;\&quot;&gt;&quot;;
         strOutput += &quot;&lt;input type=hidden name=\&quot;desc\&quot; value=\&quot;&quot;+ strPP + &quot;\&quot;&gt;&quot;;
      } else {
         strOutput += &quot;&lt;input type=hidden name=\&quot;&quot;+OutputOrderSubtotal+&quot;\&quot; value=\&quot;&quot;+ MonetarySymbol + strTotal + &quot;\&quot;&gt;&quot;;
         strOutput += &quot;&lt;input type=hidden name=\&quot;&quot;+OutputOrderShipping+&quot;\&quot; value=\&quot;&quot;+ MonetarySymbol + strShipping + &quot;\&quot;&gt;&quot;;
         strOutput += &quot;&lt;input type=hidden name=\&quot;&quot;+OutputOrderTax+&quot;\&quot;      value=\&quot;&quot;+ MonetarySymbol + strTax + &quot;\&quot;&gt;&quot;;
         strOutput += &quot;&lt;input type=hidden name=\&quot;&quot;+OutputOrderTotal+&quot;\&quot;    value=\&quot;&quot;+ MonetarySymbol + moneyFormat((fTotal + fShipping + fTax)) + &quot;\&quot;&gt;&quot;;
      }
   }</PRE>
<PRE>   document.write(strOutput);
   document.close();
}</PRE>
<PRE>//=====================================================================||
//               END NOP Design SmartPost Shopping Cart                ||
//=====================================================================||</PRE>
