
//** Code to preload the mouseover images.
if (document.images)
{

//   Btn_AddToCartOn = new Image(98, 25); Btn_AddToCartOn.src = "/eComm/Images/Button_AddToCart_On.gif";
//   Btn_AddToCartOff = new Image(98, 25); Btn_AddToCartOff.src = "/eComm/Images/Button_AddToCart.gif";

}

function ChangeImage(imagename, newimage) {

   if (document.images) {
      eval("document." + imagename + ".src = " + newimage + ".src");
   }
   return true;
}

function Page_Load() {
   return true;
}

// Convert field value to uppercase
function ConvertToUpperCase(inputField) {
   inputField.value = inputField.value.toUpperCase();
}

// Format a number amout to a currency string.
function formatCurrency(strValue)
{
   strValue = strValue.toString().replace(/\$|\,/g,'');
   dblValue = parseFloat(strValue);

   blnSign = (dblValue == (dblValue = Math.abs(dblValue)));
   dblValue = Math.floor(dblValue*100+0.50000000001);
   intCents = dblValue%100;
   strCents = intCents.toString();
   dblValue = Math.floor(dblValue/100).toString();
   if(intCents<10)
      strCents = "0" + strCents;
   for (var i = 0; i < Math.floor((dblValue.length-(1+i))/3); i++)
      dblValue = dblValue.substring(0,dblValue.length-(4*i+3))+','+
      dblValue.substring(dblValue.length-(4*i+3));
   return (((blnSign)?'':'-') + '$' + dblValue + '.' + strCents);
}

