//=====================================================================|| 
// 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 || 
//=====================================================================|| 

//=====================================================================||
// UPS Shiping Mod by Stefko V.1.0.0 ||
// ||
// Version History: 02/23/03  V.1.0.0 Released ||
//                            includes USERENTRY ||                            
//                  03/02/03  V.1.1.0 Now works with Netscape & Opera ||
//                            added Taxable and Non-taxable product code||
//                            added MathRound to Weight ||
// 
//                  03/28/03  V.1.2.0 Bug fixes ||
//                            Corrected Taxable and Non-taxable Product code ||
//                            checkout with an empty cart       ||          
//=====================================================================||

//Updated 11/9/03 by arc || 

//---------------------------------------------------------------------|| 
// 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 <SCRIPT SRC="../os1/nopcart.js">... line. || 
// For example: <SCRIPT SRC="language-en.js"></SCRIPT> || 
// || 
// 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<..>: 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 || 
//---------------------------------------------------------------------|| 

//Options for Everyone: 
MonetarySymbol = '$'; 
DisplayNotice = true;
DisplayChangeQty = false;
DisplayShippingColumn = false; 
DisplayShippingRow = true; 
TaxRate = 0; //set taxable region rate ||
DisplayTaxRow = true; 
TaxByRegion = false; //leave this at false, UPS Shipping Mod will activate taxable Zone ||
TaxPrompt = 'For tax purposes, please select if you are a Nevada resident before continuing'; //Deactivated ||
TaxablePrompt = 'Nevada'; //Deactivated ||
NonTaxablePrompt = 'Other State'; //Deactivated ||
MinimumOrder = 0.01; 
MinimumOrderPrompt = 'You can not proceed to check out, because your shopping cart is empty.\n \nClick on "CONTINUE SHOPPING" to put items in your cart. '; 
//original syntax - MinimumOrderPrompt = 'Your order is below our minimum order, please order more before checking out.'; 

NoQtyPrompt = 'You cannot proceed until a Shipping Zone has been selected'; //If attempted to go to checkout before selecting shipping zone ||

//Payment Processor Options: 
PaymentProcessor = 'pp'; 

//Options for Programmers: 
OutputItemId = 'ID_'; 
OutputItemQuantity = 'QUANTITY_'; 
OutputItemPrice = 'PRICE_'; 
OutputItemName = 'x_description'; 
OutputItemWeight = 'WEIGHT_'; //Added for UPS mod ||
OutputItemAddtlInfo = 'ADDTLINFO_';
OutputItemXtend = 'XTEND_'; 
OutputOrderZone = 'SHIPZONE';
OutputOrderSubtotal = 'x_subtotal'; 
OutputOrderShipping = 'x_freight'; 
OutputOrderTax = 'x_tax'; 
OutputOrderTotal = 'x_amount'; 
AppendItemNumToOutput = true; 
HiddenFieldsToCheckout = true; 

//Options for Shipping by Weight: 
LocationLabel = 'ZONE'; 
LocationPrompt = 'In order to have your items shipped, please select a shipping destination.'; 
MaxWeightPrompt = 'Please, place your order as usual and we will contact you about your shipping cost.\n\Thank you.';  



//=====================================================================|| 
//---------------------------------------------------------------------|| 
// YOU DO NOT NEED TO MAKE ANY MODIFICATIONS BELOW THIS LINE || 
//---------------------------------------------------------------------|| 
//=====================================================================|| 


//---------------------------------------------------------------------|| 
// 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 = "I'm Sorry, your cart is full, please proceed to checkout."; 
strAdded = " Added to your shopping cart."; 
strRemove = "Click 'Ok' to remove this product from your shopping cart."; 
strILabel = "Product Id"; 
strDLabel = "Product Name/Description"; 
strQLabel = "Qty"; 
strPLabel = "Price"; 
strSLabel = "Weight"; //Added for UPS mod ||
strRLabel = "Remove From Cart"; 
strRButton= "Remove"; 
strSUB = "Subtotal"; 
strWTOT = "TOTAL WEIGHT"; //Added for UPS mod ||
strSHIP = "Shipping"; 
strTAX = "Tax"; 
strTOT = "Order total"; 
strErrQty = "Invalid Quantity."; 
strNewQty = 'Please enter new quantity:'; 
bLanguageDefined = true; 
} 


//---------------------------------------------------------------------|| 
// 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 = ""; 

for ( i = 0; i < checkString.length; i++ ) { 
ch = checkString.substring(i, i+1); 
if ( (ch >= "0" && ch <= "9") || (ch == '.') ) 
strNewQuantity += ch; 
} 

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 || 
// EXTRAS ADDED IN: USERENTRY for customer text input ||
//---------------------------------------------------------------------|| 
function AddToCart(thisForm) { 
var iNumberOrdered = 0; 
var bAlreadyInCart = false; 
var notice = ""; 
iNumberOrdered = GetCookie("NumberOrdered"); 

if ( iNumberOrdered == null ) 
iNumberOrdered = 0; 

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.WEIGHT == null ) //Added for UPS mod ||
strSHIPPING = "0"; 
else 
strSHIPPING = thisForm.WEIGHT.value; 

if ( thisForm.ADDITIONALINFO == null ) { 
strADDTLINFO = ""; 
} else { 
strADDTLINFO = thisForm.ADDITIONALINFO[thisForm.ADDITIONALINFO.selectedIndex].value; 
} 
if ( thisForm.ADDITIONALINFO2 != null ) { 
strADDTLINFO += " " + thisForm.ADDITIONALINFO2[thisForm.ADDITIONALINFO2.selectedIndex].value; 
} 
if ( thisForm.ADDITIONALINFO3 != null ) { 
strADDTLINFO += " " + thisForm.ADDITIONALINFO3[thisForm.ADDITIONALINFO3.selectedIndex].value; 
} 
if ( thisForm.ADDITIONALINFO4 != null ) { 
strADDTLINFO += " " + thisForm.ADDITIONALINFO4[thisForm.ADDITIONALINFO4.selectedIndex].value; 
}
if ( thisForm.USERENTRY != null ) { 
strADDTLINFO += " " + thisForm.USERENTRY.value; 
} 
if ( thisForm.USERENTRY2 != null ) { 
strADDTLINFO += "; " + thisForm.USERENTRY2.value; 
} 
if ( thisForm.USERENTRY3 != null ) { 
strADDTLINFO += "; " + thisForm.USERENTRY3.value; 
} 

//Is this product already in the cart? If so, increment quantity instead of adding another. 
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[0] == strID_NUM && 
fields[2] == strPRICE && 
fields[3] == strNAME && 
fields[5] == strADDTLINFO 
) { 
bAlreadyInCart = true; 
dbUpdatedOrder = strID_NUM + "|" + 
(parseInt(strQUANTITY)+parseInt(fields[1])) + "|" + 
strPRICE + "|" + 
strNAME + "|" + 
strSHIPPING + "|" + 
strADDTLINFO; 
strNewOrder = "Order." + i; 
DeleteCookie(strNewOrder, "/"); 
SetCookie(strNewOrder, dbUpdatedOrder, null, "/"); 
notice = strAdded + "\n-------------------------------------\n" + "Quantity : " + strQUANTITY + "\nProduct  : " + strNAME  +"\n"+strADDTLINFO;
break; 
} 
} 


if ( !bAlreadyInCart ) { 
iNumberOrdered++; 

if ( iNumberOrdered > 20 ) 
alert( strSorry ); 
else { 
dbUpdatedOrder = strID_NUM + "|" + 
strQUANTITY + "|" + 
strPRICE + "|" + 
strNAME + "|" + 
strSHIPPING + "|" + 
strADDTLINFO; 

strNewOrder = "Order." + iNumberOrdered; 
SetCookie(strNewOrder, dbUpdatedOrder, null, "/"); 
SetCookie("NumberOrdered", iNumberOrdered, null, "/"); 
notice = strAdded + "\n-------------------------------------\n" + "Quantity : " + strQUANTITY + "\nProduct  : " + strNAME  +"\n"+strADDTLINFO;
} 
} 

if ( DisplayNotice && notice!=''){ 
alert(notice); 
}else{ 
} 

} 
//---------------------------------------------------------------------|| 
// FUNCTION: AddToOtherCart || 
// PARAMETERS: Form Object || 
// RETURNS: Cookie to user's browser, with prompt || 
// PURPOSE: Adds a product to the user's shopping cart || 
// EXTRAS ADDED IN: USERENTRY for customer text input ||
//---------------------------------------------------------------------|| 
function AddToOtherCart(thisForm) { 
var iNumberOrdered = 0; 
var bAlreadyInCart = false; 
var notice = ""; 
iNumberOrdered = GetCookie("NumberOrdered"); 

if ( iNumberOrdered == null ) 
iNumberOrdered = 0; 

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.WEIGHT == null ) //Added for UPS mod ||
strSHIPPING = "0"; 
else 
strSHIPPING = thisForm.WEIGHT.value; 

selectedObj = 
thisForm.ADDITIONALINFO[thisForm.ADDITIONALINFO.selectedIndex].value; 
   if (selectedObj == "select") { 
      alert('Please Select Grind'); 
      return false; 
   }

if ( thisForm.ADDITIONALINFO == null ) { 
strADDTLINFO = ""; 
} else { 
strADDTLINFO = thisForm.ADDITIONALINFO[thisForm.ADDITIONALINFO.selectedIndex].value; 
} 
if ( thisForm.ADDITIONALINFO2 != null ) { 
strADDTLINFO += " " + thisForm.ADDITIONALINFO2[thisForm.ADDITIONALINFO2.selectedIndex].value; 
} 
if ( thisForm.ADDITIONALINFO3 != null ) { 
strADDTLINFO += " " + thisForm.ADDITIONALINFO3[thisForm.ADDITIONALINFO3.selectedIndex].value; 
} 
if ( thisForm.ADDITIONALINFO4 != null ) { 
strADDTLINFO += " " + thisForm.ADDITIONALINFO4[thisForm.ADDITIONALINFO4.selectedIndex].value; 
}
if ( thisForm.USERENTRY != null ) { 
strADDTLINFO += "; " + thisForm.USERENTRY.value; 
} 
if ( thisForm.USERENTRY2 != null ) { 
strADDTLINFO += "; " + thisForm.USERENTRY2.value; 
} 
if ( thisForm.USERENTRY3 != null ) { 
strADDTLINFO += "; " + thisForm.USERENTRY3.value; 
} 

