
<!--
// To customise your product order form do a search and replace on each product name.
// For example, do a search for each occurence of the word "product_1" and replace
// them with your product name (such as "pair_of_socks"). When the invoice step occurs,
// all underscores (the _ character) get replaced with spaces, so the above product would 
// appear on the invoice presented to the customer as "pair of socks". Replace all occurences 
// of "product_number" (where number is a digit) with meaningful product names.
// Any alphanumeric character can be used, but do not use the hyphen "-" character.
// You must also replace the visible product descriptions without underscores such as "Product 1".

// When your account is activated, change the ACTION from test_payment.pl to make_payment.pl

function toDollarsAndCents(n) {
  var s = "" + Math.round(n * 100) / 100
  var i = s.indexOf('.')
  if (i < 0) return s + ".00"
  var t = s.substring(0, i + 1) + s.substring(i + 1, i + 3)
  if (i + 2 == s.length) t += "0"
  return t
}

function FormatFields()
{

document.jamboree_shirt_form.Jeep_Jamboree_Shirt.value = document.jamboree_shirt_form.Jeep_Jamboree_Shirt_qty.value + "," + document.jamboree_shirt_form.Jeep_Jamboree_Shirt_value.value;


document.jamboree_shirt_form.Jeep_Jamboree_Shirt_subtotal.value = toDollarsAndCents(document.jamboree_shirt_form.Jeep_Jamboree_Shirt_qty.value * document.jamboree_shirt_form.Jeep_Jamboree_Shirt_value.value);

document.jamboree_shirt_form.OrderTotal.value = 0;

document.jamboree_shirt_form.OrderTotal.value = toDollarsAndCents(parseFloat(document.jamboree_shirt_form.OrderTotal.value)
			 + parseFloat(document.jamboree_shirt_form.Jeep_Jamboree_Shirt_subtotal.value));

}

// for any pop-ups centered
function popup(url) 
{
 var width  = 680;
 var height = 620;
 var left   = (screen.width  - width)/2;
 var top    = (screen.height - height)/2;
 var params = 'width='+width+', height='+height;
 params += ', top='+top+', left='+left;
 params += ', directories=no';
 params += ', location=no';
 params += ', menubar=no';
 params += ', resizable=no';
 params += ', scrollbars=no';
 params += ', status=no';
 params += ', toolbar=no';
 newwin=window.open(url,'windowname5', params);
 if (window.focus) {newwin.focus()}
 return false;
}
// -->



