

function DoMath(){
	if (window.document.calcprice.prodoption) {
		var baseprice_selected = new Number(document.calcprice.baseprice.options[document.calcprice.baseprice.selectedIndex].value);
		document.calcprice.prodoption.value = "$"+cent(baseprice_selected);
		if (document.calcprice.baseprice.selectedIndex == 0) {
			document.calcprice.download_selected.value = "N";
		} else {
			document.calcprice.download_selected.value = "Y";
		}
		fullprice = baseprice_selected;
	} else {
		fullprice = new Number(document.calcprice.baseprice.value);		
	}
	
	if (window.document.calcprice.attribute1_selected) {
		var traitpricechange = document.calcprice.attribute1_selected.options[document.calcprice.attribute1_selected.selectedIndex].value.split("|");
		var traitpricechange1 = new Number(traitpricechange[1]);
		document.calcprice.traitpricechange1.value = "$"+cent(traitpricechange1);
		fullprice += traitpricechange1;
	}
		
	if (window.document.calcprice.attribute2_selected) {
		var traitpricechange = document.calcprice.attribute2_selected.options[document.calcprice.attribute2_selected.selectedIndex].value.split("|");
		var traitpricechange2 = new Number(traitpricechange[1]);
		document.calcprice.traitpricechange2.value = "$"+cent(traitpricechange2);
		fullprice += traitpricechange2;
	}

	if (window.document.calcprice.attribute3_selected) {
 		var traitpricechange = document.calcprice.attribute3_selected.options[document.calcprice.attribute3_selected.selectedIndex].value.split("|");
		var traitpricechange3 = new Number(traitpricechange[1]);
		document.calcprice.traitpricechange3.value = "$"+cent(traitpricechange3);
		fullprice += traitpricechange3;
	}

	if (window.document.calcprice.attribute4_selected) {
 		var traitpricechange = document.calcprice.attribute4_selected.options[document.calcprice.attribute4_selected.selectedIndex].value.split("|");
		var traitpricechange4 = new Number(traitpricechange[1]);
		document.calcprice.traitpricechange4.value = "$"+cent(traitpricechange4);
		fullprice += traitpricechange4;
	}

	document.calcprice.fullprice.value = "$"+cent(fullprice);
}
function cent(amount) {
    amount -= 0;
    return (amount == Math.floor(amount)) ? amount + '.00' : (  (amount*10 == Math.floor(amount*10)) ? amount + '0' : amount);
}