//Is this product already in the cart? If so, increment quantity instead of adding another. 
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[0] == strID_NUM && 
fields[2] == strPRICE && 
fields[3] == strNAME && 
fields[5] == strADDTLINFO 
) { 
bAlreadyInCart = true; 
dbUpdatedOrder = strID_NUM + "|" + 
(parseInt(strQUANTITY)+parseInt(fields[1])) + "|" + 
strPRICE + "|" + 
strNAME + "|" + 
strSHIPPING + "|" + 
strADDTLINFO; 
strNewOrder = "Order." + i; 
DeleteCookie(strNewOrder, "/"); 
SetCookie(strNewOrder, dbUpdatedOrder, null, "/"); 
notice = strAdded + "\n-------------------------------------\n" + "Quantity : " + strQUANTITY + "\nProduct  : " + strNAME  +"\n"+strADDTLINFO;
break; 
} 
} 


if ( !bAlreadyInCart ) { 
iNumberOrdered++; 

if ( iNumberOrdered > 20 ) 
alert( strSorry ); 
else { 
dbUpdatedOrder = strID_NUM + "|" + 
strQUANTITY + "|" + 
strPRICE + "|" + 
strNAME + "|" + 
strSHIPPING + "|" + 
strADDTLINFO; 

strNewOrder = "Order." + iNumberOrdered; 
SetCookie(strNewOrder, dbUpdatedOrder, null, "/"); 
SetCookie("NumberOrdered", iNumberOrdered, null, "/"); 
notice = strAdded + "\n-------------------------------------\n" + "Quantity : " + strQUANTITY + "\nProduct  : " + strNAME  +"\n"+strADDTLINFO;
} 
} 

if ( DisplayNotice && notice!=''){ 
alert(notice); 
}else{ 
} 

} 


//---------------------------------------------------------------------|| 
// 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: RemoveFromCart || 
// PARAMETERS: Order Number to Remove || 
// RETURNS: Null || 
// PURPOSE: Removes an item from a users shopping cart || 
//---------------------------------------------------------------------|| 
function RemoveFromCart(RemOrder) { 
if ( strRemove )  { 
NumberOrdered = GetCookie("NumberOrdered"); 
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: 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 = "Order." + OrderItem; 
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 ); 

dbUpdatedOrder = fields[0] + "|" + 
NewQuantity + "|" + 
fields[2] + "|" + 
fields[3] + "|" + 
fields[4] + "|" + 
fields[5]; 
strNewOrder = "Order." + OrderItem; 
DeleteCookie(strNewOrder, "/"); 
SetCookie(strNewOrder, dbUpdatedOrder, null, "/"); 
location.href=location.href; 
} 
} 


//---------------------------------------------------------------------|| 
// 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( ); 
} 


//---------------------------------------------------------------------||
// 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 < rlen; i++ ) {
      if ( radiobutton[i].checked )
         bChecked = true;
   }    
   return bChecked;
} 



//---------------------------------------------------------------------|| 
// 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<QueryString.keys.length;i++) { 
if (QueryString.keys[i]==key) { 
value = QueryString.values[i]; 
break; 
} 
} 
return value; 
} 

//---------------------------------------------------------------------|| 
// 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("&"); for (var i=0;i>pairs.length;i++) { 
var pos = pairs[i].indexOf('='); 
if (pos >= 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; 
} 
} 
} 


