﻿function UpdateTotal(lblid, countobjid, priceobjid) {
    var lblTotal = document.getElementById(lblid);
    var countobj = document.getElementById(countobjid);
    var priceobj = document.getElementById(priceobjid);
    var price = priceobj.options[priceobj.selectedIndex].value;
    var selection = countobj.options[countobj.selectedIndex].value;
    if (selection.length == 0) {
        selection = 0;
    }
    if (price.length == 0) {
        price = 0;
    }
    var amount = parseInt(selection) * parseFloat(price);
    lblTotal.innerHTML = "$" + parseFloat(amount);
}


