'; FormGoogle.insertAdjacentHTML("afterBegin",sHTML + sScript); return true; } //************************************************************************* function EmptyCart() { for (i = 0; i < cart.length; i++) { eraseCookie(cartKey + cart[i][0]); } eraseCookie(cartShipping); SpecialChangedClear(); }; //************************************************************************* function RemoveItem(item) { eraseCookie(cartKey + cart[item - 1][0]); Reload(); } //************************************************************************* function Reload() { location.reload(true); }; //************************************************************************* function Back() { history.back(); }; //************************************************************************* function setCookie(key, value) { var cookieDate = new Date(2010,11,10,19,30,30); document.cookie=key + "=" + escape(value) + ";expires=" + cookieDate.toGMTString() + "; path=/"; }; //************************************************************************* function eraseCookie(key) { var cookieDate = new Date(2000,11,10,19,30,30); document.cookie= key + "=; expires=" + cookieDate.toGMTString() + "; path=/"; }; //************************************************************************* function getCookie(key) { var cookie = document.cookie; var first = cookie.indexOf(key + "="); // Does cookie exist if ( first >= 0) { var str = cookie.substring(first,cookie.length); var last = str.indexOf(";"); // if last cookie if (last < 0) last = str.length; // get cookie value str = str.substring(0,last).split("="); return unescape(str[1]); } else { return null; } }; //************************************************************************* function removeUnderScores(item) { var newItem = item; while(true) { var index = newItem.indexOf("_"); if (index < 0) { return newItem; } newItem = newItem.substring(0,index) + " " + newItem.substring(index + 1, newItem.length); } }; //************************************************************************* function SpecialChangedDescription(value) { // Make sure it is not all spaces if (value.length == 0) { setCookie(cartSpecialDescription, value); cartSpecialDescriptionValue = getCookie(cartSpecialDescription); return; } for (i = 0; i < value.length; i++) { if (value.substring(i,i+1) != ' ') { setCookie(cartSpecialDescription, value); cartSpecialDescriptionValue = getCookie(cartSpecialDescription); return; } } setCookie(cartSpecialDescription, ""); cartSpecialDescriptionValue = getCookie(cartSpecialDescription); } //************************************************************************* function SpecialChangedQuantity(value) { if (isANumber(value) == false) { alert(" Error - " + value + " is not a whole number. Please enter a whole number."); return; } if (parseInt(value) < 1) { alert("Error - Please enter a whole number greater then 0"); return; } setCookie(cartSpecialQuantity, value); cartSpecialQuantityValue = getCookie(cartSpecialQuantity); } //************************************************************************* function SpecialChangedUnitPrice(value) { var x = DecimalPlaces(value,2); if (x == null) { alert(" Error - " + value + " is not a number. Please enter a valid price."); return; } setCookie(cartSpecialUnitPrice, x); cartSpecialUnitPriceValue = getCookie(cartSpecialUnitPrice); } //************************************************************************* function SpecialChangedClear() { eraseCookie(cartSpecialDescription); cartSpecialDescriptionValue = ""; eraseCookie(cartSpecialQuantity); cartSpecialQuantityValue = 0; eraseCookie(cartSpecialUnitPrice); cartSpecialUnitPriceValue = "0.00" Reload(); } //************************************************************************* function BuildCart() { var sHTML; var cookie = document.cookie; //sHTML= "
"; sHTML= "
| Item | "; sHTML+= "Quantity | "; sHTML+= "Unit Price | "; sHTML+= "Total | "; sHTML+= ""; sHTML+= " |
| " + removeUnderScores(itemType) + " | "; // Quantity sHTML+= ""; sHTML+= " | "; // Unit Price sHTML+= "$" + DecimalPlaces(itemUnitPrice,2) + " | "; // Total var thisCost = itemQuantity * itemUnitPrice; sHTML+= "$" + DecimalPlaces(thisCost,2) + " | "; // Remove Button sHTML+= ""; sHTML+= ""; sHTML+= " |
| ";
// Description
cartSpecialDescriptionValue = getCookie(cartSpecialDescription);
if (cartSpecialDescriptionValue == null)cartSpecialDescriptionValue = "";
sHTML+= " *Special Items/Charges - Please Describe "; sHTML+= ""; sHTML+= " | ";
// Quantity
cartSpecialQuantityValue = getCookie(cartSpecialQuantity);
if (cartSpecialQuantityValue == null)cartSpecialQuantityValue = "0";
cartSpecialQuantityValue =parseInt(cartSpecialQuantityValue);
sHTML+= " "; sHTML+= " | ";
// Unit Cost
cartSpecialUnitPriceValue = getCookie(cartSpecialUnitPrice);
if (cartSpecialUnitPriceValue == null)cartSpecialUnitPriceValue = "0.00";
cartSpecialUnitPriceValue = parseFloat(cartSpecialUnitPriceValue);
sHTML+= " "; sHTML+= " | ";
// Total
var SpecialTotal = cartSpecialQuantityValue * cartSpecialUnitPriceValue;
sHTML+= " $" + DecimalPlaces(SpecialTotal,2) + " | ";
sHTML+= " "; // Clear Button sHTML+= ""; sHTML+= " | ";
sHTML+= "
| **Shipping & Handling "; //sHTML+= ""; if (cartShippingIndex == 0) { sHTML+= "US & Canada "; sHTML+= "Other "; sHTML+= "None | ";
}
if (cartShippingIndex == 1)
{
sHTML+= "US & Canada ";
sHTML+= "Other ";
sHTML+= "None";
}
if (cartShippingIndex == 2)
{
sHTML+= "US & Canada ";
sHTML+= "Other ";
sHTML+= "None";
}
sHTML+= ""; sHTML+= " | "; sHTML+= " | ";
sHTML+= " "; sHTML+= "$" + cartShippingValues[cartShippingIndex] + " | ";
sHTML+= ""; sHTML+= " |
| Totals | "; sHTML+= "" + totalItems + " | "; sHTML+= ""; sHTML+= " | $" + DecimalPlaces(totalCost,2) + " | "; sHTML+= ""; sHTML+= " | "; sHTML+= "
To Check Out Click the Google Button Below

* Special Items/Charges are those arranged with the Factory (i.e. repairs, etc.) or Special Shipping charges.
Visits