cooArr = new Array;
    typedArr = new Array;

    function getObj(f) {
        this.oForm = f;
        this.oUppht = 0;
        this.oFont = "";
        this.oFonIndex = 0;
        this.oUpPrice = "0.00";
        this.oLoPrice = "0.00";
        this.oFract = 0;
        this.oDepth = 0;
        this.oMount = 0;
        this.oStud = f.stud;
        this.oTempl = 0;
        this.oColor = "";
        this.oPhrase = "";
        this.oPgTotal = "0.00";
        this.oQty = f.qty;
        this.oPattern = "0.00";
        this.oTotal = f.pgTotal;
        this.oMatte = f.matteColor;
        this.di = document.images;
        return this, resetForm(), initmb(), doFont(), doSize(1), doSwatch(0, 0), prep(), tot_cook(), doBgCols();
    };


    function data() {
        var ucpr;
        var siz = oUppht;
        siz = siz == -1 ? 0 : siz;
        var dep = oDepth;
        var daColor = oColor.substr(0, 4);
        var z = oFonIndex < 37 ? 0 : 1;
        if (siz < dArr[z].length - 1) {
            if (oFract > 0) {
                siz = siz + 1;
            };
        } else {
            oFract = 0;
        };
        this.dStr = dArr[z][siz];
        ucpr = dStr[dep + 1];
        ucpr = oFonIndex > 73 && oFonIndex < 87 ? ucpr * 110 / 100 : oFonIndex > 89 ? ucpr * 125 / 100 : ucpr;
        if (daColor != "Choo") {
            if (daColor == "1444" || daColor == "1144") {
                ucpr = ucpr * 200 / 100;
            };
        };
        ucpr = oMatte.checked && oColor.substr(0, 1) != "m" ? ucpr * 115 / 100 : ucpr;
        if (oMount == 2) {
            ucpr = ucpr * 125 / 100;
        }else if(oMount>3){
			ucpr = ucpr * 140 / 100;
		};
        oUpPrice = fixP(ucpr);
        var fons = Fltr.split("/");
        var myfon = oFont.replace(/\s/g, "");
        var daFon = "";
        var z = false;
        var fon;
        for (var j = 0; j < 20; j++) {
            fon = fons[j].split("~");
            daFon = fon[0].replace(/\s/g, "");
            if (daFon == myfon) {
                z = true;
            };
        };
        oLoPrice = z == true ? "N/A" : fixP(ucpr * 90 / 100);
    };


  function analysis() {        
	oPgTotal  = '0.00';
 	var inPut      = oPhrase;
	var outPut     = '';
	var pStart       = 0;  if (oPhrase.selectionStart) {pStart=oPhrase.selectionStart;};
	var pEnd         = 0;  if (oPhrase.selectionEnd  ) {pEnd  =oPhrase.selectionEnd;};
 	var pLen       = oPhrase.length;

 	for(var i=0; i< pLen; i++) { var x = inPut.charAt(i);
		filtr(x);
 		if (rtn==false){
			outPut +=
 			x.match(/[A-Z]/)? updatePrice(x, 'upper_case') :
			x.match(/[0-9]/)? updatePrice(x, 'nums') :
 			x.match(/[\-\.,~']/)?  updatePrice(x, 'sm_punc') :
			x.match(/[\/&\!@#$%\(\)?<>\+\*\\]/)?  updatePrice(x, 'lg_punc') :
			x.match(/[;:="]/)?  updatePrice(x, 'colo_chars') :
 			x.match(/[a-z]/)? updatePrice(x, 'lower_case') : " ";
 		}else{
			outPut += x.match(/[a-z]/)? updatePrice(x.toUpperCase(), 'upper_case') : "";
		};
	};
	oPhrase = outPut;
	if (oPhrase.selectionStart)
	{
		oPhrase.selectionStart=pStart;
		oPhrase.selectionEnd=pEnd  ;
	};
};

function updatePrice(x, kind) {    

 	var subT =oPgTotal-0;
 	var upcP =oUpPrice-0;
 	var locP =oLoPrice-0;


 	oPgTotal =
 		(kind =='upper_case')? fixP(subT +upcP) :
		(kind =='nums')?  fixP(subT +upcP):
		(kind =='sm_punc')? fixP(subT +(upcP-0)/3) :
		(kind =='lg_punc')? fixP(subT +(upcP-0)) :
		(kind =='colo_chars')? fixP(subT +((upcP-0)/3)*2) :
		(kind =='lower_case' && locP == 0)?
		(x=x.toUpperCase(),fixP(subT +upcP)) : fixP(subT + locP);
	return x;        //to oPhrase.value
 };


    function filtr(x) {
        rtn = false;
        if (Fltr.length > 0) {
            var fon = oFont;
            var eArr = new Array;
            eArr = Fltr.split("/");
            var eaLen = eArr.length;
            for (var i = 0; i < eaLen; i++) {
                fList = eArr[i].split("~");
                if (fList[0] == fon) {
                    if (parseFloat(fList[1]) == 0) {
                        rtn = x.match(/[0-9\/&\-\:;.,']/) ? true : false;
                    } else if (fList[1] == 1) {
                        rtn = x.match(/[\/&]/) ? true : false;
                    } else if (fList[1] == 2) {
                        rtn = x.match(/[\/]/) ? true : false;
                    } else if (fList[1] == 3) {
                        rtn = x.match(/[0-9\/]/) ? true : false;
                    } else if (fList[1] == 4) {
                        rtn = x.match(/[\/\-\:;.]/) ? true : false;
                    } else if (fList[1] == 5) {
                        rtn = x.match(/-/) ? true : false;
                    } else if (fList[1] == 6) {
                        rtn = x.match(/[\/&\-\:;.,']/) ? true : false;
                    } else if (fList[1] == 7) {
                        rtn = x.match(/[0-9]/) ? true : false;
                    } else if (fList[1] == 8) {
                        rtn = x.match(/[a-z0-9]/) ? true : false;
                    } else if (fList[1] == 9) {
                        rtn = x.match(/[a-z0-9\/&\-\:;.,']/) ? true : false;
                    } else if (fList[1] == 10) {
                        rtn = x.match(/[a-z]/) ? true : false;
                    };
                    return rtn;
                };
            };
        };
    };


    function prep() {
        var myGt = 0, sLen = 0, daHeight = 0, daLen = 0, addon = 0, ptn = 0;
        var Qty = parseFloat(oQty.value);
        var pt = "";
        var mnt = 0;
        oPhrase = "";
        oPattern = "0.00";
        var fons = Fltr.replace(/\s/g, "");
        for (var i = 1; i < 5; i++) {
            var pObj = "line" + i, sObj = "upperheight" + i,fObj = "font" + i, dObj = "depth" + i, cObj = "color" + i, mObj = "mount" + i, tObj = "template" + i, frObj = "fraction" + i;
            if (oForm[pObj].value.replace(/\s/g, "").length > 0) {
                oForm.align.disabled = i > 1 ? false : true;
                if (i > 1 && i < 5) g_id('L' + i).style.display = "";
                if (i > 1 && i < 5) g_id("mnts" + i).style.display = "";
                if (i > 0 && i < 4) g_id("I" + i).style.display = "";
                
			    var myfon = oForm[fObj].value.toLowerCase().replace(/\s/g, "");
				var patt = new RegExp(myfon);
			    if(patt.test(fons) == true){
                    oPhrase = oForm[pObj].value.toUpperCase();
                } else {
                    oPhrase = oForm[pObj].value;
                };
                oFont = oForm[fObj][oForm[fObj].selectedIndex].value;
                oFonIndex = oForm[fObj].selectedIndex;
                oDepth = oForm[dObj].selectedIndex;
                oUppht = oForm[sObj].selectedIndex;
                oFract = oForm[frObj].selectedIndex;
                oColor = oForm[cObj][oForm[cObj].selectedIndex].text;
                oMount = oForm[mObj].selectedIndex;
                oTempl = oForm[tObj].selectedIndex;
                data();
                analysis();
                oForm[pObj].value = oPhrase;
                sLen += oForm[pObj].value.replace(/\s/g, "").length;
                g_id('LD' + i).innerHTML = oForm[dObj][oForm[dObj].selectedIndex].text;
                g_id('UC' + i).innerHTML = oUpPrice;
                g_id('LC' + i).innerHTML = oLoPrice != "N/A" ? oLoPrice : "N/A";
                g_id('LT' + i).innerHTML = oPgTotal;
                if (oLoPrice != "N/A" && typedArr[i] != null) {
                    oForm[pObj].value = typedArr[i];
                };
                pt = oForm[tObj][oForm[tObj].selectedIndex].text.substr(0, 2);
                if (pt == "St" || pt == "Po") {
                    daHeight = oForm[sObj][oForm[sObj].selectedIndex].value;
                    daLen = oForm[pObj].value.replace(/\s/g, "").length;
                    addon = 2.25;
                    ptn += addon * daLen;
                    g_id("PP"+i).innerHTML = "$" + fixP(addon * daLen);
                    oPattern = fixP(addon * daLen);
                } else {
                    g_id("PP"+i).innerHTML = "0.00";
                    oPattern = "0.00";
                };
                g_id('TP'+i).innerHTML = "$" + fixP(parseFloat(oPgTotal) + parseFloat(oPattern));
                myGt += parseFloat(oPgTotal);
                oForm[frObj].disabled = oForm[sObj].selectedIndex == 29 ? (oForm[frObj].selectedIndex = 0, true) : false;
            } else {
                if (i < 4) {
                    oForm["line" + (i + 1)].value = "";
                    g_id("I" + i).style.display = "none";
				};
                if (i > 1 && i < 5) g_id('L' + i).style.display = "none";
                if (i > 1 && i < 5) g_id("mnts" + i).style.display = "none";
                typedArr[i] = null;
            };
        };
        g_id('ptn').innerHTML= oPattern =  fixP(ptn * Qty);
        g_id("bl").innerHTML = "$" + fixP(myGt + ptn);
        g_id('tLtrs').innerHTML = sLen * Qty;
        g_id('tfl').innerHTML = oPgTotal = fixP(myGt * Qty);
        g_id('pgTotal').innerHTML = fixP(parseFloat(oPgTotal) + parseFloat(oPattern));
    };


    function doAbility(lObj, x) {
        var fObj = "font" + x;
        var sObj = "upperheight" + x;
        var cObj = "color" + x;
        var dObj = "depth" + x;
        var frObj = "fraction" + x;
        var fObj = "font" + x;
        if (lObj.value.replace(/\s/g, "").length == 0) {
            if (x > 1) {
                for (i = x; i < 5; i++) {
                    oForm[fObj].disabled = true;
                    oForm[sObj].disabled = true;
                    oForm[cObj].disabled = true;
                    oForm[dObj].disabled = true;
                    oForm[frObj].disabled = true;
                };
            };
        } else {
            oForm[fObj].disabled = false;
            oForm[sObj].disabled = false;
            oForm[cObj].disabled = false;
            oForm[dObj].disabled = false;
            oForm[frObj].disabled = false;
        };
    };

    strokeList = new Array;

    function doFont() {
        var fArr = new Array(F);
        fArr = F.split("/");
        var faLen = fArr.length;
        for (var i = 0; i < faLen; i++) {
            var fFont = fArr[i].split("~");
            oForm.font1.options[i] = new Option(fFont[0], fFont[1]);
            oForm.font2.options[i] = new Option(fFont[0], fFont[1]);
            oForm.font3.options[i] = new Option(fFont[0], fFont[1]);
            oForm.font4.options[i] = new Option(fFont[0], fFont[1]);
            strokeList[i] = fFont[2];
        };
        oFont = oForm.font1[oForm.font1.selectedIndex].text;
        oForm.font1.selectedIndex = 0;
        oForm.font2.selectedIndex = 0;
        oForm.font3.selectedIndex = 0;
        oForm.font4.selectedIndex = 0;
        if (oUppht == -1) {
            oUppht = 0;
        };
        var daLen = 16;
        for (k = 0; k < daLen; k++) {
            oForm.upperheight1.options[k] = new Option(dArr[0][k][0] + "\"", dArr[0][k][0]);
            oForm.upperheight2.options[k] = new Option(dArr[0][k][0] + "\"", dArr[0][k][0]);
            oForm.upperheight3.options[k] = new Option(dArr[0][k][0] + "\"", dArr[0][k][0]);
            oForm.upperheight4.options[k] = new Option(dArr[0][k][0] + "\"", dArr[0][k][0]);
        };
        oForm.upperheight1.selectedIndex = 0;
        oForm.upperheight2.selectedIndex = 0;
        oForm.upperheight3.selectedIndex = 0;
        oForm.upperheight4.selectedIndex = 0;
        oUppht = oForm.upperheight1.selectedIndex;
    };


    function doSize(x) {
        if (oUppht == -1) {
            oUppht = 0;
        };
        var fObj = "font" + x;
        hObj = "upperheight" + x;
        dObj = "depth" + x;
        var hOld = oForm[hObj].selectedIndex;
        for (j = oForm[hObj].options.length - 1; j > 0; j--) {
            oForm[hObj].options[j] = null;
        };
        var daLen = dArr[0].length;
        for (k = 0; k < daLen; k++) {
            oForm[hObj].options[k] = new Option(dArr[0][k][0] + "\"", dArr[0][k][0]);
        };
        oForm[hObj].selectedIndex = hOld <= oForm[hObj].length ? hOld : 0;
    };


    function checkSelect(idx, obj) {
        if (idx > 3 && idx < 37 ||
            idx > 39 && idx < 71 || idx > 73 && idx < 87 || idx > 89) {
            doDepth(obj.name.substr(4, 1), idx);
            prep();
            if (oForm.autoupdate.checked) {
                oForm.update.click();
            };
        } else {
            obj.selectedIndex = 0;
            return false;
        };
    };


    function checkColorSelect(idx, obj) {
        if (idx > 3 && idx < 8 || idx > 10) {
            oMatte.disabled = idx > 10 ? false : (oMatte.checked = false, true);
            prep();
            if (oForm.autoupdate.checked) {
                oForm.update.click();
            };
        } else {
            obj.selectedIndex = 0;
            return false;
        };
    };


    function doDepth(x, idx) {
        var dOld = oDepth;
        dObj = "depth" + x;
        hObj = "upperheight" + x;
        var height = oForm[hObj][oForm[hObj].selectedIndex].value;
        var stroke = strokeList[idx] * height;
        var maxDepth = stroke * 2;
        for (var j = oForm[dObj].options.length - 1; j > 0; j--) {
            oForm[dObj].options[j] = null;
        };
        var daLen = tArr[0].length;
        var k = 0;
        while (k < daLen) {
            if (tArr[0][k][1] >= maxDepth) {
                break;
            };
            if (height == 4 && k == 2) {
                break;
            };
            if (height == 5 && k == 3) {
                break;
            };
            if (height > 5 && height < 9 && k == 4) {
                break;
            };
            if (height > 8 && height < 13 && k == 7) {
                break;
            };
            oForm[dObj].options[k] = new Option(tArr[0][k][0] + "\"", tArr[0][k][1]);
            k++;
        };
        oForm[dObj].selectedIndex = dOld < daLen ? dOld : 0;
    };


    function doAllDepths() {
        dObj = "depth";
        hObj = "upperheight";
        var dOld;
        for (var i = 1; i < 5; i++) {
            var z = oForm[hObj + i].selectedIndex == 0 ? 0 : 1;
            var daLen = tArr[z].length;
            dOld = oForm[dObj + i].selectedIndex;
            for (var j = oForm[dObj + i].options.length - 1; j > 0; j--) {
                oForm[dObj + i].options[j] = null;
            };
            for (var k = 0; k < daLen; k++) {
                oForm[dObj + i].options[k] = new Option(tArr[z][k][0] + "\"", tArr[z][k][1]);
            };
            oForm[dObj + i].selectedIndex = dOld < daLen ? dOld : 0;
        };
    };


    function addTo() {
        prep();
        var qVal = oForm.qty.value;
        var rc = (oColor.substr(0, 1) == "C" ? "Please select a color\n\n" : "") + (oForm.line1.value == "" ? "No letters have been entered in Line 1!\n\n" : "");
        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 cookStr = "", lTotal = 0, lookahead = "", cnt = 1;
        var daColor = null, daHeight = 0;
        for (i = 1; i < 5; i++) {
            cnt++;
            var pObj = "line" + i, sObj = "upperheight" + i, dObj = "depth" + i, fObj = "font" + i, tObj = "gt" + i, cObj = "color" + i, laObj = "line" + cnt;
            var mObj = "mount" + i, stObj = "stud" + i, spObj = "spacer" + i, tpObj = "template" + i, bkObj = "brick" + i, frObj = "fraction" + i;
            lookahead = cnt == 5 || oForm[laObj].value.length == 0 ? doChars(document.getElementById("oImg").src) : pObj;
            if (oForm[pObj].value.replace(/\s/g, "").length > 0) {
                daColor = oForm[cObj][oForm[cObj].selectedIndex].text;
                lTotal = parseFloat(g_id('TP'+i).innerHTML.substr(1));
                daHeight = oForm[frObj].selectedIndex > 0 ? parseFloat(oForm[sObj][oForm[sObj].selectedIndex].value) + parseFloat(oForm[frObj][oForm[frObj].selectedIndex].value) : oForm[sObj][oForm[sObj].selectedIndex].text;
                
				cookStr = 
					"Type			~  Fabricated Stainless Steel" + 
					"|Letters  		~ " + doChars(oForm[pObj].value) + 
					"|Font          ~ " + oForm[fObj][oForm[fObj].selectedIndex].text + 
					"|Height        ~ " + daHeight + 
					"|Depth         ~ " + oForm[dObj][oForm[dObj].selectedIndex].text + 
					"|Color         ~ " + daColor + 
					"|Mount         ~ " + oForm[mObj][oForm[mObj].selectedIndex].text + 
					"|Ptn		    ~ " + (oForm[tpObj].selectedIndex == 1 ? oForm[tpObj][oForm[tpObj].selectedIndex].text + " " + oForm.align[oForm.align.selectedIndex].text : oForm[tpObj][oForm[tpObj].selectedIndex].text) + 
					"|sLen  		~ " + oForm[stObj][oForm[stObj].selectedIndex].text + 
					"|Spacer Length	~ " + (oForm[spObj].disabled == false && oForm[spObj].selectedIndex > 0 ? oForm[spObj][oForm[spObj].selectedIndex].text : "") + 
					"|Image         ~ " + lookahead + 
					"|Qty      		~ " + parseFloat(qVal) + 
					"|Price         ~ " + fixP(lTotal * qVal);
					
                cookStr = cookStr.replace(/\s+\~\s/g, "~");
                cookStr = cookStr.replace(/\s+\|\s/g, "|");
                cookStr = cookStr.replace(/["]/g, "#Y");
                cookStr = cookStr.replace(/[']/g, "#Z");
                toCook("item_", cookStr);
            };
        };
        location.href = "s_viewCart.htm";
    };


    function doSwatch(line) {
        c = new Array;
        c[0] = "0000 | FFFFFF | Choose Finish";
        c[1] = "0000 | FFFFFF | --------------";
        c[2] = "0000 | FFFFFF | METAL FINISHES";
        c[3] = "0000 | FFFFFF | --------------";
        c[4] = "1888 | B2ADB3 | 1888 Satin Stainless";
        c[5] = "1188 | B0ABB1 | 1188 Polished Stainless Steel";
        c[6] = "1444 | C2A47E | 1444 Satin Gold Titanium";
        c[7] = "1144 | E4CC9C | 1144 Polished Titanium";
        c[8] = "0000 | FFFFFF | --------------";
        c[9] = "0000 | FFFFFF | PAINTED FINISHES";
        c[10] = "0000 | FFFFFF | --------------";
        c[11] = "p5687 | FFFFFF | p5687 White";
        c[12] = "p4310 | 918E95 | p4310 Dove Grey";
        c[13] = "p0209 | 999999 | p0209 Grey";
        c[14] = "p2025 | 000000 | p2025 Black";
        c[15] = "p2718 | F9E7C3 | p2718 Opaque Ivory";
        c[16] = "p4660 | F7D1AC | p4660 Desert Sand";
        c[17] = "p8090 | C2D346 | p8090 Safety Green";
        c[18] = "p2037 | FAD900 | p2037 Lemon Yellow";
        c[19] = "p2000 | FBD100 | p2000 Yellow";
        c[20] = "p0217 | FDEC20 | p0217 Citrus Yellow";
        c[21] = "p0218 | FFD34C | p0218 Sundance Yellow";
        c[22] = "p0254 | D8940B | p0254 School bus Yellow";
        c[23] = "p2119 | F65507 | p2119 Orange";
        c[24] = "p2662 | F24024 | p2662 Red-Orange";
        c[25] = "p0256 | DB5607 | p0256 Rampart Orange";
        c[26] = "p2793 | EE1108 | p2793 Red";
        c[27] = "p1875 | B92E03 | p1875 Brick Red";
        c[28] = "p2240 | AB0E17 | p2240 Maroon";
        c[29] = "p2280 | 533D40 | p2280 Black Cherry";
        c[30] = "p2410 | F63C87 | p2410 Magenta";
        c[31] = "p2287 | 3E174E | p2287 purple";
        c[32] = "p0246 | 928FC5 | p0246 Violet Toner";
        c[33] = "p2767 | 201A32 | p2767 Midnight Blue";
        c[34] = "p2050 | 13308C | p2050 Dark Blue";
        c[35] = "p2860 | 1D54D3 | p2860 Medium Blue";
        c[36] = "p3000 | 3996F5 | p3000 Blue";
        c[37] = "p2648 | 009CC9 | p2648 Light Blue";
        c[38] = "p5425 | 677B82 | p5425 Marine Reef Blue";
        c[39] = "p3210 | 64D1CB | p3210 Teal Blue";
        c[40] = "p3555 | 647A3C | p3555 Spring Green";
        c[41] = "p2108 | 438120 | p2108 Light Green";
        c[42] = "p0222 | 238820 | p0222 Emerald Green";
        c[43] = "p2030 | 305C27 | p2030 Dark Green";
        c[44] = "p0259 | 227527 | p0259 Federal Green";
        c[45] = "p2162 | 283931 | p2162 Hunter Green";
        c[46] = "p2418 | 563019 | p2418 Brown";
        c[47] = "m0400 | D29A43 | m0400 Brilliant Gold";
        c[48] = "m2756 | 9D6D3D | m2756 Metallic Gold";
        c[49] = "m0401 | D39003 | m0401 Metallic Aztec Gold";
        c[50] = "m0253 | C07764 | m0253 Metallic Copper";
        c[51] = "m0402 | 945103 | m0402 Metallic Aztec Copper";
        c[52] = "m0312 | 7F654C | m0312 Metallic Medium Bronze";
        c[53] = "m0314 | 836158 | m0314 Metallic Old Copper";
        c[54] = "m3130 | 3D3332 | m3130 Metallic Duranodic Bronze";
        c[55] = "m8886 | BEB3B7 | m8886 Metallic Silver";
        var cData = c[0].split(" | ");
        var cHex = cData[1];
        cHex = cHex.replace(/^\s+/g, "").replace(/\s+$/g, "");
        var cLen = c.length;
        var cObj = "color";
        var list = "012345789ABCDEF";
        var fgCol = 0;
        var oldSel = line > 0 ? oForm[cObj + line][oForm[cObj + line].selectedIndex].text : null;
        if (line == 0) {
            for (var k = 1; k < 5; k++) {
                for (var j = oForm[cObj + k].options.length - 1; j > 0; j--) {
                    oForm[cObj + k].options[j] = null;
                };
            };
        } else {
            for (var j = oForm[cObj + line].options.length - 1; j > 0; j--) {
                oForm[cObj + line].options[j] = null;
            };
        };
        if (line == 0) {
            for (var i = 0; i < cLen; i++) {
                cArr = c[i].split(" | ");
                fgCol = list.indexOf(cArr[1].substr(0, 1)) + list.indexOf(cArr[1].substr(2, 1)) + list.indexOf(cArr[1].substr(4, 1));
                for (k = 1; k < 5; k++) {
                    oForm[cObj + k].options[i] = new Option(cArr[2], cArr[1]);
                    oForm[cObj + k].options[i].style.background = "#" + cArr[1];
                    oForm[cObj + k].options[i].style.width = "180px";
                    oForm[cObj + k].options[i].style.color = fgCol > 24 ? "#000000" : "#FFFFFF";
                    oForm[cObj + k].selectedIndex = 0;
                };
            };
        } else {
            for (var i = 0; i < cLen; i++) {
                cArr = c[i].split(" | ");
                fgCol = list.indexOf(cArr[1].substr(0, 1)) + list.indexOf(cArr[1].substr(2, 1)) + list.indexOf(cArr[1].substr(4, 1));
                oForm[cObj + line].options[i] = new Option(cArr[2], cArr[1]);
                oForm[cObj + line].options[i].style.background = "#" + cArr[1];
                oForm[cObj + line].options[i].style.width = "180px";
                oForm[cObj + line].options[i].style.color = fgCol > 24 ? "#000000" : "#FFFFFF";
                if (oldSel == cArr[2]) {
                    j = i;
                };
            };
            oForm[cObj + line].selectedIndex = j > 0 ? j : 0;
        };
    };


function loadTooltips(){
			g_id("sprytooltip1").innerHTML="<div class='content'><p>To get started, type in the letters, numbers and punctuation, exactly as you want it to read when you make your sign. For multiple line signs, there are 3 other lines that will become available. What you type is what you will get. If lower case letters typed and the size is too small or lower case is not available in the chosen font, those letters will automatically convert to upper case and should convert back again when you change the height or size to something that has availability. What you type here will display in the area below with correct real world dimensions when you leave the text box.</p></div><div class='bottom'></div>";
			g_id("sprytooltip2").innerHTML="<div class='content'><p>Select the uppercase height for the line you are working on. The fraction box will add a fractional unit to the inch box ie; 3-1/2&quot; This gives you a lot of adjustment in your finished line lengths for a set of letters. Only one size can be on one line so if you want large capitals followed by small capitals, you would have to those in an empty line. For those using all lower case, only the ascenders such as 'd I h' are the same height as the corresponding uppercase letter. Body letters such as 'a c s' will be about 2/3rds smaller.</p></div><div class='bottom'></div>";
			g_id("sprytooltip3").innerHTML="<div class='content'><p>The depth measurement is the thickness of the letter when measured front to back. The width of a letter is controlled by the font. Letter depth for sheet cut letters in metal and plastic will determine the price, along with other factors. Depths can be accentuated during installation by choosing spacer stand offs from the mounting options. These allow letters to stand away by a pre-determined length of spacer, giving the letters a shadow effect.</p></div><div class='bottom'></div>";
			g_id("sprytooltip4").innerHTML="<div class='content'><p>The color \/ finish \/ material list is a multi-part selection box allowing you to choose a material(some forms) and a color or finish to apply to the material. For instance, in cut metal letters there are tabs on the top of the selection window where you can select from Aluminum, Brass, Bronze etc; and each tab will have colors or finishes applicable to that material. Aluminum also has a window for baked enamel colors. On other order forms, only the colors applicable to the product are shown. Please be aware that all colors and finishes are representative, not actual. Although we cannot provide free color samples, our website allows you to buy a single letter as a sample. We do not have minimum order quantitys except in the case of anodized colors.</p></div><div class='bottom'></div>";
			g_id("sprytooltip5").innerHTML="<div class='content'><p>The Matte checkbox will only be available when a painted finish is chosen. It is also not available when a metallic color is chosen. Matte paint modifiers add 30% to an order.</p></div><div class='bottom'></div>";
			g_id("sprytooltip6").innerHTML="<div class='content'><p>The font list contains a selection of the most popular fonts. In cut materials, those that have a \"DEPTH\" setting, the font does not contribute to the price. Further, the font does not have to be on this list for us to be able to cut it, which means we can cut your provided font, usually at no extra charge. On other products, such as Cast metal, formed or injection molded plastics, the font chosen will be part of the determining factor of price. Further, custom fonts cannot be done in Injection molded plastic but are available in Vacuum formed plastic and cast metal. See the menu for estimators to price custom fonts and logos. Lastly and importantly, the font chosen will control the width of a given line of text. For shorter lenghts choose a condensed type font.</p></div><div class='bottom'></div>";
			g_id("sprytooltip7").innerHTML="<div class='content'><p>Aligns the display output below either left, right or center justified. TIP: You can also indent display view text by using spaces before the text to move the line text to the right. </p></div><div class='bottom'></div>";
			g_id("sprytooltip8").innerHTML="<div class='content'><p>The backgrounds allow you to see how your chosen letter color might look against a chosen background color. This is helpful for determining the correct color letter to apply to your wall color. No backgrounds are included with actual order. We do not make finished signs. All letters are individual unless specified otherwise.</p></div><div class='bottom'></div>";
			g_id("sprytooltip10").innerHTML="<div class='content'><p>Which mounting hardware best suits your project requires an understanding of the various mounts available for different types of letters. If you are not sure what kind of mounts to get, we strongly recommend reviewing our installation page with helpful videos explaining many of the mounting methods and their uses. A link to the page can be found on the site menu.</p></div><div class='bottom'></div>";
			g_id("sprytooltip11").innerHTML="<div class='content'><p>Standard stud length is the same as no preference. The factory will decide what lengths to include based on the type of letter, its height and depth. Unless you have a specific need for a specific length, this setting can be left at standard.</p></div><div class='bottom'></div>";
			g_id("sprytooltip12").innerHTML="<div class='content'><p>Stand off is where you want your letters to stand slightly away from the mounting surface for effect. Spacers are pre cut hollow tubes the slip over studs to provide a space between the letter and wall. On Vacuum Formed and Injection Molded letters, a combination all mount replaces the sleeve type mount with adjustable pads that can provide multiple depths by screwing the pad in or out along its stud.</p></div><div class='bottom'></div>";
			g_id("sprytooltip14").innerHTML="<div class='content'><p>A mounting pattern is a full size drawing of the letters you order, laid out with proper spacing and alignment. A pattern is critical for stud type mounts and shows you where to drill for the studs. NOTE: Gemini products require multiple patterns for multiple sets of letters. Without it, you will not get a good result and spend much time and frustration. For other types of mounts, a full size pounce pattern with inked letters that are perforated on their outlines, allows you to rub chalk through leaving an impression on the wall.</p></div><div class='bottom'></div>";

	var sprytooltip1 = new Spry.Widget.Tooltip("sprytooltip1","#ttLetters", {useEffect:"blind", showDelay:250, hideDelay:500, followMouse:true});
	var sprytooltip2 = new Spry.Widget.Tooltip("sprytooltip2","#ttHeight", {useEffect:"blind", showDelay:250, hideDelay:500, followMouse:true});
	var sprytooltip3 = new Spry.Widget.Tooltip("sprytooltip3","#ttDepth", {useEffect:"blind", showDelay:250, hideDelay:500, followMouse:true});
	var sprytooltip4 = new Spry.Widget.Tooltip("sprytooltip4","#ttColor", {useEffect:"blind", showDelay:250, hideDelay:500, followMouse:true});
	var sprytooltip5 = new Spry.Widget.Tooltip("sprytooltip5","#ttMatte", {useEffect:"blind", showDelay:250, hideDelay:500, followMouse:true});
	var sprytooltip6 = new Spry.Widget.Tooltip("sprytooltip6","#ttFont", {useEffect:"blind", showDelay:250, hideDelay:500, followMouse:true});
	var sprytooltip7 = new Spry.Widget.Tooltip("sprytooltip7","#ttAlign", {useEffect:"blind", showDelay:250, hideDelay:500, followMouse:true});
	var sprytooltip8 = new Spry.Widget.Tooltip("sprytooltip8","#ttBackground", {useEffect:"blind", showDelay:250, hideDelay:500, followMouse:true});
	var sprytooltip10 = new Spry.Widget.Tooltip("sprytooltip10","#ttMounts", {useEffect:"blind", showDelay:250, hideDelay:500, followMouse:true});
	var sprytooltip11 = new Spry.Widget.Tooltip("sprytooltip11","#ttStud", {useEffect:"blind", showDelay:250, hideDelay:500, followMouse:true});
	var sprytooltip12 = new Spry.Widget.Tooltip("sprytooltip12","#ttStandoff", {useEffect:"blind", showDelay:250, hideDelay:500, followMouse:true});
	var sprytooltip14 = new Spry.Widget.Tooltip("sprytooltip14","#ttPattern", {useEffect:"blind", showDelay:250, hideDelay:500, followMouse:true});
};
