function AddToCart(form, id)
{
	if ( form.amount == null )
      amount  = "1";
   else
      amount  = form.amount.value;
var postvar = Object.toQueryString({'amount' : amount, 'id' : id});
var aj = new Ajax.Request(
  site + '/cart/add/', {
   method:'post',
   postBody: postvar,
   onComplete: showMessage
   }
  );

}

function showMessage(oReq)
{
	alert(oReq.responseText);
}

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