//---------------------------------------------------------------------|| 
// FUNCTION: ManageCart || 
// PARAMETERS: Null || 
// RETURNS: Product Table Written to Document || 
// PURPOSE: Draws current cart product table on HTML page || 
// EXTRAS ADDED IN: Code to enable UPS mod. ||
//---------------------------------------------------------------------|| 
function ManageCart( ) { 
var iNumberOrdered = 0; //Number of products ordered 
var fTotal = 0; //Total cost of order 
var fTax = 0; //Tax amount 
var fWeight = 0; //Weight 
var fShipping = 0; //Shipping amount
var strSLabel = "Weight";
var strTotal = ""; //Total cost formatted as money 
var strTax = ""; //Total tax formatted as money
var strWTOT = "Total Weight"; //Total weight 
var strShipping = ""; //Total shipping formatted as money 
var strOutput = ""; //String to be written to page 
var bDisplay = true; //Whether to write string to the page (here for programmers) 

iNumberOrdered = GetCookie("NumberOrdered"); 
if ( iNumberOrdered == null ) 
iNumberOrdered = 0; 

LocationSelected = GetCookie("ZoneSelected"); 
if (LocationSelected == true) LocationSelected = 0; // Code to use Wichita as default checked if customer goes to Checkout with an empty Cart ||


if ( bDisplay ) 
strOutput = "<TABLE CLASS=\"nopcart\" border=\"0\" width=655 align=center><TR>" +

 (DisplayShippingColumn?"<TD CLASS=\"nopheader\"></TD><B></B>D>":"") +
                  "</TR>";


if ( iNumberOrdered == 0 ) { 
strOutput += "<TR><TD COLSPAN=6 CLASS=\"nopentry\"><CENTER><BR><B>Your cart is empty</B><BR><BR></CENTER></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 ); // 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 ); // Weight 
fields[5] = database.substring( Token4+1, database.length ); //Additional Information 


fprodttl = (parseInt(fields[1]) * parseFloat(fields[2]) ); 
fTotal += (parseInt(fields[1]) * parseFloat(fields[2]) ); 
fWeight += (parseInt(fields[1]) * parseFloat(fields[4]) ); 
fWeight = Math.round(fWeight * 100)/100; 
var strProductId = fields[0]; 
strProductId=strProductId.charAt(0); 
if( strProductId!= 'z' ) { 
fTax += (parseInt(fields[1]) * parseFloat(fields[2]) ) * TaxRate; 
} 

 
      if ( !TaxByRegion ) fTax = (fTotal * TaxRate);
      strTotal    = moneyFormat(fTotal);
      if ( !TaxByRegion ) strTax = moneyFormat(fTax);
      strShipping = moneyFormat(fShipping);

if ( bDisplay ) {
         

         if ( fields[5] == "" )
            strOutput += "<TD CLASS=\"item\" width=500>"  + fields[3] + "</TD>";
         else
            strOutput += "<TD CLASS=\"item\">"  + fields[3] + " - "+ fields[5] + "</TD>";

         strOutput += "<TD CLASS=\"item\"><INPUT TYPE=TEXT NAME=Q SIZE=2 class=form_input VALUE=\"" + fields[1] + "\" onChange=\"ChangeQuantity("+i+", this.value);\"></TD>";
         strOutput += "<TD CLASS=\"nopentry\">"+ MonetarySymbol + moneyFormat(fields[2]) + "/ea</TD>";

        
          strOutput += "<TD width=140 ALIGN=left style=\"cursor:hand; cursor:pointer\" class=\"cartlinks2\"><a href=javascript:location.reload() class=\"cartlinks\" onClick=\"RemoveFromCart("+i+")\"><img src=\"store/clearcart.gif\" align=\"absmiddle\" class=\"cartlinks\" border=\"0\">Delete item</a></TD></TR>";
     
      }

if ( AppendItemNumToOutput ) { 
strFooter = i; 
} else { 
strFooter = ""; 
} 
if ( HiddenFieldsToCheckout ) { 
strOutput += "<input type=hidden name=\"" + OutputItemId + strFooter + "\" value=\"" + fields[0] + "\">"; 
strOutput += "<input type=hidden name=\"" + OutputItemQuantity + strFooter + "\" value=\"" + fields[1] + "\">"; 
strOutput += "<input type=hidden name=\"" + OutputItemPrice + strFooter + "\" value=\"" + fields[2] + "\">"; 
strOutput += "<input type=hidden name=\"" + OutputItemName + strFooter + "\" value=\"" + fields[3] + "\">"; 
strOutput += "<input type=hidden name=\"" + OutputItemWeight + strFooter + "\" value=\"" + fields[4] + "\">"; 
strOutput += "<input type=hidden name=\"" + OutputItemAddtlInfo + strFooter + "\" value=\"" + fields[5] + "\">"; 
} 

} 


strOutput +=" <span class=dot>.....................................................................................................................................................................................................................";
   if ( bDisplay ) {
         strOutput += "</td></tr></table>";
 strOutput += "<table width=500 cellspacing=0 cellpadding=0><tr><td><span class=dot>.....................................................................................................................................................................................................................";
  strOutput += "</td></tr></table>";
  
  
/////////////////////////////////////////////total table starts///////////////////////////////////////||

strOutput += "<TABLE border=0 cellspacing=0 cellpadding=2 width=640><TR>";
strOutput += "<TD height=10></TD></TR><TR>";
strOutput += "<TD width=220 rowspan=5 align=center valign=bottom bgcolor=#FFD700 background=\"common/select_shipping.jpg\">";


function ShowProvince( ) {
   var strProvince = ""
   var strOutput = ""
   
}
if (( DisplayShippingRow ) && ( iNumberOrdered != 0)) { 
//this displays the shipping matrix and sets the value for each zone ||



strOutput += "<SELECT name=\"ZONE\" class=form_input onChange=\"ComputeShipping(this.options[this.selectedIndex].value)\">"; 
strOutput += "<OPTION VALUE=\"0\">Shipping destinations</OPTION>";
strOutput += "<OPTION VALUE=\"0\">------------------------------------</OPTION>";
strOutput += "<OPTION VALUE=\"0\">Shipping destinations Canada</OPTION>";
strOutput += "<OPTION VALUE=\"0\"></OPTION>";
strOutput += "<OPTION VALUE=\"12\">Alberta</OPTION>"; 
strOutput += "<OPTION VALUE=\"13\">British Columbia</OPTION>"; 
strOutput += "<OPTION VALUE=\"10\">Manitoba</OPTION>"; 
strOutput += "<OPTION VALUE=\"4\">New Brunswick</OPTION>"; 
strOutput += "<OPTION VALUE=\"6\">Newfoundland and Labrador</OPTION>"; 
strOutput += "<OPTION VALUE=\"5\">Nova Scotia</OPTION>"; 
strOutput += "<OPTION VALUE=\"3\">Northwest Territories</OPTION>";
strOutput += "<OPTION VALUE=\"2\">Nunawut</OPTION>"; 
strOutput += "<OPTION VALUE=\"9\">Ontario</OPTION>"; 
strOutput += "<OPTION VALUE=\"7\">Prince Edward Island</OPTION>"; 
strOutput += "<OPTION VALUE=\"8\">Quebec</OPTION>";
strOutput += "<OPTION VALUE=\"80\">Metro Montreal</OPTION>";
strOutput += "<OPTION VALUE=\"11\">Saskatchewan</OPTION>"; 
strOutput += "<OPTION VALUE=\"1\">Yukon territory</OPTION>";

strOutput += "<OPTION VALUE=\"0\">------------------------------------</OPTION>";
strOutput += "<OPTION VALUE=\"0\">Shipping destinations USA</OPTION>";
strOutput += "<OPTION VALUE=\"0\"></OPTION>";

strOutput += "<option value=\"15\">Alabama</OPTION>";
strOutput += "<option value=\"16\">Alaska</OPTION>";
strOutput += "<option value=\"17\">American Samoa</OPTION>";
strOutput += "<option value=\"18\">Arizona</OPTION>";
strOutput += "<option value=\"19\">Arkansas</OPTION>";
strOutput += "<option value=\"20\">Armed Forces Americas</OPTION>";
strOutput += "<option value=\"21\">Armed Forces Europe</OPTION>";
strOutput += "<option value=\"22\">Armed Forces Pacific</OPTION>";
strOutput += "<option value=\"23\">California</OPTION>";
strOutput += "<option value=\"24\">Colorado</OPTION>";
strOutput += "<option value=\"25\">Connecticut</OPTION>";
strOutput += "<option value=\"26\">Delaware</OPTION>";
strOutput += "<option value=\"27\">District of Columbia</OPTION>";
strOutput += "<option value=\"28\">Florida</OPTION>";
strOutput += "<option value=\"29\">Georgia</OPTION>";
strOutput += "<option value=\"30\">Guam</OPTION>";
strOutput += "<option value=\"31\">Hawaii</OPTION>";
strOutput += "<option value=\"32\">Idaho</OPTION>";
strOutput += "<option value=\"33\">Illinois</OPTION>";
strOutput += "<option value=\"34\">Indiana</OPTION>";
strOutput += "<option value=\"35\">Iowa</OPTION>";
strOutput += "<option value=\"36\">Kansas</OPTION>";
strOutput += "<option value=\"37\">Kentucky</OPTION>";
strOutput += "<option value=\"38\">Louisiana</OPTION>";
strOutput += "<option value=\"39\">Maine</OPTION>";
strOutput += "<option value=\"40\">Mariana Islands</OPTION>";
strOutput += "<option value=\"41\">Marshall Islands</OPTION>";
strOutput += "<option value=\"42\">Maryland</OPTION>";
strOutput += "<option value=\"43\">Massachusetts</OPTION>";
strOutput += "<option value=\"44\">Michigan</OPTION>";
strOutput += "<option value=\"45\">Micronesia</OPTION>";
strOutput += "<option value=\"46\">Minnesota</OPTION>";
strOutput += "<option value=\"47\">Mississippi</OPTION>";
strOutput += "<option value=\"48\">Missouri</OPTION>";
strOutput += "<option value=\"49\">Montana</OPTION>";
strOutput += "<option value=\"50\">Nebraska</OPTION>";
strOutput += "<option value=\"51\">Nevada</OPTION>";
strOutput += "<option value=\"52\">New Hampshire</OPTION>";
strOutput += "<option value=\"53\">New Jersey</OPTION>";
strOutput += "<option value=\"54\">New Mexico</OPTION>";
strOutput += "<option value=\"55\">New York</OPTION>";
strOutput += "<option value=\"56\">North Carolina</OPTION>";
strOutput += "<option value=\"57\">North Dakota</OPTION>";
strOutput += "<option value=\"58\">Ohio</OPTION>";
strOutput += "<option value=\"59\">Oklahoma</OPTION>";
strOutput += "<option value=\"60\">Oregon</OPTION>";
strOutput += "<option value=\"61\">Outlying Minor Islands</OPTION>";
strOutput += "<option value=\"62\">Palau</OPTION>";
strOutput += "<option value=\"63\">Pennsylvania</OPTION>";
strOutput += "<option value=\"64\">Puerto Rico</OPTION>";
strOutput += "<option value=\"65\">Rhode Island</OPTION>";
strOutput += "<option value=\"66\">Saipan</OPTION>";
strOutput += "<option value=\"67\">South Carolina</OPTION>";
strOutput += "<option value=\"68\">South Dakota</OPTION>";
strOutput += "<option value=\"69\">Tennessee</OPTION>";
strOutput += "<option value=\"70\">Texas</OPTION>";
strOutput += "<option value=\"71\">Tinian</OPTION>";
strOutput += "<option value=\"72\">Utah</OPTION>";
strOutput += "<option value=\"73\">Vermont</OPTION>";
strOutput += "<option value=\"74\">Virgin Islands</OPTION>";
strOutput += "<option value=\"75\">Virginia</OPTION>";
strOutput += "<option value=\"76\">Washington</OPTION>";
strOutput += "<option value=\"77\">West Virginia</OPTION>";
strOutput += "<option value=\"78\">Wisconsin</OPTION>";
strOutput += "<option value=\"79\">Wyoming</OPTION>";

strOutput += "</SELECT>";             



document.write(strOutput);
strOutput = "";

LocationSelected = GetCookie("ZoneSelected"); 
if (LocationSelected == null) LocationSelected = 0; // Code to use Local Area as default checked, but not needed because want null selected at this time ||
if (LocationSelected != null) document.all.ZONE[LocationSelected].checked = true; 

if (LocationSelected != null) {
    var cLocations = document.getElementsByName('ZONE');
    for (var iCtr = 0; iCtr < cLocations.length; iCtr++) {
         if (cLocations[iCtr].value == LocationSelected) cLocations[iCtr].checked = true;
    }
}



 
strOutput += "</select>";




strOutput += "</TD>";             
strOutput += "<TR><TD CLASS=\"noptotal\" COLSPAN=5><B>"+strSUB+"</B></TD>"; 
strOutput += "<TD width=60 COLSPAN=1 ALIGN=RIGHT CLASS=\"noptotal\">" + MonetarySymbol + strTotal + "</TD>"; 
strOutput += "</TR>"; 




////////////////////////////////canadian destinations////////////////////////////////////////////


if (LocationSelected == 0) LocationLabel = '<font color="#3300FF">Please select shipping destination</font>';
if (LocationSelected == 1) LocationLabel = "Shipping rate to Yukon Territories"; 
if (LocationSelected == 2) LocationLabel = "Shipping rate to Nunawut"; 
if (LocationSelected == 3) LocationLabel = "Shipping rate to Northwest Territories"; 
if (LocationSelected == 4) LocationLabel = "Shipping rate to New Brunswick"; 
if (LocationSelected == 5) LocationLabel = "Shipping rate to Nova Scotia"; 
if (LocationSelected == 6) LocationLabel = "Shipping rate to Newfoundland and Labrador"; 
if (LocationSelected == 7) LocationLabel = "Shipping rate to Prince Edward Island"; 
if (LocationSelected == 8) LocationLabel = "Shipping rate to Quebec";
if (LocationSelected == 9) LocationLabel = "Shipping rate to Ontario";
if (LocationSelected == 10) LocationLabel = "Shipping rate to Manitoba";
if (LocationSelected == 11) LocationLabel = "Shipping rate to Saskatchewan";
if (LocationSelected == 12) LocationLabel = "Shipping rate to Alberta";
if (LocationSelected == 13) LocationLabel = "Shipping rate to British Columbia";
if (LocationSelected == 80) LocationLabel = "Shipping rate to Metro Montreal";


////////////////////////////////us destinations////////////////////////////////////////////


				
if (LocationSelected == 14) LocationLabel = "Shipping rate to Alabama";
if (LocationSelected == 15) LocationLabel = "Shipping rate to Alabama";
if (LocationSelected == 16) LocationLabel = "Shipping rate to Alaska";
if (LocationSelected == 17) LocationLabel = "Shipping rate to American Samoa";
if (LocationSelected == 18) LocationLabel = "Shipping rate to Arizona";
if (LocationSelected == 19) LocationLabel = "Shipping rate to Arkansas";
if (LocationSelected == 20) LocationLabel = "Shipping rate to Armed Forces Americas";
if (LocationSelected == 21) LocationLabel = "Shipping rate to Armed Forces Europe";
if (LocationSelected == 22) LocationLabel = "Shipping rate to Armed Forces Pacific";
if (LocationSelected == 23) LocationLabel = "Shipping rate to California";
if (LocationSelected == 24) LocationLabel = "Shipping rate to Colorado";
if (LocationSelected == 25) LocationLabel = "Shipping rate to Connecticut";
if (LocationSelected == 26) LocationLabel = "Shipping rate to Delaware";
if (LocationSelected == 27) LocationLabel = "Shipping rate to District of Columbia";
if (LocationSelected == 28) LocationLabel = "Shipping rate to Florida";
if (LocationSelected == 29) LocationLabel = "Shipping rate to Georgia";
if (LocationSelected == 30) LocationLabel = "Shipping rate to Guam";
if (LocationSelected == 31) LocationLabel = "Shipping rate to Hawaii";
if (LocationSelected == 32) LocationLabel = "Shipping rate to Idaho";
if (LocationSelected == 33) LocationLabel = "Shipping rate to Illinois";
if (LocationSelected == 34) LocationLabel = "Shipping rate to Indiana";
if (LocationSelected == 35) LocationLabel = "Shipping rate to Iowa";
if (LocationSelected == 36) LocationLabel = "Shipping rate to Kansas";
if (LocationSelected == 37) LocationLabel = "Shipping rate to Kentucky";
if (LocationSelected == 38) LocationLabel = "Shipping rate to Louisiana";
if (LocationSelected == 39) LocationLabel = "Shipping rate to Maine";
if (LocationSelected == 40) LocationLabel = "Shipping rate to Mariana Islands";
if (LocationSelected == 41) LocationLabel = "Shipping rate to Marshall Islands";
if (LocationSelected == 42) LocationLabel = "Shipping rate to Maryland";
if (LocationSelected == 43) LocationLabel = "Shipping rate to Massachusetts";
if (LocationSelected == 44) LocationLabel = "Shipping rate to Michigan";
if (LocationSelected == 45) LocationLabel = "Shipping rate to Micronesia";
if (LocationSelected == 46) LocationLabel = "Shipping rate to Minnesota";
if (LocationSelected == 47) LocationLabel = "Shipping rate to Mississippi";
if (LocationSelected == 48) LocationLabel = "Shipping rate to Missouri";
if (LocationSelected == 49) LocationLabel = "Shipping rate to Montana";
if (LocationSelected == 50) LocationLabel = "Shipping rate to Nebraska";
if (LocationSelected == 51) LocationLabel = "Shipping rate to Nevada";
if (LocationSelected == 52) LocationLabel = "Shipping rate to New Hampshire";
if (LocationSelected == 53) LocationLabel = "Shipping rate to New Jersey";
if (LocationSelected == 54) LocationLabel = "Shipping rate to New Mexico";
if (LocationSelected == 55) LocationLabel = "Shipping rate to New York";
if (LocationSelected == 56) LocationLabel = "Shipping rate to North Carolina";
if (LocationSelected == 57) LocationLabel = "Shipping rate to North Dakota";
if (LocationSelected == 58) LocationLabel = "Shipping rate to Ohio";
if (LocationSelected == 59) LocationLabel = "Shipping rate to Oklahoma";
if (LocationSelected == 60) LocationLabel = "Shipping rate to Oregon";
if (LocationSelected == 61) LocationLabel = "Shipping rate to Outlying Minor Islands";
if (LocationSelected == 62) LocationLabel = "Shipping rate to Palau";
if (LocationSelected == 63) LocationLabel = "Shipping rate to Pennsylvania";
if (LocationSelected == 64) LocationLabel = "Shipping rate to Puerto Rico";
if (LocationSelected == 65) LocationLabel = "Shipping rate to Rhode Island";
if (LocationSelected == 66) LocationLabel = "Shipping rate to Saipan";
if (LocationSelected == 67) LocationLabel = "Shipping rate to South Carolina";
if (LocationSelected == 68) LocationLabel = "Shipping rate to South Dakota";
if (LocationSelected == 69) LocationLabel = "Shipping rate to Tennessee";
if (LocationSelected == 70) LocationLabel = "Shipping rate to Texas";
if (LocationSelected == 71) LocationLabel = "Shipping rate to Tinian";
if (LocationSelected == 72) LocationLabel = "Shipping rate to Utah";
if (LocationSelected == 73) LocationLabel = "Shipping rate to Vermont";
if (LocationSelected == 74) LocationLabel = "Shipping rate to Virgin Islands (U.S.)";
if (LocationSelected == 75) LocationLabel = "Shipping rate to Virginia";
if (LocationSelected == 76) LocationLabel = "Shipping rate to Washington";
if (LocationSelected == 77) LocationLabel = "Shipping rate to West Virginia";
if (LocationSelected == 78) LocationLabel = "Shipping rate to Wisconsin";
if (LocationSelected == 79) LocationLabel = "Shipping rate to Wyoming";



////////////////////////////////////////////////////////////////////////////////////////////

if (fWeight == 0) fShipping = 0; 
else fShipping = ComputeShipping(LocationSelected, fWeight, fTotal); 

strShipping = moneyFormat(fShipping); 
strOutput += "<TR><TD CLASS=\"noptotal\" COLSPAN=5><B>" + LocationLabel + ":</B></TD>"; 
strOutput += "<TD CLASS=\"noptotal\" COLSPAN=1 ALIGN=RIGHT>" + MonetarySymbol + strShipping + "</TD>"; 
strOutput += "</TR>"; 
strOutput += "<TR><TD CLASS=\"noptotal\" COLSPAN=5 valign=top><B>Tax:</B></TD>";
strOutput += "<TD COLSPAN=5 background=\"common/totalline.gif\" class=\"checkout\" align=right>$0.00<br></TD></tr>";



strOutput += "<TR><TD CLASS=\"noptotal\" COLSPAN=5><B>"+strTOT+"</B></TD>";

strOutput += "<TD COLSPAN=5 CLASS=\"noptotal\"><B><font color=red>" + MonetarySymbol + moneyFormat((fTotal + fShipping + fTax)) + "</B></TD>";
strOutput += "</TR>";
strOutput += "<TR><TD>";




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

} 

strOutput += "</TABLE>";

//////////////////////////////////////////////end of total table/////////////////////////////////////////////

strOutput += "<table width=500 cellspacing=0 cellpadding=0 border=0><tr><td height=20 valign=top><span class=dot>.....................................................................................................................................................................................................................";
  strOutput += "</td></tr></table>";

/////////////////////////////////////////select shipping destination table///////////////////////////////////////




strOutput += "<TABLE border=0 cellspacing=0 cellpadding=2 align=left width=100%><TR>";
              

strOutput += "<TR><TD align=center valign=bottom width= 220 background=\"common/cont_shop.jpg\" height=66>";

strOutput += "<select class=form_input  name=\"jumpit\" onchange=\"document.location.href=this.value\">"; 
strOutput += "<option selected value=>Continue Shopping</option>";
strOutput += "<option value=\"\">--------------------------------------</option>";

strOutput += "<option value=\"roll_on_main.htm\">Roll-on Bracelets</option>";
strOutput += "<option value=\"Incense.htm\">Mandala Incense</option>";
strOutput += "<option value=\"Burners.htm\">Incense Burners</option>";
strOutput += "<option value=\"Holders.htm\">Incense Holders</option>";
strOutput += "<option value=\"Curtains.htm\">Curtains</option>";
strOutput += "<option value=\"Banners.htm\">Banners</option>";
strOutput += "<option value=\"Pashminas.htm\">Pashminas</option>";
strOutput += "</select>";





strOutput += "</TD>";
strOutput += "<TD align=right valign=bottom width=160>";
strOutput += "<A href=cartEmptyQUANTITY=0&NAME=0.ID_NUM=INSHIPPING=02546.html class=cartlinks onClick=\"SetCookie ('NumberOrdered', 0, null, '/');\">";
				 
strOutput += "<IMG src=store/clearcart.gif align=absmiddle width=38 height=42 border=0>Empty&nbsp;Cart</A></TD>";
strOutput += "<TD align=left valign=bottom width=160><SPAN class=headline><A href=javascript:location.reload() target=\_self class=cartlinks><IMG src=store/update.gif width=38 border=0 align=absmiddle class=cartlinks>Update Cart</A></SPAN></TD>";
strOutput += "<TD valign=bottom align=right><INPUT TYPE=IMAGE SRC=store/checkout.gif width=130 height=42 hspace=02 border=0/></TD>";
strOutput += "</TR>";
strOutput += " </TABLE>";

//////////////////////////////////////////////end continue table//////////////////////////////////////////////////

if ( HiddenFieldsToCheckout ) { 
strOutput += "<input type=hidden name=\""+OutputOrderSubtotal+"\" value=\""+ MonetarySymbol + strTotal + "\">"; 
strOutput += "<input type=hidden name=\""+OutputOrderShipping+"\" value=\""+ MonetarySymbol + strShipping + "\">"; 
strOutput += "<input type=hidden name=\""+OutputOrderTax+"\" value=\""+ MonetarySymbol + strTax + "\">"; 
strOutput += "<input type=hidden name=\""+OutputOrderTotal+"\" value=\""+ MonetarySymbol + moneyFormat((fTotal + fShipping + fTax)) + "\">"; 
} 
} 
g_TotalCost = (fTotal + fShipping + fTax); 

document.write(strOutput); 
document.close(); 
} 

