
 function getObj(f) {
        comma = ",";
        this.oForm = f;
        this.oElm = f.elements;
        this.oUppht = f.upperheight;
        this.oBq = f.lqty;
        this.oColor = f.color;
        this.oQty = f.qty;
        this.oTotal = f.totl;
        this.di = document.images;
        return this, oForm.reset(), data(), tot_cook();
    };


    function data() {
        var siz = oUppht.selectedIndex;
        siz = siz == -1 ? 0 : siz;
        var t = 0, bt = 0;
        var hex = "#000000";
        for (var e = 1; e < 64; e++) {
            t = parseFloat(oElm[e].value);
            if (isNaN(t)) {
                t = 0;
            };
            bt += t;
            oElm[e].style.backgroundColor = oElm[e].value > 0 ? "#dafb95" : "#ffffff";
        };
        oBq.value = bt;
        analysis();
    };


    function analysis() {
        var t = 0, tot = 0, bt = 0;
        bt = parseFloat(oBq.value);
        t = parseFloat(oForm.price.value);
        oTotal.value = fixP(t * bt);
    };


    function clearSets() {
        for (var e = 1; e < 64; e++) {
            oElm[e].value = 0;
            oElm[e].style.backgroundColor = "#ffffff";
        };
        oBq.value = 0;
        oTotal.value = "0.00";
    };


    function pack() {
        var n = [];
        var c_max = 0;
        var i = 0;
        var list = "";
        var total = 0;
        for (var i = 1; i < 64; i++) {
            c = oElm[i].value;
            if (c > 0) {
                if (c > c_max) {
                    c_max = c;
                };
                if (n[c] == null) {
                    n[c] = c + " each of (";
                };
                if (oElm[i].name.length > 1) {
                    n[c] += " ," + oElm[i].name + ",";
                } else {
                    n[c] += oElm[i].name;
                };
                total += Math.floor(c);
            };
        };
        c = c_max + 1;
        while (c > 0) {
            if (n[c] != null) {
                list += n[c] + ")  <br>";
            };
            c--;
        };
        list = list.replace(/,\)/g, ")");
        list = list.replace(/\(\s\,/g, "(");
        list = list.replace(/\,\s\,/g, ",");
        if (total > 0) {
            list = " total letters =" + total + " : <br>" + list;
        };
        return list;
    };


    function addTo() {
        var qVal = oForm.qty.value;
        var rc = parseFloat(oTotal.value) == 0 && oForm.qty1.value == 0 ? "Nothing selected for adding!" : "";
        if (rc) {
            return alert(rc);
        };
        if (isNaN(qVal) ||
            qVal.indexOf(".") != -1 || qVal < 1 || qVal.charAt(0) == 0) {
            alert("The quantity entered is incorrect : " + qVal + " - whole numbers only     ");
            return oForm.qty.value = 1;
        };
        var newPhrase = pack();
        var panelSize = oUppht.selectedIndex == 0 ? 4 : oUppht.selectedIndex == 1 ? 6 : oUppht.selectedIndex == 2 ? 9 : 11;
        if (parseFloat(oTotal.value) > 0) {
            if (newPhrase == "") {
                newPhrase = "None";
            };
            var t = qVal * parseFloat(oTotal.value);
            var cookStr = "Product Type   ~ Zip-Lite Changeable" + "|Material      ~ Acrylic" + "|Letters       ~ " + newPhrase + "|Font          ~ " + "Modern" + "|Letter Height ~ " + oUppht[oUppht.selectedIndex].text + "|Panel Height  ~ " + panelSize + "|Color         ~ " + "black with white copy" + "|Qty           ~ " + parseFloat(qVal) + "|Price         ~ " + fixP(t);
            cookStr = cookStr.replace(/\s+\~\s/g, "~");
            cookStr = cookStr.replace(/\s+\|\s/g, "|");
            cookStr = cookStr.replace(/["]/g, "#Y");
            cookStr = cookStr.replace(/[']/g, "#Z");
            if (t != 0) {
                toCook("item_", cookStr);
            };
            cookStr = "";
        };
        var accStr = "Product Type~Changeable Accessories|";
        if (oForm.qty1.value > 0) {
            var idx = oForm.track.selectedIndex;
            var size = idx == 0 ? 4 : idx == 1 ? 6 : idx == 2 ? 8 : 10;
            var type = "acrylic";
            var tLen = oForm.qty1.value * size;
            cookStr = accStr + "Mutual Rail~" + tLen + " feet of " + type + " mutual rail in " + size + " Foot Lengths";
            cookStr += "|Qty~" + oForm.qty1.value;
            cookStr += "|Price~" + oForm.tTot1.value;
            toCook("item_", cookStr);
            cookStr = "";
        };
        location.href = "s_viewCart.htm";
    };



