function getPrice() {
   var totalprice=0;
   var chkboxes = document.getElementsByTagName("input");
   for (var i=0;i<chkboxes.length;i++) {
      if (chkboxes[i].type=="checkbox") {
        if (chkboxes[i].checked) {
          if (chkboxes[i].getAttribute("price")!=null) {
            totalprice+=parseFloat(chkboxes[i].getAttribute("price"));
          }
        }
      }
   }
   return(formatCurrency(totalprice));
}
// Format a value as currency.
function formatCurrency(num) {
  num = num.toString().replace(/\$|\,/g,'');
  if(isNaN(num))
     num = "0";
  sign = (num == (num = Math.abs(num)));
  num = Math.floor(num*100+0.50000000001);
  cents = num%100;
  num = Math.floor(num/100).toString();
  if(cents<10)
      cents = "0" + cents;
  for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)
      num = num.substring(0,num.length-(4*i+3)) + ',' + num.substring(num.length-(4*i+3));
  return (((sign)?'':'-') + '$' + num + '.' + cents);
}

function toggle(){
     var list = document.forms[0].r_payment;
     if(list.options[list.selectedIndex].value == "credit"){
          document.getElementById("c_card").style.display = "block";
          document.getElementById("check").style.display = "none";
          }else{
     if(list.options[list.selectedIndex].value == "check"){
          document.getElementById("c_card").style.display = "none";
          document.getElementById("check").style.display = "block";
          }
     }
}

function winOpen(url) {
        
window.open(url, "large", "scrollbars,height=650,width=800")
        
}
function winOpen2(url) {
        
window.open(url, "large", "scrollbars,height=550,width=600")
        
}