//---------------------------------------------------------------------|| 
// FUNCTION: ComputeShipping || 
// PARAMETERS: || 
// RETURNS: || 
// PURPOSE: Compute shipping cost due to total weight || 
//---------------------------------------------------------------------|| 
function ComputeShipping(Zone, TotWeight, fTotal) { 
LocationValue = GetCookie("ZoneSelected"); 

if (LocationValue != Zone) { 
SetCookie("ZoneSelected", Zone, null, "/"); 
location.href=location.href;



}


if (LocationValue == 0 ) {
	

 
if (TotWeight <= 0) return 0.00; 
if ((TotWeight <= 0) && (TotWeight > 0)) return (0.00 + (0.00 * Math.ceil(parseFloat((TotWeight - 0) / 0))));





} 

//yukon ||
if (LocationValue == 1){
	 
 
if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));


if (TotWeight <= 0.2) return 11.20; 
if ((TotWeight <= 1000) && (TotWeight > 0.2)) return (11.20 + (0.0755 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 

}

//nunavut||
if (LocationValue == 2 ) {
	
if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));

if (TotWeight <= 1) return 12.62; 
if ((TotWeight <= 1000) && (TotWeight > 0.2)) return (12.62 + (0.0655 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
}

//Northwest Territories||

if (LocationValue == 3 ) {
	
if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));
	
if (TotWeight <= 1) return 12.62; 
if ((TotWeight <= 1000) && (TotWeight > 0.2)) return (12.62 + (0.0655 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
} 


if (LocationValue == 4 ) { 
if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));

if (TotWeight <= 1) return 11.36; 
if ((TotWeight <= 1000) && (TotWeight > 0.2)) return (11.36 + (0.0073 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
}


if (LocationValue == 5 ) { 

if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));

if (TotWeight <= 1) return 11.36; 
if ((TotWeight <= 1000) && (TotWeight > 0.2)) return (11.36 + (0.0065 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
}

if (LocationValue == 6 ) { 

if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));

if (TotWeight <= 0.2) return 13.56; 
if ((TotWeight <= 1000) && (TotWeight > 0.2)) return (13.56 + (0.01 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
}

if (LocationValue == 7 ) { 

if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));

if (TotWeight <= 1) return 9.56; 
if ((TotWeight <= 1000) && (TotWeight > 0.2)) return (9.56 + (0.039 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
}


//Montreal

if (LocationValue == 80 ) { 

if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));

