function total() {
var total = 0;
total = Number(total);
for(i=0; i < document.forms[0].elements.length; i++){
	  var price = document.forms[0].elements[i].name;
   	   if (price.indexOf("price")!=-1){
	      
		var dollarvalue = document.forms[0].elements[i].value;
		var newdollarvalue = dollarvalue.substring(1, dollarvalue.length);
		newdollarvalue = Number(newdollarvalue);
		total = total + newdollarvalue;
		}
	   
	}
total = "$" + total + ".00";
document.products.total.value =  total;
}