if (TotWeight <= 0.2) return 7.33;
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (7.33 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (7.44 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (7.70 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (8.06 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (8.43 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (9.11 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (9.85 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (9.85 + (0.036 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 

}

}

if (LocationValue == 8 ) { 

if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));

if (TotWeight <= 0.2) return 8.31; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (8.31 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (8.68 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (9.11 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (9.48 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (9.90 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (10.71 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (11.45 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (11.45 + (0.036 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 

}

}

if (LocationValue == 9 ) {
if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));
	
if (TotWeight <= 0.2) return 8.47; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (8.47 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (8.47 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (8.47 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (8.82 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (9.21 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (9.96 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (10.65 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (10.65 + (0.034 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 

}

}

if (LocationValue == 10 ) {
if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));
	
	
if (TotWeight <= 0.2) return 9.62; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (9.62 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (10.25 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (10.88 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (11.33 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (11.79 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (12.71 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (13.62 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (13.62 + (0.045 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 

}

}

if (LocationValue == 11 ) {
	
if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));
	
if (TotWeight <= 0.2) return 11.84; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (11.84 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (12.48 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (13.17 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (13.86 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (14.54 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (15.86 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (17.23 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (17.23 + (0.065 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 

}

}

if (LocationValue == 12 ) { 
if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));

if (TotWeight <= 0.2) return 11.84; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (11.84 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (12.48 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (13.17 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (13.86 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (14.54 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (15.86 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (17.23 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (17.23 + (0.065 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 

}

}

if (LocationValue == 13 ) { 
if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));


if (TotWeight <= 0.2) return 12.71; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (12.71 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (13.23 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (13.86 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (14.54 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (15.23 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (16.66 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (18.03 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (18.03 + (0.065 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 

}

}

if (LocationValue == 15 ) {
if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));
	
if (TotWeight <= 0.2) return 14.61; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (14.61 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (15.30 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (16.48 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (17.66 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (18.73 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (20.87 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (22.95 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (22.37 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 

}

}

if (LocationValue == 16 ) { 
if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));

if (TotWeight <= 0.2) return 16.64; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (16.64 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (18.03 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (18.62 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (19.69 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (21.13 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (24.02 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (26.96 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (26.96 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 
}

}


if (LocationValue == 17 ) { 

if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));

if (TotWeight <= 0.2) return 16.64; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (16.64 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (18.03 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (18.62 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (19.69 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (21.13 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (24.02 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (26.96 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (26.96 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 
}

}


if (LocationValue == 18 ) { 
if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));

if (TotWeight <= 0.2) return 16.64; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (16.64 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (18.03 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (18.62 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (19.69 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (21.13 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (24.02 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (26.96 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (26.96 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 
}

}


if (LocationValue == 19 ) {
	if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));
	
if (TotWeight <= 0.2) return 14.61; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (14.61 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (15.30 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (16.48 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (17.66 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (18.73 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (20.87 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (22.95 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (22.37 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 

}

}

if (LocationValue == 20 ) { 

if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));

if (TotWeight <= 0.2) return 14.61; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (14.61 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (15.30 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (16.48 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (17.66 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (18.73 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (20.87 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (22.95 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (22.37 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 

}

}

if (LocationValue == 21 ) { 

if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));

if (TotWeight <= 0.2) return 13.64; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (13.64 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (14.45 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (15.19 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (15.73 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (16.53 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (18.24 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (19.96 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (19.96 + (0.085 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 
}

}

if (LocationValue == 22 ) { 

if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));

if (TotWeight <= 0.2) return 16.64; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (16.64 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (18.03 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (18.62 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (19.69 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (21.13 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (24.02 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (26.96 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (26.96 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 
}

}

if (LocationValue == 23 ) { 

if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));

if (TotWeight <= 0.2) return 16.64; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (16.64 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (18.03 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (18.62 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (19.69 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (21.13 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (24.02 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (26.96 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (26.96 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 
}

}

if (LocationValue == 24 ) {
	
if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));
	
	
if (TotWeight <= 0.2) return 16.64; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (16.64 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (18.03 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (18.62 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (19.69 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (21.13 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (24.02 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (26.96 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (26.96 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 
}

}

if (LocationValue == 25 ) { 

if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));

if (TotWeight <= 0.2) return 13.64; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (13.64 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (14.45 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (15.19 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (15.73 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (16.53 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (18.24 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (19.96 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (19.96 + (0.085 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 
}

} 

if (LocationValue == 26 ) {
	
	
if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));
	
if (TotWeight <= 0.2) return 13.64; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (13.64 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (14.45 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (15.19 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (15.73 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (16.53 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (18.24 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (19.96 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (19.96 + (0.085 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 
}

} 

if (LocationValue == 27 ) { 

if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));


if (TotWeight <= 0.2) return 13.64; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (13.64 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (14.45 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (15.19 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (15.73 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (16.53 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (18.24 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (19.96 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (19.96 + (0.085 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 
}

} 

if (LocationValue == 28 ) { 

if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));


if (TotWeight <= 0.2) return 14.61; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (14.61 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (15.30 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (16.48 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (17.66 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (18.73 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (20.87 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (22.95 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (22.37 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 

}

}

if (LocationValue == 29 ) {
	
if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));
	
	
if (TotWeight <= 0.2) return 14.61; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (14.61 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (15.30 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (16.48 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (17.66 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (18.73 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (20.87 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (22.95 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (22.37 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 

}

}

if (LocationValue == 30 ) { 

if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));


if (TotWeight <= 0.2) return 16.64; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (16.64 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (18.03 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (18.62 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (19.69 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (21.13 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (24.02 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (26.96 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (26.96 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 
}

}

if (LocationValue == 31 ) {
	
	if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));
	
if (TotWeight <= 0.2) return 16.64; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (16.64 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (18.03 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (18.62 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (19.69 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (21.13 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (24.02 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (26.96 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (26.96 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 
}

}

if (LocationValue == 32 ) { 

if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));

if (TotWeight <= 0.2) return 16.64; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (16.64 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (18.03 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (18.62 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (19.69 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (21.13 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (24.02 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (26.96 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (26.96 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 
}

}
if (LocationValue == 33 ) {
	
if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));
	
if (TotWeight <= 0.2) return 14.61; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (14.61 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (15.30 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (16.48 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (17.66 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (18.73 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (20.87 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (22.95 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (22.37 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 

}

}

if (LocationValue == 34 ) { 
if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));


if (TotWeight <= 0.2) return 14.61; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (14.61 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (15.30 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (16.48 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (17.66 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (18.73 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (20.87 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (22.95 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (22.37 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 

}

}

if (LocationValue == 35 ) { 

if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));

if (TotWeight <= 0.2) return 14.61; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (14.61 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (15.30 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (16.48 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (17.66 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (18.73 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (20.87 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (22.95 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (22.37 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 

}

}

if (LocationValue == 36 ) {
	
	if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));
	
if (TotWeight <= 0.2) return 14.61; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (14.61 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (15.30 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (16.48 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (17.66 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (18.73 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (20.87 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (22.95 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (22.37 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 

}

}

if (LocationValue == 37 ) {
	
if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));
	
	
if (TotWeight <= 0.2) return 14.61; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (14.61 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (15.30 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (16.48 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (17.66 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (18.73 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (20.87 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (22.95 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (22.37 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 

}

}

if (LocationValue == 38 ) {
	
if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));
	
if (TotWeight <= 0.2) return 14.61; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (14.61 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (15.30 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (16.48 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (17.66 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (18.73 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (20.87 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (22.95 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (22.37 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 

}

}

if (LocationValue == 39 ) {
	
if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));
	
	
if (TotWeight <= 0.2) return 13.64; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (13.64 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (14.45 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (15.19 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (15.73 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (16.53 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (18.24 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (19.96 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (19.96 + (0.085 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 
}

}

if (LocationValue == 40 ) { 

if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));

if (TotWeight <= 0.2) return 16.64; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (16.64 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (18.03 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (18.62 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (19.69 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (21.13 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (24.02 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (26.96 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (26.96 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 
}

}

if (LocationValue == 41 ) {
	
if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));
	
if (TotWeight <= 0.2) return 16.64; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (16.64 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (18.03 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (18.62 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (19.69 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (21.13 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (24.02 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (26.96 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (26.96 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 
}

}

if (LocationValue == 42 ) {
	
if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));
	
if (TotWeight <= 1) return 13.64; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (13.64 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (14.45 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (15.19 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (15.73 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (16.53 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (18.24 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (19.96 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (19.96 + (0.085 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 
}

} 

if (LocationValue == 43 ) {
	
if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));
	
if (TotWeight <= 0.2) return 13.64; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (13.64 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (14.45 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (15.19 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (15.73 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (16.53 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (18.24 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (19.96 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (19.96 + (0.085 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 
}

} 

if (LocationValue == 44 ) {
	
if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));
	
if (TotWeight <= 0.2) return 13.64; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (13.64 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (14.45 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (15.19 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (15.73 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (16.53 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (18.24 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (19.96 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (19.96 + (0.085 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 
}

} 

if (LocationValue == 45 ) { 

if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));

if (TotWeight <= 0.2) return 16.64; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (16.64 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (18.03 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (18.62 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (19.69 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (21.13 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (24.02 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (26.96 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (26.96 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 
}

}

if (LocationValue == 46 ) {
	
if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));
	
if (TotWeight <= 0.2) return 14.61; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (14.61 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (15.30 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (16.48 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (17.66 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (18.73 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (20.87 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (22.95 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (22.37 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 

}

}

if (LocationValue == 47 ) { 
if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));


if (TotWeight <= 0.2) return 14.61; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (14.61 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (15.30 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (16.48 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (17.66 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (18.73 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (20.87 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (22.95 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (22.37 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 

}

}

if (LocationValue == 48 ) {
if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));
	
	
if (TotWeight <= 0.2) return 14.61; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (14.61 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (15.30 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (16.48 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (17.66 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (18.73 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (20.87 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (22.95 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (22.37 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 

}

}


if (LocationValue == 49 ) { 

if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));

if (TotWeight <= 0.2) return 16.64; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (16.64 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (18.03 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (18.62 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (19.69 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (21.13 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (24.02 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (26.96 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (26.96 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 
}

} 
if (LocationValue == 50 ) {
	
	if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));
	
if (TotWeight <= 0.2) return 14.61; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (14.61 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (15.30 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (16.48 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (17.66 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (18.73 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (20.87 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (22.95 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (22.37 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 

}

}

if (LocationValue == 51 ) { 

if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));

if (TotWeight <= 0.2) return 16.64; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (16.64 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (18.03 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (18.62 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (19.69 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (21.13 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (24.02 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (26.96 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (26.96 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 
}

} 

if (LocationValue == 52 ) {
	
	if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));
	
if (TotWeight <= 0.2) return 14.61; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (14.61 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (15.30 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (16.48 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (17.66 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (18.73 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (20.87 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (22.95 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (22.37 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 

}

}

if (LocationValue == 53 ) { 

if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));

if (TotWeight <= 0.2) return 13.64; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (13.64 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (14.45 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (15.19 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (15.73 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (16.53 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (18.24 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (19.96 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (19.96 + (0.085 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 
}

} 

if (LocationValue == 54 ) {
	
	if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));
	
if (TotWeight <= 0.2) return 16.64; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (16.64 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (18.03 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (18.62 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (19.69 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (21.13 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (24.02 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (26.96 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (26.96 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 
}

} 

if (LocationValue == 55 ) {
	
	if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));
	
if (TotWeight <= 0.2) return 13.64; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (13.64 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (14.45 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (15.19 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (15.73 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (16.53 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (18.24 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (19.96 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (19.96 + (0.085 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 
}

}
if (LocationValue == 56 ) { 

if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));

if (TotWeight <= 0.2) return 14.61; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (14.61 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (15.30 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (16.48 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (17.66 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (18.73 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (20.87 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (22.95 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (22.37 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 

}

}

if (LocationValue == 57 ) { 

if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));

if (TotWeight <= 0.2) return 14.61; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (14.61 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (15.30 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (16.48 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (17.66 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (18.73 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (20.87 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (22.95 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (22.37 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 

}

}

if (LocationValue == 58 ) { 

if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));


if (TotWeight <= 0.2) return 13.64; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (13.64 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (14.45 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (15.19 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (15.73 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (16.53 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (18.24 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (19.96 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (19.96 + (0.085 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 
}

}

if (LocationValue == 59 ) { 

if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));


if (TotWeight <= 0.2) return 14.61; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (14.61 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (15.30 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (16.48 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (17.66 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (18.73 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (20.87 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (22.95 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (22.37 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 

}

}  


if (LocationValue == 60 ) {
	if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));
	
if (TotWeight <= 0.2) return 16.64; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (16.64 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (18.03 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (18.62 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (19.69 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (21.13 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (24.02 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (26.96 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (26.96 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 
}

}
if (LocationValue == 61 ) { 

if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));

if (TotWeight <= 0.2) return 16.64; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (16.64 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (18.03 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (18.62 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (19.69 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (21.13 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (24.02 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (26.96 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (26.96 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 
}

}

if (LocationValue == 62 ) {
	
	if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));
	
if (TotWeight <= 0.2) return 16.64; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (16.64 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (18.03 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (18.62 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (19.69 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (21.13 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (24.02 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (26.96 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (26.96 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 
}

}

if (LocationValue == 63 ) {
	
if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));
	
if (TotWeight <= 0.2) return 13.64; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (13.64 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (14.45 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (15.19 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (15.73 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (16.53 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (18.24 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (19.96 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (19.96 + (0.085 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 
}

}

if (LocationValue == 64 ) {
	
if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));
	
	
if (TotWeight <= 0.2) return 16.64; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (16.64 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (18.03 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (18.62 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (19.69 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (21.13 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (24.02 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (26.96 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (26.96 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 
}

} 

if (LocationValue == 65 ) {
	
if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));
	
if (TotWeight <= 0.2) return 14.61; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (14.61 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (15.30 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (16.48 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (17.66 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (18.73 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (20.87 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (22.95 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (22.37 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 

}

}  

if (LocationValue == 66 ) {
	
if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));
	
if (TotWeight <= 0.2) return 16.64; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (16.64 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (18.03 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (18.62 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (19.69 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (21.13 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (24.02 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (26.96 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (26.96 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 
}

} 

if (LocationValue == 67 ) { 

if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));


if (TotWeight <= 0.2) return 14.61; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (14.61 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (15.30 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (16.48 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (17.66 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (18.73 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (20.87 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (22.95 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (22.37 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 

}

} 

if (LocationValue == 68 ) { 

if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));


if (TotWeight <= 0.2) return 14.61; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (14.61 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (15.30 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (16.48 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (17.66 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (18.73 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (20.87 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (22.95 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (22.37 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 

}

}

if (LocationValue == 69 ) {
	
if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));
	
	
if (TotWeight <= 0.2) return 14.61; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (14.61 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (15.30 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (16.48 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (17.66 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (18.73 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (20.87 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (22.95 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (22.37 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 

}

}

if (LocationValue == 70 ) {
	
if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));
	
	
if (TotWeight <= 0.2) return 16.64; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (16.64 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (18.03 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (18.62 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (19.69 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (21.13 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (24.02 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (26.96 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (26.96 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 
}

}

if (LocationValue == 71 ) {
	
	
if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));
	
	
if (TotWeight <= 0.2) return 16.64; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (16.64 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (18.03 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (18.62 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (19.69 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (21.13 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (24.02 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (26.96 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (26.96 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 
}

}

if (LocationValue == 72 ) {
	
if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));
	
if (TotWeight <= 0.2) return 16.64; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (16.64 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (18.03 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (18.62 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (19.69 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (21.13 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (24.02 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (26.96 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (26.96 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 
}

}

if (LocationValue == 73 ) {
	
if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));
	
if (TotWeight <= 0.2) return 13.64; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (13.64 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (14.45 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (15.19 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (15.73 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (16.53 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (18.24 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (19.96 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (19.96 + (0.085 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 
}

}

if (LocationValue == 74 ) {
	
	
if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));
	
if (TotWeight <= 0.2) return 16.64; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (16.64 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (18.03 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (18.62 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (19.69 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (21.13 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (24.02 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (26.96 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (26.96 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 
}

}

if (LocationValue == 75 ) { 

if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));


if (TotWeight <= 0.2) return 14.61; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (14.61 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (15.30 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (16.48 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (17.66 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (18.73 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (20.87 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (22.95 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (22.37 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 

}

}

if (LocationValue == 76 ) {
	
	
if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));
	
	
if (TotWeight <= 0.2) return 16.64; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (16.64 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (18.03 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (18.62 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (19.69 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (21.13 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (24.02 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (26.96 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (26.96 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 
}

}

if (LocationValue == 77 ) {
	
if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));
	
if (TotWeight <= 0.2) return 13.64; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (13.64 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (14.45 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (15.19 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (15.73 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (16.53 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (18.24 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (19.96 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (19.96 + (0.085 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 

}
}


if (LocationValue == 78 ) {
	
if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));
	
	
if (TotWeight <= 0.2) return 14.61; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (14.61 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (15.30 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (16.48 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (17.66 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (18.73 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (20.87 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (22.95 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (22.37 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 

}

}

if (LocationValue == 79 ) {
	
if (TotWeight <= 0.03) return 2.55;
if ((TotWeight <= 0.2) && (TotWeight > 0.03)) return (0.00 + (0.000 * Math.ceil(parseFloat((TotWeight - 0) / 1))));
	
	
if (TotWeight <= 0.2) return 16.64; 
if ((TotWeight <= 10) && (TotWeight > 0.2)) return (16.64 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 16) && (TotWeight > 10)) return (18.03 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 21) && (TotWeight > 16)) return (18.62 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 26) && (TotWeight > 21)) return (19.69 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 31) && (TotWeight > 26)) return (21.13 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 41) && (TotWeight > 31)) return (24.02 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1)))); 
if ((TotWeight <= 51) && (TotWeight > 41)) return (26.96 + (0.000 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if ((TotWeight <= 100) && (TotWeight > 51)) return (26.96 + (0.125 * Math.ceil(parseFloat((TotWeight - 1) / 1))));
if (TotWeight > 100) { 
alert(MaxWeightPrompt); 
 return 0.00; 
}

}



if (LocationValue == 0 ) return 0.00; 
} 


//---------------------------------------------------------------------||
// FUNCTION:    SmallCart                                              ||
// PARAMETERS:  Null                                                   ||
// RETURNS:     Cart totals written to page                            ||
// PURPOSE:     Gives cart summary on page                             ||
//---------------------------------------------------------------------||
function SmallCart( ) {
   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       = "";   //Total cost formatted as money
   var strTax         = "";   //Total tax formatted as money
   var strShipping    = "";   //Total shipping formatted as money
   var strOutput      = "";   //String to be written to page
   var bDisplay       = true; //Whether to write string to the page (here for programmers)

   iNumberOrdered = GetCookie("NumberOrdered");
   if ( iNumberOrdered == null )
      iNumberOrdered = 0;

   if ( iNumberOrdered == 0 ) {
     strOutput +="<TABLE BORDER=0 cellpadding=0 cellspacing=0><TR>";
      strOutput +="<TD width=43 class=cartlinks><IMG src=store/btn_cart.gif width=29 height=32 border=0 align=absmiddle>";
	  strOutput +="<TD width=190 class=text1><b>Your Shopping cart is empty</b></TD></TR></TABLE>";
	}
	
	
   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 );                 // 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

      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);
	  
	 strOutput ="<TABLE BORDER=0 cellpadding=0 cellspacing=0><TR>";
      strOutput +="<TD width=130 rowspan=3 class=cartlinks><A href=managecart.html class=cartlinks><IMG src=store/btn_cart.gif width=29 height=32 border=0 align=absmiddle>View Cart</a><TD class=text1><b>"+iNumberOrdered+" item in Cart</b></TR><tr></TD>";   strOutput +=" <TR><TD class=text1 width=200><b>Subtotal: "+MonetarySymbol+strTotal+"</TD></TR></TABLE>";
	  }


	if ( iNumberOrdered > 1 ) {
      strOutput ="<TABLE BORDER=0 cellpadding=0 cellspacing=0><TR>";
      strOutput +="<TD width=130 rowspan=3 class=cartlinks><A href=managecart.html class=cartlinks><IMG src=store/btn_cart.gif width=29 height=32 border=0 align=absmiddle>View Cart</a><TD class=text1><b>"+iNumberOrdered+" items in Cart</b></TR><tr></TD>";   strOutput +=" <TR><TD class=text1 width=200><b>Subtotal: "+MonetarySymbol+strTotal+"</TD></TR></TABLE>";
	}


   document.write(strOutput);
   document.close();
}

//---------------------------------------------------------------------||
// 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("theForm."+OutputOrderTax)) ) { 
alert( TaxPrompt ); 
return false; 
} 
} 

if ( isNaN (g_TotalCost) ) { 
alert( NoQtyPrompt ); 
return false; 
} 

if ( MinimumOrder >= 0.01 ) { 
if ( g_TotalCost < MinimumOrder ) { 
alert( MinimumOrderPrompt ); 
return false; 
} 
} 
if (LocationSelected == 0 ) {
	
alert( LocationPrompt ); 
return false; 
} 


return true; 
} 


//---------------------------------------------------------------------|| 
// 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 fWeight = 0; //Weight 
var fShipping = 0; //Shipping amount
var strSLabel = "Weight";
var strTotal = ""; //Total cost formatted as money 
var strTax = ""; //Total tax formatted as money
var strWTOT = "Total Weight"; //Total weight 
var strShipping = ""; //Total shipping formatted as money 
var strOutput = ""; //String to be written to page 
var bDisplay = true; //Whether to write string to the page (here for programmers) 
var strPP = ""; //Payment Processor Description Field 
var fprodttl       = 0;    //Total product cost = QTY * PRICE 



iNumberOrdered = GetCookie("NumberOrdered"); 
if ( iNumberOrdered == null ) 
iNumberOrdered = 0;

LocationSelected = GetCookie("ZoneSelected"); 
if (LocationSelected == null) LocationSelected = 79; // Code to defeat NANAN if value is null || 

if ( TaxByRegion ) { 
QueryString_Parse(); 
fTax = parseFloat( QueryString( OutputOrderTax ) ); 
strTax = moneyFormat(fTax); 
} 

if ( bDisplay )

///////////////////////////////////////////top table start//////////////////////////////////////////////////

strOutput = "<TABLE CLASS=\"nopcart\" width=650 cellspacing=\"0\" cellpadding=\"5\" border=0><TR height=20>" + 
"<TD CLASS=\"nopheader\" width=\"30\" ALIGN=CENTER><B>"+strILabel+"</B></TD>" + 
"<TD CLASS=\"nopheader\" width=\"28\" ALIGN=LEFT><B>"+strQLabel+"</B></TD>" + 
"<TD CLASS=\"nopheader\" width=\"385\" ALIGN=LEFT><B>"+strDLabel+"</B></TD>" + 
"<TD CLASS=\"headerright\" width=\"73\" ALIGN=CENTER><B>"+strPLabel+"</B></TD>" + 
"<TD CLASS=\"headerright\" width=\"60\" ALIGN=CENTER><B>"+strTLabel+"</B></TD>" + 
"</TR>"; 

strDLabel



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 ); // 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 ); // Weight 
fields[5] = database.substring( Token4+1, database.length ); //Additional Information 


fprodttl = (parseInt(fields[1]) * parseFloat(fields[2]) ); 
fTotal += (parseInt(fields[1]) * parseFloat(fields[2]) ); 
fWeight += (parseInt(fields[1]) * parseFloat(fields[4]) ); 
fWeight = Math.round(fWeight * 100)/100; 
if ( !TaxByRegion ) var strProductId = fields[0]; 
strProductId=strProductId.charAt(0); 
if( strProductId!= 'z' ) { 
fTax += (parseInt(fields[1]) * parseFloat(fields[2]) ) * TaxRate; 
}  
strTotal = moneyFormat(fTotal); 
if ( !TaxByRegion ) strTax = moneyFormat(fTax); 





if ( bDisplay ) { 
strOutput += "<TR><TD CLASS=\"item2\" ALIGN=LEFT>" + fields[0] + "</TD>"; 
strOutput += "<TD CLASS=\"item\" ALIGN=RIGHT>" + fields[1] + "</TD>"; 
if ( fields[5] == "" ) 
strOutput += "<TD CLASS=\"item2\" ALIGN=left>" + fields[3] + "</TD>"; 
else 
strOutput += "<TD CLASS=\"item2\" ALIGN=left>" + fields[3] + " "+ fields[5] + "</TD>"; 


strOutput += "<TD CLASS=\"nopentry\" ALIGN=RIGHT>"+ MonetarySymbol + moneyFormat(fields[2]) + "</TD>"; 

if ( DisplayShippingColumn ) { 
if ( parseFloat(fields[4]) > 0 ) 
strOutput += "<TD CLASS=\"nopentry\" ALIGN=RIGHT>"+ fields[4] + " lbs" + "/ea</TD>"; 
else 
strOutput += "<TD CLASS=\"nopentry\" ALIGN=RIGHT>N/A</TD>"; 
} 

strOutput += "<TD CLASS=\"nopentry\">"+ MonetarySymbol + moneyFormat(fprodttl) + "</TD>" ;
         strOutput += "</TR>"


}


if ( AppendItemNumToOutput ) { 
strFooter = i; 
} else { 
strFooter = ""; 
} 
if ( PaymentProcessor == 'pp' ) { 
//Process hidden values for PayPal. 
strOutput += "<input type=hidden name=\"item_number_"+ strFooter + "\" value=\"" + fields[0] + "\">"; 
strOutput += "<input type=hidden name=\"quantity_" + strFooter + "\" value=\"" + fields[1] + "\">"; 
strOutput += "<input type=hidden name=\"amount_" + strFooter + "\" value=\"" + fields[2] + "\">"; 
strOutput += "<input type=hidden name=\"item_name_" + strFooter + "\" value=\"" + fields[3] + "\">"; 
if (i == iNumberOrdered) { 
strOutput += "<input type=hidden name=\"shipping_" + strFooter + "\" value=\"" + strShipping + "\">"; 
} else { 
strOutput += "<input type=hidden name=\"shipping_" + strFooter + "\" value=\"" + strShipping + "\">"; 
} 
strOutput += "<input type=hidden name=\"on0_" + strFooter + "\" value=\"" + fields[5] + "\">"; 
strOutput += "<input type=hidden name=\"tax_1\" value=\"" + fTax + "\">"; 


} else if ( PaymentProcessor != '' ) { 
//Process description field for payment processors instead of hidden values. 
//Format Description of product as: 
// ID, Name, Qty X 
strPP += fields[0] + ", " + fields[3]; 
if ( fields[5] != "" ) 
strPP += " - " + fields[5]; 
strPP += ", Q= " + fields[1] + "\n"; 
}
}

if ( PaymentProcessor != '' ) { 
//Process description field for payment processors instead of hidden values. 
//Format Description of product as: 
// ID, Name, Qty X 
strPP += fields[0]; 
if ( fields[5] != "" ) 
strPP += " - " + fields[5]; 
strPP += ", Qty. " + fields[1] + ", " + MonetarySymbol + fields[2] + "<BR>\n"; 
} else { 
strOutput += "<input type=hidden name=\"" + OutputItemId + strFooter + "\" value=\"" + fields[0] + "\">"; 
strOutput += "<input type=hidden name=\"" + OutputItemQuantity + strFooter + "\" value=\"" + fields[1] + "\">"; 
strOutput += "<input type=hidden name=\"" + OutputItemPrice + strFooter + "\" value=\"" + fields[2] + "\">"; 
strOutput += "<input type=hidden name=\"" + OutputItemName + strFooter + "\" value=\"" + fields[3] + "\">"; 
strOutput += "<input type=hidden name=\"" + OutputItemWeight + strFooter + "\" value=\"" + fields[4] + "\">"; 
strOutput += "<input type=hidden name=\"" + OutputItemAddtlInfo + strFooter + "\" value=\"" + fields[5] + "\">"; 
} 



if ( bDisplay ) { 

 strOutput += "</table>";
 
 
 /////////////////////////////////////////////total table starts/////////////////////////////////////////
 
 
 strOutput += "<table width=650 border=0>";
 strOutput += "<TD width=180 rowspan=5 align=center>";
	  strOutput += "<A href=\"managecart.html\" class=\"cartlinks\"><IMG src=store/update.gif width=\"38\" height=\"42\" border=\"0\" align=\"absmiddle\">Change my Order</A>";
	  strOutput += "</TD>";
strOutput += "<TR><TD CLASS=\"noptotal\" COLSPAN=3 width=400 align=right><B>"+strSUB+"</B></TD>"; 
strOutput += "<TD CLASS=\"noptotal\" COLSPAN=2 ALIGN=RIGHT><B>" + MonetarySymbol + strTotal + "</B></TD>"; 
strOutput += "</TR>"; 

if ( DisplayShippingRow ) { 
LocationSelected = GetCookie("ZoneSelected"); 
if (LocationSelected == null) LocationSelected = 0; //Needed if checkout cart is empty


if (LocationSelected == 0) LocationLabel = '<font color="#3300FF">Please Select Shipping Zone</font>';
if (LocationSelected == 1) LocationLabel = "Shipping rate to Yukon Territories:"; 
if (LocationSelected == 2) LocationLabel = "Shipping rate to Nunawut:"; 
if (LocationSelected == 3) LocationLabel = "Shipping rate to Northwest Territories:"; 
if (LocationSelected == 4) LocationLabel = "Shipping rate to New Brunswick:"; 
if (LocationSelected == 5) LocationLabel = "Shipping rate to Nova Scotia:"; 
if (LocationSelected == 6) LocationLabel = "Shipping rate to Newfoundland and Labrador:"; 
if (LocationSelected == 7) LocationLabel = "Shipping rate toPrince Edward Island:"; 
if (LocationSelected == 8) LocationLabel = "Shipping rate to Quebec:";
if (LocationSelected == 9) LocationLabel = "Shipping rate to Ontario:";
if (LocationSelected == 10) LocationLabel = "Shipping rate to Manitoba:";
if (LocationSelected == 11) LocationLabel = "Shipping rate to Saskatchewan:";
if (LocationSelected == 12) LocationLabel = "Shipping rate to Alberta:";
if (LocationSelected == 13) LocationLabel = "Shipping rate to British Columbia";
if (LocationSelected == 15) LocationLabel = "Shipping rate to Alabama";
if (LocationSelected == 16) LocationLabel = "Shipping rate to Alaska";
if (LocationSelected == 17) LocationLabel = "Shipping rate to American Samoa";
if (LocationSelected == 18) LocationLabel = "Shipping rate to Arizona";
if (LocationSelected == 19) LocationLabel = "Shipping rate to Arkansas";
if (LocationSelected == 20) LocationLabel = "Shipping rate to Armed Forces Americas";
if (LocationSelected == 21) LocationLabel = "Shipping rate to Armed Forces Europe";
if (LocationSelected == 22) LocationLabel = "Shipping rate to Armed Forces Pacific";
if (LocationSelected == 23) LocationLabel = "Shipping rate to California";
if (LocationSelected == 24) LocationLabel = "Shipping rate to Colorado";
if (LocationSelected == 25) LocationLabel = "Shipping rate to Connecticut";
if (LocationSelected == 26) LocationLabel = "Shipping rate to Delaware";
if (LocationSelected == 27) LocationLabel ="Shipping rate to District of Columbia";
if (LocationSelected == 28) LocationLabel ="Shipping rate to Florida";
if (LocationSelected == 29) LocationLabel ="Shipping rate to Georgia";
if (LocationSelected == 30) LocationLabel ="Shipping rate to Guam";
if (LocationSelected == 31) LocationLabel ="Shipping rate to Hawaii";
if (LocationSelected == 32) LocationLabel ="Shipping rate to Idaho";
if (LocationSelected == 33) LocationLabel ="Shipping rate to Illinois";
if (LocationSelected == 34) LocationLabel ="Shipping rate to Indiana";
if (LocationSelected == 35) LocationLabel ="Shipping rate to Iowa";
if (LocationSelected == 36) LocationLabel ="Shipping rate to Kansas";
if (LocationSelected == 37) LocationLabel ="Shipping rate to Kentucky";
if (LocationSelected == 38) LocationLabel ="Shipping rate to Louisiana";
if (LocationSelected == 39) LocationLabel ="Shipping rate to Maine";
if (LocationSelected == 40) LocationLabel ="Shipping rate to Mariana Islands";
if (LocationSelected == 41) LocationLabel ="Shipping rate to Marshall Islands";
if (LocationSelected == 42) LocationLabel ="Shipping rate to Maryland";
if (LocationSelected == 43) LocationLabel ="Shipping rate to Massachusetts";
if (LocationSelected == 44) LocationLabel ="Shipping rate to Michigan";
if (LocationSelected == 45) LocationLabel ="Shipping rate to Micronesia";
if (LocationSelected == 46) LocationLabel ="Shipping rate to Minnesota";
if (LocationSelected == 47) LocationLabel ="Shipping rate to Mississippi";
if (LocationSelected == 48) LocationLabel ="Shipping rate to Missouri";
if (LocationSelected == 49) LocationLabel ="Shipping rate to Montana";
if (LocationSelected == 50) LocationLabel ="Shipping rate to Nebraska";
if (LocationSelected == 51) LocationLabel ="Shipping rate to Nevada";
if (LocationSelected == 52) LocationLabel ="Shipping rate to New Hampshire";
if (LocationSelected == 53) LocationLabel ="Shipping rate to New Jersey";
if (LocationSelected == 54) LocationLabel ="Shipping rate to New Mexico";
if (LocationSelected == 55) LocationLabel ="Shipping rate to New York";
if (LocationSelected == 56) LocationLabel ="Shipping rate to North Carolina";
if (LocationSelected == 57) LocationLabel ="Shipping rate to North Dakota";
if (LocationSelected == 58) LocationLabel ="Shipping rate to Ohio";
if (LocationSelected == 59) LocationLabel ="Shipping rate to Oklahoma";
if (LocationSelected == 60) LocationLabel ="Shipping rate to Oregon";
if (LocationSelected == 61) LocationLabel ="Shipping rate to Outlying Minor Islands";
if (LocationSelected == 62) LocationLabel ="Shipping rate to Palau";
if (LocationSelected == 63) LocationLabel ="Shipping rate to Pennsylvania";
if (LocationSelected == 64) LocationLabel ="Shipping rate to Puerto Rico";
if (LocationSelected == 65) LocationLabel ="Shipping rate to Rhode Island";
if (LocationSelected == 66) LocationLabel ="Shipping rate to Saipan";
if (LocationSelected == 67) LocationLabel ="Shipping rate to South Carolina";
if (LocationSelected == 68) LocationLabel ="Shipping rate to South Dakota";
if (LocationSelected == 69) LocationLabel ="Shipping rate to Tennessee";
if (LocationSelected == 70) LocationLabel ="Shipping rate to Texas";
if (LocationSelected == 71) LocationLabel ="Shipping rate to >Tinian";
if (LocationSelected == 72) LocationLabel ="Shipping rate to Utah";
if (LocationSelected == 73) LocationLabel ="Shipping rate to Vermont";
if (LocationSelected == 74) LocationLabel ="Shipping rate to Virgin Islands (U.S.)";
if (LocationSelected == 75) LocationLabel ="Shipping rate to Virginia";
if (LocationSelected == 76) LocationLabel ="Shipping rate to Washington";
if (LocationSelected == 77) LocationLabel ="Shipping rate to West Virginia";
if (LocationSelected == 78) LocationLabel ="Shipping rate to Wisconsin";
if (LocationSelected == 79) LocationLabel ="Shipping rate to Wyoming";
if (LocationSelected == 80) LocationLabel = "Shipping rate to Metro Montreal";


fShipping = ComputeShipping(LocationSelected, fWeight, fTotal); 
strShipping = moneyFormat(fShipping); 

strOutput += "<TR><TD CLASS=\"noptotal\" COLSPAN=3><B>"+ LocationLabel + "</B></TD>"; 
strOutput += "<TD CLASS=\"noptotal\" COLSPAN=2 ALIGN=RIGHT>" + MonetarySymbol + strShipping + "</B></TD>"; 
strOutput += "</TR>"; 
} 

if ( DisplayTaxRow || TaxByRegion ) {
         strOutput += "<TR><TD CLASS=\"noptotal\" COLSPAN=3><B>"+strTAX+"</B></TD>";
         strOutput += "<TD CLASS=\"noptotal\" COLSPAN=2 ALIGN=RIGHT>" + MonetarySymbol + strTax + "</TD>";
         strOutput += "</TR>";
      } 

strOutput += "<TR><TD CLASS=\"noptotal\" COLSPAN=3><B>"+strTOT+"</B></TD>"; 
strOutput += "<TD CLASS=\"noptotal\" COLSPAN=2 ALIGN=RIGHT><FONT COLOR=red><B>" + MonetarySymbol + moneyFormat((fTotal + fShipping + fTax)) + "</B></TD>"; 
strOutput += "</TR>"; 

strOutput += "</TABLE>";

 if ( PaymentProcessor == 'pp' ) { 
//Process hidden values for PayPal. 
strOutput += "<input type=hidden name=\"item_number_"+ strFooter + "\" value=\"" + fields[0] + "\">"; 
strOutput += "<input type=hidden name=\"quantity_" + strFooter + "\" value=\"" + fields[1] + "\">"; 
strOutput += "<input type=hidden name=\"amount_" + strFooter + "\" value=\"" + fields[2] + "\">"; 
strOutput += "<input type=hidden name=\"item_name_" + strFooter + "\" value=\"" + fields[3] + "\">"; 
if (i == iNumberOrdered) { 
strOutput += "<input type=hidden name=\"shipping_" + strFooter + "\" value=\"" + strShipping + "\">"; 
} else { 
strOutput += "<input type=hidden name=\"shipping_" + strFooter + "\" value=\"" + strShipping + "\">"; 
} 
strOutput += "<input type=hidden name=\"on0_" + strFooter + "\" value=\"" + fields[5] + "\">"; 
} 
if ( PaymentProcessor == 'an') { 
//Process this for Authorize.net 
strOutput += "<input type=hidden name=\""+OutputItemName+"\" value=\""+ strPP + "\">";
strOutput += "<input type=hidden name=\""+OutputOrderSubtotal+"\" value=\""+ MonetarySymbol + strTotal + "\">"; 
strOutput += "<input type=hidden name=\""+OutputOrderShipping+"\" value=\""+ MonetarySymbol + strShipping + "\">"; 
strOutput += "<input type=hidden name=\""+OutputOrderTax+"\" value=\""+ MonetarySymbol + strTax + "\">"; 
strOutput += "<input type=hidden name=\""+OutputOrderTotal+"\" value=\""+ MonetarySymbol + moneyFormat((fTotal + fShipping + fTax)) + "\">";  
} else if ( PaymentProcessor == 'wp') { 
//Process this for WorldPay 
strOutput += "<input type=hidden name=\"desc\" value=\""+ strPP + "\">"; 
strOutput += "<input type=hidden name=\"amount\" value=\""+ moneyFormat((fTotal + fShipping + fTax)) + "\">"; 
} else if ( PaymentProcessor == 'lp') { 
//Process this for LinkPoint 
strOutput += "<input type=hidden name=\"mode\" value=\"fullpay\">"; 
strOutput += "<input type=hidden name=\"chargetotal\" value=\""+ moneyFormat((fTotal + fShipping + fTax)) + "\">"; 
strOutput += "<input type=hidden name=\"tax\" value=\""+ MonetarySymbol + strTax + "\">"; 
strOutput += "<input type=hidden name=\"subtotal\" value=\""+ MonetarySymbol + strTotal + "\">"; 
strOutput += "<input type=hidden name=\"shipping\" value=\""+ MonetarySymbol + strShipping + "\">"; 
strOutput += "<input type=hidden name=\"desc\" value=\""+ strPP + "\">"; 
} else {
strOutput += "<input type=hidden name=\""+OutputItemName+"\" value=\""+ strPP + "\">"; 
strOutput += "<input type=hidden name=\""+OutputOrderSubtotal+"\" value=\""+ MonetarySymbol + strTotal + "\">"; 
strOutput += "<input type=hidden name=\""+OutputOrderShipping+"\" value=\""+ MonetarySymbol + strShipping + "\">"; 
strOutput += "<input type=hidden name=\""+OutputOrderTax+"\" value=\""+ MonetarySymbol + strTax + "\">"; 
strOutput += "<input type=hidden name=\""+OutputOrderTotal+"\" value=\""+ MonetarySymbol + moneyFormat((fTotal + fShipping + fTax)) + "\">"; 
} 
} 

document.write(strOutput); 
document.close(); 
} 

//=====================================================================|| 
// END NOP Design SmartPost Shopping Cart || 
//=====================================================================||

function AddOneOfManyToCart(formToUpdate) 
{ 
   selectedObj = formToUpdate.PRODUCTSELECTOR[formToUpdate.PRODUCTSELECTOR.selectedIndex]; 

   nameVal = selectedObj.getAttribute("name"); 
   if (nameVal == "NONE") { 
      alert('Please select a product'); 
      return false; 
   } 

   formToUpdate.NAME.value = nameVal; 

   costVal = selectedObj.getAttribute("cost"); 
   formToUpdate.PRICE.value = costVal; 

   id_numVal = selectedObj.getAttribute("id_num"); 
   formToUpdate.ID_NUM.value = id_numVal;
   
   weightVal = selectedObj.getAttribute("weight"); 
   formToUpdate.WEIGHT.value = weightVal;


   switch( formToUpdate.PRODUCTSELECTOR[formToUpdate.PRODUCTSELECTOR.selectedIndex].value ) { 
   } 
   AddToCart(formToUpdate); 
}

function AddOneCoffeeToCart(formToUpdate) 
{ 
   selectedObj = formToUpdate.PRODUCTSELECTOR[formToUpdate.PRODUCTSELECTOR.selectedIndex]; 

   nameVal = selectedObj.getAttribute("name"); 
   if (nameVal == "NONE") { 
      alert('Please select a product'); 
      return false; 
   } 

   formToUpdate.NAME.value = nameVal; 

   costVal = selectedObj.getAttribute("cost"); 
   formToUpdate.PRICE.value = costVal; 

   id_numVal = selectedObj.getAttribute("id_num"); 
   formToUpdate.ID_NUM.value = id_numVal;
   
   weightVal = selectedObj.getAttribute("weight"); 
   formToUpdate.WEIGHT.value = weightVal;


   switch( formToUpdate.PRODUCTSELECTOR[formToUpdate.PRODUCTSELECTOR.selectedIndex].value ) { 
   } 
   AddToOtherCart(formToUpdate); 
}

function AddOneQuantityToCart(formToUpdate) 
{ 
   selectedObj = formToUpdate.AMOUNT[formToUpdate.AMOUNT.selectedIndex]; 

   nameVal = selectedObj.getAttribute("name"); 
   if (nameVal == "NONE") { 
      alert('Please select a product'); 
      return false; 
   } 

   formToUpdate.NAME.value = nameVal; 

   costVal = selectedObj.getAttribute("cost"); 
   formToUpdate.PRICE.value = costVal; 

   id_numVal = selectedObj.getAttribute("id_num"); 
   formToUpdate.ID_NUM.value = id_numVal;
   
   weightVal = selectedObj.getAttribute("weight"); 
   formToUpdate.WEIGHT.value = weightVal;

   quantityVal = selectedObj.getAttribute("quantity"); 
   formToUpdate.QUANTITY.value = quantityVal;


   switch( formToUpdate.AMOUNT[formToUpdate.AMOUNT.selectedIndex].value ) { 
   } 
   AddToCart(formToUpdate); 
}

