var items = new Array(); var n1m = 0; var hours = 0; var total = 0; var OrdWin2 = ""; var n1w = '', n3w = '', n4w = '', n6w = '', n10w = '', n13w = '', n20w = '', scrapper2 = '', scrapper20a = ''; var nu = navigator.userAgent; var tboxsize = 2; if (nu.indexOf("MSIE") != -1 && nu.indexOf("Mac") == -1 && nu.indexOf("Opera") == -1) { tboxsize = 1; } var macmatch = 0, uamatch = 0; if (nu.indexOf("Mac") != -1 && nu.indexOf("AOL") == -1 && nu.indexOf("MSIE 4.0") != -1) { macmatch = 1; } if (nu.indexOf("MSIE") != -1 && nu.indexOf("Opera") == -1) { if (!macmatch) { uamatch = 1; } if (nu.indexOf("MSIE 9.") != -1 || nu.indexOf("MSIE 1") != -1 || nu.indexOf("Trident/") != -1) { uamatch = 2; } } else if (nu.indexOf("Gecko") != -1 || nu.indexOf("Opera") != -1 || nu.indexOf("Konqueror") != -1) { if (nu.indexOf("Linux") == -1 || (nu.indexOf("Opera/6.") == -1 && nu.indexOf("Opera / 6") == -1)) { uamatch = 2; } } else if (nu.indexOf("Mozilla/4.") != -1) { if (nu.indexOf("Mac") == -1) { uamatch = 3; } } var OW = ""; var AOW2 = ''; var win_sz, win_id; var qd11 = "garden salad"; var qd3 = "turkey sausage"; var qd14 = "chips"; var qd12 = "fruit salad"; var qd34 = "sausage"; var qd55 = "shrimp cocktail"; var qd20 = "chicken fiesta & chinese chicken"; var qd35 = "margherita"; var qd36 = "bbq chicken"; var qd58 = "vegetable spring rolls"; var qd54 = "sesame chicken skewers"; var qd2 = "sasuage"; var qd33 = "pepperoni"; var qd38 = "cole slaw"; var qd48 = "rice pilaf"; var qd7 = "asparagus"; var qd41 = "mashed potatoes"; var qd16 = "greek"; var qd15 = "caesar"; var qd45 = "chicken picatta"; var qd5 = "spinach"; var qd37 = "corn on the cobb"; var qd28 = "plain fries"; var qd61 = "hot dog"; var qd42 = "red roasted potatoes"; var qd40 = "baked beans"; var qd49 = "red mashed potatoes"; var qd6 = "mushrooms"; var qd30 = "simple salad"; var qd43 = "chicken teriyaki"; var qd21 = "spinach salad"; var qd13 = "pasta salad"; var qd1 = "bacon"; var qd4 = "ham"; var qd19 = "grand ave"; var qd53 = "buffalo wings"; var qd22 = "blue cheese aioli & arugula"; var qd17 = "garden"; var qd29 = "potato wedges"; var qd32 = "cheese"; var qd23 = "chicken & swiss"; var qd31 = "caesar salad"; var qd62 = "burger slider"; var qd9 = "swiss"; var qd60 = "chips salsa & gucamole"; var qd50 = "sauteed seasonal veggies"; var qd47 = "chicken lemon herb"; var qd57 = "classic bruchetta"; var qd56 = "ahi poke w/ wontons"; var qd26 = "sweet potato"; var qd59 = "stuffed mushrooms"; var qd39 = "kale cole slaw"; var qd18 = "mixed greens"; var qd44 = "chicken marsala"; var qd52 = "green beans"; var qd10 = "provolone"; var qd25 = "bbq pulled pork"; var qd27 = "garlic parm fries"; var qd51 = "garic spinach"; var qd46 = "chicken milanese"; var qd8 = "cheddar"; var qd24 = "american (cheese, tomato, pickle red sauce)"; var op, needle, oP, mimic, w1d, w1h, icol_a, icol_b, subprice, prearray, p1n, winqty, svhn = 0, callcent = 0, callcomcent1 = "Comment", callcomcent2 = 0, totalcost = 0, delchrg = 0, franco = 0, drop_titl = 0, drop_oclk = 0, full_scrn = 0, site_wnmr = 0, drop_hovr = 0, drop_slim = 0, drop_prob = 0, drop_save = 0, addrcent = 0, cker1 = 0, bsite = "", csite = "", urlsitus = "", urlsitus2 = "", cthru = 0, cthruleft = 0, extracthru = 0, extracthruleft = 0, sitecmnt = 0, menuforward = 0, newdivstyle = 0, imgx = 0, deeon = 0, orvse = 0, ppp1 = 0, mphone = 0, menuoff = 0, menuoff2 = "", weaccept1 = "", sizefull = 0, sizefull2 = 0, sizefull3 = 0, sizefuller2 = 0, freep2 = 0, freep3 = 0, freep4 = 0, forced2 = 0, forced3 = 0, forced4 = 0, forced5 = 0, forced6 = 0, roundh2 = 0, roundh3 = 0, roundh4 = 0, roundh5 = 0, roundh6 = 0, roundh7 = 0, newlook = 0, popupless = 0, lpast = 0, newshowhide = 0, csspop = 0, csspopup = 1, csscolumn = 0, newdivstyler = 0, scrapper = 0, tampm = '', newlookphone = 0, qlessi = "", qlessd = "", qlesss = "", numcnt = 0, numcnt2 = 0, keep = -1, logcustom = 0, logstring = "", logcuser = "", rfrming = 1, alertchk = 0, nomen = "", nomon = "", ineo = "", ineon = "", calmod = "", datelist = "", datestr = "", datearg = "", dateprearg = "", mphonevar = 0, chromevar = 0, pckaobj, json2fds, taxvar = 1.0975, q0; var superqty, ropez; var extras1_0 = new Array(qd1, qd2, qd3, qd4, qd5, qd6, qd7, qd8, qd9, qd10); var extras2_0 = new Array(qd11, qd12, qd13, qd14); var radio1_0 = new Array(qd15, qd16, qd17, qd18); var radio2_0 = new Array(qd19, qd20, qd21); var extras3_0 = new Array(qd22, qd23, qd24, qd25); var radio3_0 = new Array(qd26, qd27, qd28, qd29, qd30); var radio4_0 = new Array(qd11, qd31); var extras10_0 = new Array(qd32, qd33, qd34, qd35, qd36); var extras5_0 = new Array(qd37, qd38, qd39, qd12, qd40, qd41, qd42); var radio6_0 = new Array(qd43, qd44, qd45, qd46, qd47); var extras8_0 = new Array(qd48, qd49, qd50, qd7, qd51, qd52); var extras9_0 = new Array(qd53, qd54, qd55, qd56, qd57, qd58, qd59, qd60, qd61, qd62); function visvals() { if (document.getElementById('visphon') != null) { document.getElementById('visphon').innerHTML = '(310) 322-8400'; } if (document.getElementById('visaddr') != null) { document.getElementById('visaddr').innerHTML = '200 N. Sepulveda Blvd., Suite 100'; } if (document.getElementById('viscity') != null) { document.getElementById('viscity').innerHTML = 'El Segundo'; } if (document.getElementById('visstat') != null) { document.getElementById('visstat').innerHTML = 'CA'; } if (document.getElementById('visname') != null) { document.getElementById('visname').innerHTML = 'Just Downstairs'; } //fix this if (document.getElementById('vishomeurl') != null) { document.getElementById('vishomeurl').innerHTML = ''; } } function getOffsetRect(elem) { // (1) var box = elem.getBoundingClientRect(); var body = document.body; var docElem = document.documentElement; // (2) var scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop; var scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft; // (3) var clientTop = docElem.clientTop || body.clientTop || 0; var clientLeft = docElem.clientLeft || body.clientLeft || 0; // (4) var top = box.top + scrollTop - clientTop; var left = box.left + scrollLeft - clientLeft; return { top: Math.round(top), left: Math.round(left) }; } var jquerychk = 0, jquerycook = 0; var checkjQuery = function() { if (!window.jQuery && jquerychk < 50) { jquerychk++; return false; } else if (!jQuery.cookie && jquerychk < 50) { if (!jquerycook) { jquerycook++; jqcookload(); } jquerychk++; return false; } else { clearTimeout(jqinterval); grabord(); } } var jqinterval= setInterval(checkjQuery,400); (function() { var srcfile, jsfile; if (!window.jQuery) { srcfile = "/icons/js/jquery-1.7.1.min.js"; jsfile = document.createElement('script'); jsfile.setAttribute("type","text/javascript"); jsfile.setAttribute("src",srcfile); document.getElementsByTagName("head")[0].appendChild(jsfile); } var jnug = navigator.userAgent; if (jnug.indexOf("MSIE") != -1 && jnug.indexOf("MSIE 9") == -1 && jnug.indexOf("MSIE 1") == -1) { srcfile = "/icons/js/json2.js"; jsfile = document.createElement('script'); jsfile.setAttribute("type","text/javascript"); jsfile.setAttribute("src",srcfile); document.getElementsByTagName("head")[0].appendChild(jsfile); } })(); function jqcookload() { if (!jQuery.cookie) { srcfile = "/icons/js/jquery.cookie.js"; jsfile = document.createElement('script'); jsfile.setAttribute("type","text/javascript"); jsfile.setAttribute("src",srcfile); document.getElementsByTagName("head")[0].appendChild(jsfile); } } var timeobj = ''; var timenowobj = ''; function sveord() { var ltrns = 'ENG'; if (!localStorage) { $.cookie('eatord1000949',JSON.stringify(items), {expires: 1, path : '/' }); } else { localStorage.setItem('eatord1000949',JSON.stringify(items)); timeobj = { itmtime: new Date().getTime() }; localStorage.setItem('eattime1000949',JSON.stringify(timeobj)); localStorage.setItem('langtrans1000949',JSON.stringify(ltrns)); } } function grabord() { var pieitems,pienum,langtrans,clang; clang = 'ENG'; if (!ropez) { if (!localStorage) { if ($ && $.cookie && JSON.parse($.cookie('eatord1000949'))) { items = JSON.parse($.cookie('eatord1000949')); } } else { pieitems = JSON.parse(localStorage.getItem('eatord1000949')); langtrans = JSON.parse(localStorage.getItem('langtrans1000949')); if (pieitems && pieitems[1]) { pienum = pieitems.length - 1; items = new Array(); piecount = 1; for (var i=1;i<=pienum;i++) { if (pieitems[i] && pieitems[i].code && pieitems[i].code < 95000) { items[piecount++] = pieitems[i]; } } } timeobj = JSON.parse(localStorage.getItem('eattime1000949')); timenowobj = new Date().getTime().toString(); if (timeobj && timeobj.itmtime != null) { if (timenowobj > timeobj.itmtime + 7200000 || clang != langtrans) { items = ''; } } } if (items && items[1]) { n1m = items.length - 1; displaymenuorder(); } else { items = new Array(); } } } var qntd = new Object(); qntd["20003.051217"] = 8; qntd["60015.051717"] = 8; qntd["10001.051217"] = 8; qntd["20004.051217"] = 8; qntd["10028.051717"] = 8; qntd["10027.051717"] = 8; qntd["20020.051217"] = 8; qntd["60016.051717"] = 8; qntd["20006.051217"] = 8; qntd["60010.051217"] = 8; qntd["10026.051717"] = 8; qntd["20002.051217"] = 8; qntd["20018.051217"] = 8; qntd["60002.051217"] = 8; qntd["20005.051217"] = 8; qntd["60014.051717"] = 8; qntd["20001.051217"] = 8; qntd["70010.051217"] = 8; qntd["20017.051217"] = 8; qntd["60013.051717"] = 8; var wq1 = ''; var wq2 = ''; function namehasher() { var mixx; cx1 = ' CHECKED'; cx2 = ' value=1'; wq1 = '
With: '; wq2 = '
w/: '; return 1; } function goanchor(id) { if (id) { location.hash ='#' + id; } } function qlessing(qlpos,qljay,qlfds) { var qreti = ""; if (!qlfds) { qreti = fds[qlpos][3]; qreti = qreti.replace(/'/g,"’"); qreti = qreti.replace(/"/g,"”"); return qreti; } else if (qlfds == 1) { qreti = fds[qlpos][4]; qreti = qreti.replace(/'/g,"’"); qreti = qreti.replace(/"/g,"”"); return qreti; } else if (qlfds == 2) { qljay = qljay - 0; if (fds[qlpos][qljay+5]) { qreti = fds[qlpos][qljay+5]; qreti = qreti.replace(/'/g,"’"); qreti = qreti.replace(/"/g,"”"); qreti = " - " + qreti; return qreti; } else { return ""; } } return ""; } logcustom = "https://www.eatkey.com/apps/EatCustomer/?rids=1000949&hubco=&menuturn=1&situs=justdownstairs&franco=1&csite=catering.justdownstairs.com&ck="; logstring = ""; weaccept1 = "WE ACCEPT VISA, MASTERCARD, AMERICAN EXPRESS AND DISCOVER"; function posOflex() { } function lT2(lF, lC, lN) { if (lF.value.length > lN) { lF.value = lF.value.substring(0, lN); } else { lC.value = lN - lF.value.length; } } function openPreOrderWin(id) { var tmpQty = 0, qtyObjCount = 0; totalcost = 0; var sh = parent.document; if (ppp1 != 1) { updatemenuorder(1); } for (var i = 1;i <= n1m; i++) { totalcost += (items[i].price * items[i].quantity); tmpQty = 0; if (n1m == 1) { tmpQty = parseInt(sh.forms[0].qty.value); } else { qtyObjCount = 0; for (var j = 1; j <= sh.forms[0].elements.length-3; j++) { if (sh.forms[0].elements[j-1].name != "qty") { continue; } else { qtyObjCount++; if (qtyObjCount == i) { tmpQty = parseInt(sh.forms[0].elements[j-1].value); break; } } } } if (isNaN(tmpQty)) { alert("You Inadvertantly Entered a Blank Space or a Letter in the Quantity Box for Item Number " + i + ". Please Re-enter a Number."); return; } if (tmpQty < 0) { alert("Please Do Not Order Negative Numbers of Food Items."); return; } if ((tmpQty * items[i].price) != (items[i].quantity * items[i].price)) { alert("Please Hit the Update Button and then Hit the Order Button Again."); return; } } if (0.00 > totalcost) { alert("The $" + cent(totalcost) + " Amount of Items You Ordered Is Below the 0.00 Minimum Order Amount."); return; } openPreOrderWin1(id); } function openPreOrderWin1(id,id2) { var wdt = 475; var sh = parent.document; if (callcent == 1) { if (!ordersubmit()) { return; } } if (id == -1) { sh.forms[0].method = 'post'; sh.forms[0].target = '_parent'; sh.forms[0].submit(); return; } if (id) { wdt += 25; } var jh = screen.availHeight; jh = jh - (jh / 8); jh = Math.round(jh); if (OrdWin2 && !OrdWin2.closed) { OrdWin2.close(); } OrdWin2 = window.open("","preOrderWin","location=yes,toolbar=yes,menubar=yes,resizable=yes,scrollbars=yes,width=" + wdt + ",height=" + jh + ",screenX=20,screenY=0"); if (!id) { sh.forms[0].submit(); } } function openPreOrderWin2(id) { var sh = parent.document; if (sh.forms != null && sh.forms[0]) { if (!id || id == null) { if (n1m) { sh.forms[0].action = 'https://www.eatkey.com/apps/EatCustomer/?rids=1000949&menu2=0&hubco=&menuturn=1&situs=justdownstairs&franco=1&csite=catering.justdownstairs.com&ck=&inside=1'; } else { sh.forms[0].action = 'https://www.eatkey.com/apps/EatCustomer/?rids=1000949&menu2=0&hubco=&menuturn=1&situs=justdownstairs&franco=1&csite=catering.justdownstairs.com&ck='; } } else { if (id != 3) { if (franco == 1) { if (cker1 == 1) { if (n1m) { sh.forms[0].action = 'https://www.eatkey.com/apps/EatCustomer/?rids=1000949&menu2=0&hubco=&menuturn=1&situs=' + bsite + '&csite=' + csite + '&franco=1&ck=1&inside=1'; } else { sh.forms[0].action = 'https://www.eatkey.com/apps/EatCustomer/?rids=1000949&menu2=0&hubco=&menuturn=1&situs=' + bsite + '&csite=' + csite + '&franco=1&ck=1'; } } else { if (n1m) { sh.forms[0].action = 'https://www.eatkey.com/apps/EatCustomer/?rids=1000949&menu2=0&hubco=&menuturn=1&situs=' + bsite + '&csite=' + csite + '&franco=1&ck=&inside=1'; } else { sh.forms[0].action = 'https://www.eatkey.com/apps/EatCustomer/?rids=1000949&menu2=0&hubco=&menuturn=1&situs=' + bsite + '&csite=' + csite + '&franco=1&ck='; } } } else { if (cker1 == 1) { if (n1m) { sh.forms[0].action = 'https://www.eatkey.com/apps/EatCustomer/?rids=1000949&menu2=0&hubco=&menuturn=1&situs=justdownstairs&franco=1&csite=catering.justdownstairs.com&ck=1&inside=1'; } else { sh.forms[0].action = 'https://www.eatkey.com/apps/EatCustomer/?rids=1000949&menu2=0&hubco=&menuturn=1&situs=justdownstairs&franco=1&csite=catering.justdownstairs.com&ck=1'; } } else { if (n1m) { sh.forms[0].action = 'https://www.eatkey.com/apps/EatCustomer/?rids=1000949&menu2=0&hubco=&menuturn=1&situs=justdownstairs&franco=1&csite=catering.justdownstairs.com&ck=&inside=1'; } else { sh.forms[0].action = 'https://www.eatkey.com/apps/EatCustomer/?rids=1000949&menu2=0&hubco=&menuturn=1&situs=justdownstairs&franco=1&csite=catering.justdownstairs.com&ck='; } } } } } sh.forms[0].method = 'post'; sh.forms[0].target = '_parent'; sh.forms[0].submit(); } else { top.location.href = 'https://www.eatkey.com/apps/EatCustomer/?rids=1000949&menu2=0&hubco=&menuturn=1&situs=justdownstairs&franco=1&csite=catering.justdownstairs.com&ck='; } } function updatemenuorder(id) { var sh = parent.document; var test = 0, tmpQty = 0, itmlmt = 0, qtyObjCount = 0; if (id && popupless == 1) { return true; } if (n1m > 0 && callcent == 1 && callcomcent2 == 1 && sitecmnt == 0) { callcomcent1 = sh.forms[0].comments.value; } for (var i=1;i<=n1m;i++) { tmpQty = 0; if (n1m == 1) { tmpQty = parseInt(sh.forms[0].qty.value); } else { qtyObjCount = 0; for (var j=1; j <= sh.forms[0].elements.length-3; j++) { if (sh.forms[0].elements[j-1].name != "qty") { continue; } else { qtyObjCount++; if (qtyObjCount == i) { tmpQty = parseInt(sh.forms[0].elements[j-1].value); break; } } } } if (items[i].quantity == tmpQty) { continue; } test++; if (isNaN(tmpQty)) { tmpQty = 0; } else if (tmpQty < 0) { tmpQty = 0; } items[i].quantity = tmpQty; if (items[i].basequantity != null) { if (op && winqty) { items[n1m].quantity = winqty; } } if (items[i].quantity < items[i].basequantity && items[i].quantity > 0) { items[i].quantity = items[i].basequantity; } if (id) { return true; } } if (test) { sveord(); update(); } } function decreaseitem(itemno) { for (i=1;i<=n1m;i++) { if (itemno == items[i].itemno) { if (items[i].quantity > 0) { items[i].quantity--; if (qntd[items[i].code] != null && items[i].quantity < qntd[items[i].code]) { items[i].quantity = 0; } } else { items[i].quantity = 0; } } } displaymenuorder(); } function Item(i,d,d2,dd,p,c,q) { this.itemno = i; this.desc = d; this.desc2 = d2; this.dsub = dd; this.price = p; this.code = c; this.quantity = q; } function mr_clean(desc) { var here, storage, caboose; var comma = '"'; if (desc.indexOf("^") >= 0) { for (var i = 0; i < desc.length; i++ ) { if (desc.indexOf("^") >= 0) { here = desc.indexOf("^"); storage = desc.substring(0,here); here += 1; caboose = desc.substring(here,desc.length); desc = "" + storage + comma + caboose; } else { break; } } } if (desc.indexOf("`") >= 0) { for (var i = 0; i < desc.length; i++ ) { if (desc.indexOf("`") >= 0) { here = desc.indexOf("`"); storage = desc.substring(0,here); here += 1; caboose = desc.substring(here,desc.length); desc = "" + storage + "'" + caboose; } else { break; } } } return desc; } function additem(itemno,d1,d2,dsub,price,code,slctqty) { var here, storage, caboose, desc, t1s = 0, comma = '"'; if (d1 >= 0) { desc = fds[d1][d2]; } else { desc = d2; } var desc2 = desc; desc = mr_clean(desc); if (desc2.indexOf("'") >= 0) { for (var i = 0; i < desc2.length; i++ ) { if (desc2.indexOf("'") >= 0) { here = desc2.indexOf("'"); storage = desc2.substring(0,here); here += 1; caboose = desc2.substring(here,desc2.length); desc2 = "" + storage + "`" + caboose; } else { break; } } } var foundIt = false; var quantity; if (!op) { p1n = 0; } if (!p1n) { for (var i=1;i<=n1m;i++) { if (slctqty && slctqty > 0) { break; } if (desc == items[i].desc && itemno == items[i].itemno) { if (items[i].quantity >= 0) { items[i].quantity++; if (items[i].basequantity != null) { if (op && winqty) { items[n1m].quantity = winqty; } } if (items[i].quantity < items[i].basequantity && items[i].quantity > 0) { items[i].quantity = items[i].basequantity; } } else { items[i].quantity = 0; } foundIt = true; break; } } if (!foundIt) { if (!slctqty || slctqty == 0) { quantity = 1; } else { quantity = slctqty; } items[++n1m] = new Item(itemno,desc,desc2,dsub,price,code,quantity); t1s = n1m; if (op) { items[n1m].basedesc = oP.basedesc; items[n1m].baseprice = oP.baseprice; items[n1m].tracker = oP.tracker; items[n1m].sz = oP.sz; items[n1m].ider = oP.ider; items[n1m].ayray = arrayplay(); if (winqty) { items[n1m].quantity = winqty; } } if (qntd[items[n1m].code] != null) { items[n1m].basequantity = qntd[items[n1m].code]; if (items[n1m].quantity < qntd[items[n1m].code]) { items[n1m].quantity = qntd[items[n1m].code]; } } } } else { items[p1n].desc = desc; items[p1n].desc2 = desc2; items[p1n].dsub = dsub; items[p1n].price = price; items[p1n].tracker = oP.tracker; items[p1n].ayray = arrayplay(); if (qntd[items[p1n].code] != null) { items[p1n].basequantity = qntd[items[p1n].code]; if (items[p1n].quantity < qntd[items[p1n].code]) { items[p1n].quantity = qntd[items[p1n].code]; } } if (winqty) { items[p1n].quantity = winqty; } t1s = p1n; } op = ''; winqty = 0; prearray = p1n = ''; displaymenuorder(); sveord(); } //top to bottom function jslim(sz,code2) { //dq1 = new Array( arlens in here); //dq2 = new Array( r0/c0 in here); //dq3 = new Array( ck0 in here); //dq4 = new Array( r0r in here); //dq5 = new Array( r0p in here); //dq6 = new Array( shutoff + menu_number value }; //dq7 = new Array{ shutoff0 + tiresome value }; //dq8 = new Array( potato value ); //dq9 = new Array( names ); //dq10 = new Array ( halves ); //dq11 = new Array ( 'gj' values ); //dq12 = new Array { set values }; //dq13 = new Array ( subchk values }; //dq14 = new Array ( headers ); code2 = parseInt(code2); var f5 = f52 = f53 = pricon = check5 = fives = 0; var rgen = 0; var rmlt = 0; var rmlt2 = 0; var r9e = 0; var r8e = 0; var r5e = 0; var r6e = 0; var cbr5 = 0; var dq20null = ''; var cspn1, cspn5, cspna, cspnb, cspnc, cwdth, czr1, czr2, czr3, czr4, czr5, czr6, czr7, czr8, czr45, czr445, fiver45, fiver455, in5, in8, here, mox, mox1, mox2, thar, tspn1, tspn2, tspn5, tspn55, twra, twrb, twrc, twend, tline, sbm, sbm2, sz2, subfive, five1, multi8, multi9, newcspna, cspna2, newcspna2, cspnafull, cspnhalf, cspnar; cspnhalf = 0; cspnafull = 0; cspnar = 0; sz = "" + sz; if (sz.indexOf("9") >= 0) { rgen = rmlt = r9e = 1; } if (sz.indexOf("8") >= 0) { rgen = rmlt = r8e = 1; } if (sz.indexOf("6") >= 0) { rgen = r6e = 1; } if (sz.indexOf("5") >= 0) { rgen = r5e = 1; } // n1w += ""; if (rmlt == 0) { twend = sz.lastIndexOf("1"); if (sz.lastIndexOf("2") > twend) { twend = sz.lastIndexOf("2"); } if (sz.lastIndexOf("3") > twend) { twend = sz.lastIndexOf("3"); } if (sz.lastIndexOf("4") > twend) { twend = sz.lastIndexOf("4"); } } td1 = (sz.length != 1 ? '' : ''); jps = jps1 = jps3 = jpse = 0; var jout = pls2 = pls22 = pls4 = place = 0; //fives if (r6e == 0) { // n1w += ''; for (var i = 0; i < sz.length; i++) { czr1 = sz.charAt(i); czr4 = (sz.length > i - 1 ? sz.charAt(i-1) : -1); czr45 = (i > 1 && sz.length > i - 2 ? sz.charAt(i-2) : -1); if (rmlt == 1) { rmlt2 = 1; if (i == 0 || (i > 1 && czr4 >= 8)) { place = (i != 0 ? i : 1); sbm = sz.substring(place,sz.length); sz2 = 0; if (r9e == 1) { sz2 = sbm.indexOf("9"); } else if (r8e == 1) { sz2 = sbm.indexOf("8"); } if (sz2 >= 0) { sbm = sbm.substring(0,sz2); } if (sbm.indexOf("5") >= 0) { subfive = 1; } else { subfive = 0; } } else { sbm = sz.substring(i,sz.length); sz2 = 0; if (r9e == 1) { sz2 = sbm.indexOf("9"); } else if (r8e == 1) { sz2 = sbm.indexOf("8"); } if (sz2 >= 0) { sbm = sbm.substring(0,sz2); if (r9e == 1) { if (sbm.indexOf("9") == -1) { rmlt2 = 0; } } else if (r8e == 1) { if (sbm.indexOf("8") == -1) { rmlt2 = 0; } } } else { rmlt2 = 0; } } } else { subfive = 1; } if (subfive == 1) { if (czr1 != 1 && czr1 != 3) { continue; } czr2 = (sz.length > i + 1 ? sz.charAt(i+1) : -1); czr3 = (sz.length > i + 2 ? sz.charAt(i+2) : -1); mox2 = 0; if (rmlt == 1) { czr5 = (sz.length > i + 3 ? sz.charAt(i+3) : -1); czr8 = (i > 1 ? sz.charAt(i-2) : -1); if (czr2 >= 8 || czr3 >= 8 || czr5 >= 8) { if (czr2 >= 8) { mox2 = 1; twend = i; } else if (czr3 >= 8 && czr2 != 1 && czr2 != 3) { mox2 = 1; // twend = (czr2 == 2 || czr2 == 4 ? i + 1 : -1); twend = (czr2 == 2 || czr2 == 4 || czr2 == 5 ? i + 1 : -1); } else if (czr5 >= 8 && czr2 != 1 && czr2 != 3 && czr3 != 1 && czr3 != 3) { mox2 = 1; twend = (czr2 == 2 || czr2 == 4 ? i + 1 : -1); } } if (czr4 == 8 || czr8 == 8) { fives = f5 = f52 = f53 = check5 = cbr5 = tspn2 = 0; // fives = f5 = 0; czr6 = 0; for (var j = i+1; j < sz.length; j++) { czr7 = sz.charAt(j); if (czr7 == 8) { break; } if (czr7 == 1 || czr7 == 3) { czr6 += 2; } else if (czr7 == 2 || czr7 == 4) { czr6 += 1; } } if (cbr5 == 1) { n1w += ";" } else { n1w += ""; } jps3++; } else if (czr4 == 9 || czr8 == 9) { if (cbr5 == 1) { n1w += ''; } fives = f5 = f52 = f53 = check5 = cbr5 = tspn2 = 0; } } if (czr4 == 5 || (czr4 == 7 && czr45 == 5)) { if (i > 2) { tspn55 = sz.substring(i-3,i); if (tspn55.indexOf("555") == -1) { fives = (fives == 1 ? 0 : 1); } } else { fives = (fives == 1 ? 0 : 1); } } tspn5 = ''; cspn5 = sz.substring(i); if (cspn5.indexOf("5") >= 0) { if (rmlt == 0 || rmlt2 == 0) { tspn5 = 1; //new 04/28 if (rmlt == 1) { multi8 = cspn5.indexOf("8"); multi9 = cspn5.indexOf("9"); if (multi8 > -1) { tspn5 = (five1 < multi8 ? 1 : 0); if (tspn5 == 0 && fives == 0) { f5 = 0; } } else if (multi9 > -1) { tspn5 = (five1 < multi9 ? 1 : 0); if (tspn5 == 0 && fives == 0) { f5 = 0; } } } } else { five1 = cspn5.indexOf("5"); multi8 = cspn5.indexOf("8"); multi9 = cspn5.indexOf("9"); if (multi8 > -1) { tspn5 = (five1 < multi8 ? 1 : 0); } else { tspn5 = (five1 < multi9 ? 1 : 0); } } } else if (fives == 0) { f5 = 0; } if (f5 == 0 && (czr4 == 5 || (czr4 == 7 && czr45 == 5))) { f5 = 1; f53++; } twra = ''; if (czr2 != 2 && czr2 != 4) { cwdth = 2; twrb = ''; twrc = ''; } else { cwdth = 3; twrb = ''; twrc = ''; } if (czr2 != 7 && czr3 != 7 && czr4 != 7) { if ((czr4 != 5 && f5 == 0) || (!tspn5 && fives == 0)) { cspnafull = 0; if (dq10[jps] != -8 && dq10[jps] != -1.5) { //topbot n1w += ""; cspnhalf = 0; } else { if (cspnhalf == 1 && (mox2 == 1 || dq13.length == jps || dq13.length == jps + 1)) { n1w += "
" + dq14[jps3] + "
" + dq14[jps3] + "
"; if (cspnhalf == 0 && cspnar != 1) { n1w += ''; } if (cspnar != 1) { n1w += "
"; } else { n1w += "
"; } } else { if (cspnhalf == 0) { n1w += ''; } cspnhalf = 1; n1w += ""; } else { if (dq13[jps] && dq13[jps] != 0 && (dq13.length == jps || dq13.length == jps + 1 || !dq13[jps+1] || dq13[jps+1] == 0 || dq13[jps+1] == 2)) { n1w += "
  " + dq9[jps1] + " 
"; n1w += "
"; } if (dq10[jps] != -6 && dq10[jps] != -3.5 && dq10[jps] != -8 && dq10[jps] != -1.5) { if (czr2 != 2 && czr2 != 4) { if (dq9[jps1+1] && dq9[jps1+1] == '
') { cspnar = 1; cspnafull = 4; n1w += ""; } else if (dq9[jps1] != '
') { cspnafull = 2; n1w += ""; } else if (dq9[jps1] == '
') { cspnar = 2; } } else { if (dq9[jps1+1] && dq9[jps1+1] == '
') { cspnar = 1; cspnafull = 6; n1w += ""; } else if (dq9[jps1] != '
') { cspnafull = 3; n1w += ""; } else if (dq9[jps1] == '
') { cspnar = 2; } } } else if (dq10[jps] == -6 || dq10[jps] == -3.5) { algn = (dq10[jps] == -3.5 ? 'center' : 'left'); if (czr2 != 2 && czr2 != 4) { n1w += ""; } else{ n1w += ""; } } else if (dq10[jps] == -8 || dq10[jps] == -1.5) { algn = (dq10[jps] == -1.5 ? 'center' : 'left'); cspnafull = 0; if (czr2 != 2 && czr2 != 4) { n1w += ""; } else { n1w += ""; } } if (cspnafull > 0 && cspnhalf == 0 && cspnar != 2) { n1w += ""; } if (cspnar == 2) { cspnar = 0; } if (!cspnhalf) { //topbot n1w += "
  " + dq9[jps1] + "
  " + dq9[jps1] + "
  " + dq9[jps1] + "
  " + dq9[jps1] + "
" + dq9[jps1] + " 
" + dq9[jps1] + " 
Full 
Full 
"; } if (dq1[jps]) { jpse = jps; } if (czr1 == 1) { for (var j = 0; j < dq1[jpse].length; j++) { var dqlen = (dq2[jps].length >= dq1[jpse].length ? dq2[jps].length : dq1[jpse].length); if (j < dqlen) { radiate1(jps,dq3[jps],j,dq4[jps],dq2[jps],'',twrb,1,dq15[jps],'',''); if (czr2 == 2) { radcheck1(dq5[jps],j,twrc,'','','',jps); } dq3[jps] = ''; } // else { n1w += "" + twra + "" + twrb; } } } else { for (var j = 0; j < dq1[jpse].length; j++) { var dqlen = (dq2[jps].length >= dq1[jpse].length ? dq2[jps].length : dq1[jpse].length); if (j < dqlen) { checkerate1(jps,dq3[jps],j,dq2[jps],'',dq13[jps],'',1,'','','','',''); if (czr2 == 4) { radcheck1(dq5[jps],j,twrc,dq13[jps],'','',jps); } } // else { n1w += "" + twra + "" + twrb; } } } n1w += ""; if ((cspnafull > 0 && cspnhalf == 0 && cspnar != 1) || cspnar == 2) { // if (cspnafull > 0 && cspnhalf == 0 && cspnar != 1) { n1w += "

"; } else { //topbot n1w += ""; n1w += ""; if (cspnhalf == 0) { n1w += ''; } } } } check5 = 1; } else { thar = i; cspn1 = sz.substring(i); tspn1 = ''; if (cspn1.indexOf("5") >= 0) { here = cspn1.indexOf("5"); thar = cspn1; cspn1 = cspn1.substring(0,here); tspn1 = thar.substring(here,here+3); thar = cspn1; check5 = 0; } else { thar = czr1; } //topbot if (!tspn2 && tspn1.indexOf("555") >= 0) { tspn2 = 1; } tspn55 = ''; //topbot if (tspn1.indexOf("555") >= 0) { tspn55 = 1; } if (thar.indexOf("2") < 0 && thar.indexOf("4") < 0) { cspna = 1; cspnb = 2; twrd = ''; } else { cspna = 2; cspnb = 3; twrd = ''; // if (czr2 == 2 && czr2 == 4) { twrd = ''; } else { twrd = ''; cspna = 1; cspnb = 2; } } //tobbotend cspnafull = 0; if (dq10[jps] != -8 && dq10[jps] != -1.5) { // n1w += ""; //tobot if (cspnhalf == 0 && cspnar != 1) { n1w += ''; } if (cspnar != 1) { n1w += "
"; } else { n1w += "
"; } } else { if (cspnhalf == 0) { n1w += ''; } cspnhalf = 1; n1w += ""; } else { if (dq13[jps] && dq13[jps] != 0 && (dq13.length == jps || dq13.length == jps + 1 || !dq13[jps+1] || dq13[jps+1] == 0 || dq13[jps+1] == 2)) { n1w += "
  " + dq9[jps1] + " 
"; n1w += "
"; } if (dq10[jps1] != -8 && dq10[jps1] != -1.5) { if (dq9[jps1+1] && dq9[jps1+1] == '
') { cspnafull = newcspna = (cspna == 2 ? 6 : 4); newcspna2 = (cspna == 2 ? 5 : 3); cspnar = 1; n1w += ""; } else if (dq9[jps1] != '
') { cspnafull = cspna + 1; n1w += ""; } else if (dq9[jps1] == '
') { cspnar = 2; } } else { cspnafull = 0; n1w += ""; } if (cspnafull > 0 && cspnhalf == 0 && cspnar != 2) { n1w += ""; } if (cspnar == 2) { cspnar = 0; } //topbotstart if (!cspnhalf) { //topbot n1w += "
  " + dq9[jps1] + "
  " + dq9[jps1] + "
Full 
"; } if (dq1[jps]) { jpse = jps; } if (czr1 == 1) { for (var j = 0; j < dq1[jpse].length; j++) { var dqlen = (dq2[jps].length >= dq1[jpse].length ? dq2[jps].length : dq1[jpse].length); if (j < dqlen) { radiate1(jps,dq3[jps],j,dq4[jps],dq2[jps],twrd,twrb,1,dq15[jps],'',''); if (czr2 == 2) { radcheck1(dq5[jps],j,twrc,'','','',jps); } dq3[jps] = ''; } } } else { for (var j = 0; j < dq1[jpse].length; j++) { var dqlen = (dq2[jps].length >= dq1[jpse].length ? dq2[jps].length : dq1[jpse].length); if (j < dqlen) { checkerate1(jps,dq3[jps],j,dq2[jps],twrd,dq13[jps],'',1,'','','','',''); if (czr2 == 4) { radcheck1(dq5[jps],j,twrc,dq13[jps],'','',jps); } } } } n1w += ""; if ((cspnafull > 0 && cspnhalf == 0 && cspnar != 1) || cspnar == 2) { // if (cspnafull > 0 && cspnhalf == 0 && cspnar != 1) { n1w += "

"; cspnhalf = 0; } else { if (cspnhalf == 1 && (mox2 == 1 || dq13.length == jps || dq13.length == jps + 1)) { n1w += ""; } else { //topbot n1w += ""; n1w += ""; if (cspnhalf == 0) { n1w += ''; } } } } //topbotend } //sevens } else { if (czr4 != 5 && f5 == 0) { cspnafull = 0; if (dq10[jps] != -8 && dq10[jps] != -1.5) { //topbot n1w += ""; if (cspnhalf == 0) { n1w += ''; } n1w += "
"; } else { if (cspnhalf == 0) { n1w += ''; } cspnhalf = 1; n1w += ""; } else { if (dq13[jps] && dq13[jps] != 0 && (dq13.length == jps || dq13.length == jps + 1 || !dq13[jps+1] || dq13[jps+1] == 0 || dq13[jps+1] == 2)) { n1w += "
  " + dq9[jps1] + " 
"; n1w += "
"; } if (dq10[jps] != -6 && dq10[jps] != -3.5 && dq10[jps] != -8 && dq10[jps] != -1.5) { if (czr2 != 2 && czr2 != 4) { cspnafull = 2; n1w += ""; } else { cspnafull = 3; n1w += ""; } } else if (dq10[jps] == -6 || dq10[jps] == -3.5) { algn = (dq10[jps] == -3.5 ? 'center' : 'left'); if (czr2 != 2 && czr2 != 4) { n1w += ""; } else{ n1w += ""; } } else if (dq10[jps] == -8 || dq10[jps] == -1.5) { algn = (dq10[jps] == -1.5 ? 'center' : 'left'); cspnafull = 0; if (czr2 != 2 && czr2 != 4) { n1w += ""; } else { n1w += ""; } } if (cspnafull > 0 && cspnhalf == 0) { n1w += ""; } if (!cspnhalf) { //topbot n1w += "
  " + dq9[jps1] + "
  " + dq9[jps1] + "
" + dq9[jps1] + " 
" + dq9[jps1] + " 
Full 
Full 
"; } if (dq1[jps]) { jpse = jps; } if (czr4 != 7) { if (czr1 == 1) { for (var j = 0; j < dq1[jpse].length; j++) { var dqlen = (dq2[jps].length >= dq1[jpse].length ? dq2[jps].length : dq1[jpse].length); if (j < dqlen) { radiate2(jps,dq3[jps],j,dq4[jps],dq2[jps],dq6[jps],dq7[jps],'',twrb,1,dq15[jps],'',''); if (czr2 == 2) { radcheck1(dq5[jps],j,twrc,'','','',jps); } dq3[jps] = ''; } // else { n1w += "" + twra + "" + twrb; } } } else { for (var j = 0; j < dq1[jpse].length; j++) { var dqlen = (dq2[jps].length >= dq1[jpse].length ? dq2[jps].length : dq1[jpse].length); if (j < dqlen) { checkerate2(jps,dq3[jps],j,dq2[jps],dq6[jps],dq7[jps],dq8[jps],'',twrb,1,'','','','',''); if (czr2 == 4) { radcheck1(dq5[jps],j,twrc,'','','',jps); } } // else { n1w += "" + twra + "" + twrb; } } } } else { if (czr1 == 1) { for (var j = 0; j < dq1[jpse].length; j++) { var dqlen = (dq2[jps].length >= dq1[jpse].length ? dq2[jps].length : dq1[jpse].length); if (j < dqlen) { radiate4(jps,dq3[jps],j,dq4[jps],dq2[jps],dq6[jps],dq7[jps],'',twrb,1,dq15[jps],'',''); if (czr2 == 2) { radcheck1(dq5[jps],j,twrc,'','','',jps); } dq3[jps] = ''; } // else { n1w += "" + twra + "" + twrb; } } } else { for (var j = 0; j < dq1[jpse].length; j++) { var dqlen = (dq2[jps].length >= dq1[jpse].length ? dq2[jps].length : dq1[jpse].length); if (j < dqlen) { checkerate2(jps,dq3[jps],j,dq2[jps],dq6[jps],dq7[jps],dq8[jps],'',twrb,1,'','','','',''); if (czr2 == 4) { radcheck1(dq5[jps],j,twrc,'','','',jps); } } // else { n1w += "" + twra + "" + twrb; } } } } n1w += ""; if (cspnafull > 0 && cspnhalf == 0) { n1w += "

"; cspnhalf = 0; } else { if (cspnhalf == 1 && (mox2 == 1 || dq13.length == jps || dq13.length == jps + 1)) { n1w += ""; } else { //topbot n1w += ""; n1w += ""; if (cspnhalf == 0) { n1w += ''; } } } } check5 = 1; } else { thar = i; cspn1 = sz.substring(i); tspn1 = ''; if (cspn1.indexOf("5") >= 0) { here = cspn1.indexOf("5"); thar = cspn1; cspn1 = cspn1.substring(0,here); tspn1 = thar.substring(here,here+3); check5 = 0; } else { thar = cspn1; } //topbot if (!tspn2 && tspn1.indexOf("555") >= 0) { tspn2 = 1; } tspn55 = ''; //topbot if (tspn1.indexOf("555") >= 0) { tspn55 = 1; } if (thar.indexOf("2") < 0 && thar.indexOf("4") < 0) { cspna = 1; cspnb = 2; twrd = ''; } else { cspna = 2; cspnb = 3; twrd = ''; // if (czr2 == 2 && czr2 == 4) { twrd = ''; } else { twrd = ''; cspna = 1; cspnb = 2; } } cspnafull = 0; if (dq10[jps] != -8 && dq10[jps] != -1.5) { // n1w += ""; //tobot if (cspnhalf == 0) { n1w += ''; } n1w += "
"; } else { if (cspnhalf == 0) { n1w += ''; } cspnhalf = 1; n1w += ""; } else { if (dq13[jps] && dq13[jps] != 0 && (dq13.length == jps || dq13.length == jps + 1 || !dq13[jps+1] || dq13[jps+1] == 0 || dq13[jps+1] == 2)) { n1w += "
  " + dq9[jps1] + " 
"; n1w += "
"; } if (dq10[jps1] != -8 && dq10[jps1] != -1.5) { cspnafull = cspna + 1; n1w += ""; } else { cspnafull = cspna + 1; n1w += ""; } if (cspnafull > 0 && cspnhalf == 0) { n1w += ""; } //topbotstart if (!cspnhalf) { //topbot n1w += "
  " + dq9[jps1] + "
Full 
"; } if (dq1[jps]) { jpse = jps; } if (czr4 != 7) { if (czr1 == 1) { for (var j = 0; j < dq1[jpse].length; j++) { var dqlen = (dq2[jps].length >= dq1[jpse].length ? dq2[jps].length : dq1[jpse].length); if (j < dqlen) { radiate2(jps,dq3[jps],j,dq4[jps],dq2[jps],dq6[jps],dq7[jps],twrd,twrb,1,dq15[jps],'',''); if (czr2 == 2) { radcheck1(dq5[jps],j,twrc,'','','',jps); } dq3[jps] = ''; } // else { n1w += "" + twra + "" + twrb; } } } else { for (var j = 0; j < dq1[jpse].length; j++) { var dqlen = (dq2[jps].length >= dq1[jpse].length ? dq2[jps].length : dq1[jpse].length); if (j < dqlen) { checkerate2(jps,dq3[jps],j,dq2[jps],dq6[jps],dq7[jps],dq8[jps],twrd,twrb,1,'','','','',''); if (czr2 == 4) { radcheck1(dq5[jps],j,twrc,'','','',jps); } } } } } else { if (czr1 == 1) { for (var j = 0; j < dq1[jpse].length; j++) { var dqlen = (dq2[jps].length >= dq1[jpse].length ? dq2[jps].length : dq1[jpse].length); if (j < dqlen) { radiate4(jps,dq3[jps],j,dq4[jps],dq2[jps],dq6[jps],dq7[jps],twrd,twrb,1,dq15[jps],'',''); if (czr2 == 2) { radcheck1(dq5[jps],j,twrc,'','','',jps); } dq3[jps] = ''; } } } else { for (var j = 0; j < dq1[jpse].length; j++) { var dqlen = (dq2[jps].length >= dq1[jpse].length ? dq2[jps].length : dq1[jpse].length); if (j < dqlen) { checkerate2(jps,dq3[jps],j,dq2[jps],dq6[jps],dq7[jps],dq8[jps],twrd,twrb,1,'','','','',''); if (czr2 == 4) { radcheck1(dq5[jps],j,twrc,'','','',jps); } } } } } n1w += ""; if (cspnafull > 0 && cspnhalf == 0) { n1w += "

"; cspnhalf = 0; } else { if (cspnhalf == 1 && (mox2 == 1 || dq13.length == jps || dq13.length == jps + 1)) { n1w += ""; } else { //topbot n1w += ""; n1w += ""; if (cspnhalf == 0) { n1w += ''; } } } } } } jps++; jps1++; if (mox2) { i = twend; //new 04/28 n1w += "
"; // n1w += "
"; n1w += ""; cbr5 = 1; } } else { in8 = (r8e != 1 ? 0 : 1); in5 = 0; if (i == 0) { if (r9e == 1 || r8e == 1) { sbm2 = sz.substring(sz2,sz.length); if (sbm2.indexOf("5") == -1) { i = sz.length; } else { in5 = 1; } } } else { if (r9e == 1 || r8e == 1) { sbm2 = sz.substring(sz2,sz.length); if (sz2 > 0 && sbm2.indexOf("5") == -1) { i = sz.length; } else if (sz2 <= 0 && sbm && sbm.indexOf("5") == -1) { id5 = 0; } else { in5 = 1; } // if ((sz2 > 0 && sbm2.indexOf("5") == -1) || (sz2 <= 0 && sbm.indexOf("5") == -1)) { // i = sz.length; // } else { // in5 = 1; // } } else { i = sz.length; } } jout = jslimmer2(sbm,1,in8,in5,code2); if (in5 == 1) { // i = sz2 + 1; if (jout != 0) { //new 04/28 n1w += "

"; // n1w += "
"; n1w += ""; cbr5 = 1; } i += jout; } else { i += jout; } } } n1w += '
'; //sixes } else { // n1w += ''; for (var i = 0; i < sz.length; i++) { czr1 = sz.charAt(i); czr4 = (sz.length > i - 1 ? sz.charAt(i-1) : -1); czr45 = (sz.length > i - 2 ? sz.charAt(i-2) : -1); if (rmlt == 1) { if (i == 0 || (i > 1 && czr4 >= 8)) { place = (i != 0 ? i : 1); sz2 = 0; sbm = sz.substring(place,sz.length); if (r9e == 1) { sz2 = sbm.indexOf("9"); } else if (r8e == 1) { sz2 = sbm.indexOf("8"); } if (sz2 >= 0) { sbm = sbm.substring(0,sz2); } if (sbm.indexOf("5") >= 0) { subfive = 1; } else { subfive = 0; } } } else { subfive = 1; } if (subfive == 1) { if (czr1 != 1 && czr1 != 3) { continue; } czr2 = (sz.length > i + 1 ? sz.charAt(i+1) : -1); czr3 = (sz.length > i + 2 ? sz.charAt(i+2) : -1); mox2 = 0; if (rmlt == 1) { czr5 = (sz.length > i + 3 ? sz.charAt(i+3) : -1); czr8 = (i > 1 ? sz.charAt(i-2) : -1); if (czr2 >= 8 || czr3 >= 8 || czr5 >= 8) { if (czr2 >= 8) { mox2 = 1; twend = i; } else if (czr3 >= 8 && czr2 != 1 && czr2 != 3) { mox2 = 1; // twend = (czr2 == 2 || czr2 == 4 ? i + 1 : -1); twend = (czr2 == 2 || czr2 == 4 || czr2 == 5 ? i + 1 : -1); } else if (czr5 >= 8 && czr2 != 1 && czr2 != 3 && czr3 != 1 && czr3 != 3) { mox2 = 1; twend = (czr2 == 2 || czr2 == 4 ? i + 1 : -1); } } if (czr4 == 8 || czr8 == 8) { fives = f5 = f52 = f53 = check5 = cbr5 = tspn2 = 0; czr6 = 0; for (var j = i+1; j < sz.length; j++) { czr7 = sz.charAt(j); if (czr7 == 8) { break; } if (czr7 == 1 || czr7 == 3) { czr6 += 2; } else if (czr7 == 2 || czr7 == 4) { czr6 += 1; } } if (cbr5 == 1) { n1w += "" + dq14[jps3] + ""; } else { n1w += "" + dq14[jps3] + ""; } jps3++; } else if (czr4 == 9 || czr8 == 9) { if (cbr5 == 1) { n1w += ''; } fives = f5 = f52 = f53 = check5 = cbr5 = tspn2 = 0; } } if (czr4 == 5 || (czr4 == 6 && czr45 == 5)) { if (i > 2) { tspn55 = sz.substring(i-3,i); if (tspn55.indexOf("555") == -1) { fives = (fives == 1 ? 0 : 1); } } else { fives = (fives == 1 ? 0 : 1); } } tspn5 = ''; cspn5 = sz.substring(i); if (cspn5.indexOf("5") >= 0) { if (rmlt == 0) { tspn5 = 1; } else { five1 = cspn5.indexOf("5"); multi8 = cspn5.indexOf("8"); multi9 = cspn5.indexOf("9"); if (multi8 > -1) { tspn5 = (five1 < multi8 ? 1 : 0); } else { tspn5 = (five1 < multi9 ? 1 : 0); } } } else if (f53 != 1) { f5 = 0; } if (f5 == 0 && (czr4 == 5 || (czr4 == 6 && czr45 == 5))) { f5 = 1; f53++; } twra = ''; if (czr2 != 2 && czr2 != 4) { cwdth = 2; twrb = ''; twrc = ''; } else { cwdth = 3; twrb = ''; twrc = ''; } if (czr2 != 7 && czr3 != 7 && czr4 != 7) { if ((czr4 != 5 && f5 == 0) || (!tspn5 && fives == 0)) { if (dq10[jps] != -8 && dq10[jps] != -1.5) { //topbot n1w += ""; if (cspnhalf == 0 && cspnar != 1) { n1w += ''; } if (cspnar != 1) { n1w += "
"; } else { n1w += "
"; } } else { if (cspnhalf == 0) { n1w += ''; } cspnhalf = 1; n1w += ""; } else { if (dq13[jps] && dq13[jps] != 0 && (dq13.length == jps || dq13.length == jps + 1 || !dq13[jps+1] || dq13[jps+1] == 0 || dq13[jps+1] == 2)) { n1w += "
  " + dq9[jps1] + " 
"; n1w += "
"; } if (dq10[jps] != -6 && dq10[jps] != -3.5 && dq10[jps] != -8 && dq10[jps] != -1.5) { if (czr2 != 2 && czr2 != 4) { if (dq9[jps1+1] && dq9[jps1+1] == '
') { cspnar = 1; cspnafull = 4; n1w += ""; } else if (dq9[jps1] != '
') { cspnafull = 2; n1w += ""; } else if (dq9[jps1] == '
') { cspnar = 2; } } else { if (dq9[jps1+1] && dq9[jps1+1] == '
') { cspnar = 1; cspnafull = 6; n1w += ""; } else if (dq9[jps1] != '
') { cspnafull = 3; n1w += ""; } else if (dq9[jps1] == '
') { cspnar = 2; } } } else if (dq10[jps] == -6 || dq10[jps] == -3.5) { algn = (dq10[jps] == -3.5 ? 'center' : 'left'); if (czr2 != 2 && czr2 != 4) { n1w += ""; } else{ n1w += ""; } } else if (dq10[jps] == -8 || dq10[jps] == -1.5) { algn = (dq10[jps] == -1.5 ? 'center' : 'left'); cspnafull = 0; if (czr2 != 2 && czr2 != 4) { n1w += ""; } else { n1w += ""; } } if (cspnafull > 0 && cspnhalf == 0 && cspnar != 2) { n1w += ""; } if (cspnar == 2) { cspnar = 0; } if (!cspnhalf) { //topbot n1w += "
  " + dq9[jps1] + "
  " + dq9[jps1] + "
  " + dq9[jps1] + "
  " + dq9[jps1] + "
" + dq9[jps1] + " 
" + dq9[jps1] + " 
Full 
Full 
"; } if (dq1[jps]) { jpse = jps; } //withsubs if (!dq11[jps]) { if (czr1 == 1) { for (var j = 0; j < dq1[jpse].length; j++) { var dqlen = (dq2[jps].length >= dq1[jpse].length ? dq2[jps].length : dq1[jpse].length); if (j < dqlen) { radiate1(jps,dq3[jps],j,dq4[jps],dq2[jps],'',twrb,1,dq15[jps],'',''); if (czr2 == 2) { radcheck1(dq5[jps],j,twrc,'','','',jps); } dq3[jps] = ''; } // else { n1w += "" + twra + "" + twrb; } } } else { for (var j = 0; j < dq1[jpse].length; j++) { var dqlen = (dq2[jps].length >= dq1[jpse].length ? dq2[jps].length : dq1[jpse].length); if (j < dqlen) { checkerate1(jps,dq3[jps],j,dq2[jps],'',dq13[jps],twrb,1,'','','','',''); if (czr2 == 4) { radcheck1(dq5[jps],j,twrc,dq13[jps],'','',jps); } } // else { n1w += "" + twra + "" + twrb; } } } } else { for (var j = 0; j < dq1[jpse].length; j++) { var dqlen = (dq2[jps].length >= dq1[jpse].length ? dq2[jps].length : dq1[jpse].length); if (j < dqlen) { checkerate3(jps,dq3[jps],j,dq2[jps],dq6[jps],dq11[jps],dq12[jps],dq13[jps],twrb,'','','','','',''); } // else { n1w += "" + twra + "" + twrb; } } } n1w += ""; if ((cspnafull > 0 && cspnhalf == 0 && cspnar != 1) || cspnar == 2) { // if (cspnafull > 0 && cspnhalf == 0 && cspnar != 1) { n1w += "

"; cspnhalf = 0; } else { if (cspnhalf == 1 && (mox2 == 1 || dq13.length == jps || dq13.length == jps + 1)) { n1w += ""; } else { //topbot n1w += ""; n1w += ""; if (cspnhalf == 0) { n1w += ''; } } } } } else { thar = i; cspn1 = sz.substring(i); tspn1 = ''; var cspn111; if (cspn1.indexOf("5") >= 0) { here = cspn1.indexOf("5"); thar = cspn1; cspn1 = cspn1.substring(0,here); tspn1 = thar.substring(here,here+3); thar = cspn1; } else { thar = czr1; } if (!tspn2 && tspn1.indexOf("555") >= 0) { tspn2 = 1; } tspn55 = ''; if (tspn1.indexOf("555") >= 0) { tspn55 = 1; } if (thar.indexOf("2") < 0 && thar.indexOf("4") < 0) { cspna = 1; cspnb = 2; twrd = ''; } else { cspna = 2; cspnb = 3; twrd = ''; // if (czr2 == 2 && czr2 == 4) { twrd = ''; } else { twrd = ''; cspna = 1; cspnb = 2; } // if (czr2 == 2 && czr2 == 4) { twrd = ''; } else { twrd = ''; cspna = 2; cspnb = 3; } } cspnafull = 0; if (dq10[jps] != -8 && dq10[jps] != -1.5) { // n1w += ""; //topbot if (cspnhalf == 0 && cspnar != 1) { n1w += ''; } if (cspnar != 1) { n1w += "
"; } else { n1w += "
"; } } else { if (cspnhalf == 0) { n1w += ''; } cspnhalf = 1; n1w += ""; } else { if (dq13[jps] && dq13[jps] != 0 && (dq13.length == jps || dq13.length == jps + 1 || !dq13[jps+1] || dq13[jps+1] == 0 || dq13[jps+1] == 2)) { n1w += "
  " + dq9[jps1] + " 
"; n1w += "
"; } if (dq10[jps1] != -8 && dq10[jps1] != -1.5) { if (dq9[jps1+1] && dq9[jps1+1] == '
') { cspnafull = newcspna = (cspna == 2 ? 6 : 4); newcspna2 = (cspna == 2 ? 5 : 3); cspnar = 1; n1w += ""; // + twrb; } else if (dq9[jps1] != '
') { cspnafull = cspna + 1; if (cspnhalf == 0) { n1w += ""; // + twrb; } else { if (dq10[jps1] == 0) { n1w += ""; // + twrb; // n1w += ""; // + twrb; } else { n1w += ""; // + twrb; // n1w += ""; // + twrb; } } } else if (dq9[jps1] == '
') { cspnar = 2; } } else { cspnafull = 0; n1w += ""; // " + twrb; } if (cspnafull > 0 && cspnhalf == 0 && cspnar != 2) { n1w += ""; } if (cspnar == 2) { cspnar = 0; } //topbotstart if (!cspnhalf) { //topbot n1w += "
  " + dq9[jps1] + "
  " + dq9[jps1] + "
" + dq9[jps1] + "
" + dq9[jps1] + "
" + dq9[jps1] + "
" + dq9[jps1] + "
Full 
"; } if (dq1[jps]) { jpse = jps; } if (!dq11[jps]) { if (czr1 == 1) { for (var j = 0; j < dq1[jpse].length; j++) { var dqlen = (dq2[jps].length >= dq1[jpse].length ? dq2[jps].length : dq1[jpse].length); if (j < dqlen) { radiate1(jps,dq3[jps],j,dq4[jps],dq2[jps],twrd,twrb,1,dq15[jps],'',''); if (czr2 == 2) { radcheck1(dq5[jps],j,twrc,'','','',jps); } dq3[jps] = ''; } } } else { for (var j = 0; j < dq1[jpse].length; j++) { var dqlen = (dq2[jps].length >= dq1[jpse].length ? dq2[jps].length : dq1[jpse].length); if (j < dqlen) { checkerate1(jps,dq3[jps],j,dq2[jps],twrd,dq13[jps],twrb,1,'','','','',''); if (czr2 == 4) { radcheck1(dq5[jps],j,twrc,dq13[jps],'','',jps); } } } } } else { for (var j = 0; j < dq1[jpse].length; j++) { var dqlen = (dq2[jps].length >= dq1[jpse].length ? dq2[jps].length : dq1[jpse].length); if (j < dqlen) { checkerate3(jps,dq3[jps],j,dq2[jps],dq6[jps],dq11[jps],dq12[jps],dq13[jps],twrb,1,'','','','',''); } } } n1w += "" + twrb; if ((cspnafull > 0 && cspnhalf == 0 && cspnar != 1) || cspnar == 2) { // if (cspnafull > 0 && cspnhalf == 0 && cspnar != 1) { n1w += "

"; cspnhalf = 0; } else { if (cspnhalf == 1 && (mox2 == 1 || dq13.length == jps || dq13.length == jps + 1)) { n1w += ""; } else { //topbot n1w += ""; n1w += ""; if (cspnhalf == 0) { n1w += ''; } } } } } //sevens } else { if (czr4 != 5 && f5 == 0) { //topbot n1w += ""; n1w += ""; n1w += "
"; if (czr2 != 2 && czr2 != 4) { cspnafull = 2; n1w += ""; } else { cspnafull = 3; n1w += ""; } if (cspnafull > 0 && cspnhalf == 0) { n1w += ""; } //topbot n1w += "
  " + dq9[jps1] + "
  " + dq9[jps1] + "
"; } if (dq1[jps]) { jpse = jps; } if (czr4 != 7) { if (czr1 == 1) { for (var j = 0; j < dq1[jpse].length; j++) { var dqlen = (dq2[jps].length >= dq1[jpse].length ? dq2[jps].length : dq1[jpse].length); if (j < dqlen) { radiate2(jps,dq3[jps],j,dq4[jps],dq2[jps],dq6[jps],dq7[jps],'',twrb,1,dq15[jps],'',''); if (czr2 == 2) { radcheck1(dq5[jps],j,twrc,'','','',jps); } dq3[jps] = ''; } } } else { for (var j = 0; j < dq1[jpse].length; j++) { var dqlen = (dq2[jps].length >= dq1[jpse].length ? dq2[jps].length : dq1[jpse].length); if (j < dqlen) { checkerate2(jps,dq3[jps],j,dq2[jps],dq6[jps],dq7[jps],dq8[jps],'',twrb,1,'','','','',''); if (czr2 == 4) { radcheck1(dq5[jps],j,twrc,'','','',jps); } } } } } else { if (czr1 == 1) { for (var j = 0; j < dq1[jpse].length; j++) { var dqlen = (dq2[jps].length >= dq1[jpse].length ? dq2[jps].length : dq1[jpse].length); if (j < dqlen) { radiate4(jps,dq3[jps],j,dq4[jps],dq2[jps],dq6[jps],dq7[jps],'',twrb,1,dq15[jps],'',''); if (czr2 == 2) { radcheck1(dq5[jps],j,twrc,'','','',jps); } dq3[jps] = ''; } } } else { for (var j = 0; j < dq1[jpse].length; j++) { var dqlen = (dq2[jps].length >= dq1[jpse].length ? dq2[jps].length : dq1[jpse].length); if (j < dqlen) { checkerate2(jps,dq3[jps],j,dq2[jps],dq6[jps],dq7[jps],dq8[jps],'',twrb,1,'','','','',''); if (czr2 == 4) { radcheck1(dq5[jps],j,twrc,'','','',jps); } } } } } n1w += ""; if (cspnafull > 0 && cspnhalf == 0) { n1w += "

"; } else { thar = i; cspn1 = sz.substring(i); tspn1 = ''; if (cspn1.indexOf("5") >= 0) { here = cspn1.indexOf("5"); thar = cspn1; cspn1 = cspn1.substring(0,here); tspn1 = thar.substring(here,here+3); } else { thar = cspn1; } //topbot if (!tspn2 && tspn1.indexOf("555") >= 0) { tspn2 = 1; } tspn55 = ''; //topbot if (tspn1.indexOf("555") >= 0) { tspn55 = 1; } if (thar.indexOf("2") < 0 && thar.indexOf("4") < 0) { cspna = 1; cspnb = 2; twrd = ''; } else { cspna = 2; cspnb = 3; twrd = ''; // if (czr2 == 2 && czr2 == 4) { twrd = ''; } else { twrd = ''; cspna = 1; cspnb = 2; } } cspnafull = 0; if (dq10[jps] != -8 && dq10[jps] != -1.5) { // n1w += ""; //topbot if (cspnhalf == 0) { n1w += ''; } n1w += "
"; } else { if (cspnhalf == 0) { n1w += ''; } cspnhalf = 1; n1w += ""; } else { if (dq13[jps] && dq13[jps] != 0 && (dq13.length == jps || dq13.length == jps + 1 || !dq13[jps+1] || dq13[jps+1] == 0 || dq13[jps+1] == 2)) { n1w += "
  " + dq9[jps1] + " 
"; n1w += "
"; } if (dq10[jps1] != -8 && dq10[jps1] != -1.5) { cspnafull = cspna + 1; n1w += ""; // + twrb; } else { cspnafull = 0; n1w += ""; } if (cspnafull > 0 && cspnhalf == 0) { n1w += ""; } //topbotstart if (!cspnhalf) { //topbot n1w += "
  " + dq9[jps1] + "
Full 
"; } if (dq1[jps]) { jpse = jps; } if (czr4 != 7) { if (czr1 == 1) { for (var j = 0; j < dq1[jpse].length; j++) { var dqlen = (dq2[jps].length >= dq1[jpse].length ? dq2[jps].length : dq1[jpse].length); if (j < dqlen) { radiate2(jps,dq3[jps],j,dq4[jps],dq2[jps],dq6[jps],dq7[jps],twrd,twrb,1,dq15[jps],'',''); if (czr2 == 2) { radcheck1(dq5[jps],j,twrc,'','','',jps); } dq3[jps] = ''; } } } else { for (var j = 0; j < dq1[jpse].length; j++) { var dqlen = (dq2[jps].length >= dq1[jpse].length ? dq2[jps].length : dq1[jpse].length); if (j < dqlen) { checkerate2(jps,dq3[jps],j,dq2[jps],dq6[jps],dq7[jps],dq8[jps],twrd,twrb,1,'','','','',''); if (czr2 == 4) { radcheck1(dq5[jps],j,twrc,'','','',jps); } } } } } else { if (czr1 == 1) { for (var j = 0; j < dq1[jpse].length; j++) { var dqlen = (dq2[jps].length >= dq1[jpse].length ? dq2[jps].length : dq1[jpse].length); if (j < dqlen) { radiate4(jps,dq3[jps],j,dq4[jps],dq2[jps],dq6[jps],dq7[jps],twrd,twrb,1,dq15[jps],'',''); if (czr2 == 2) { radcheck1(dq5[jps],j,twrc,'','','',jps); } dq3[jps] = ''; } } } else { for (var j = 0; j < dq1[jpse].length; j++) { var dqlen = (dq2[jps].length >= dq1[jpse].length ? dq2[jps].length : dq1[jpse].length); if (j < dqlen) { checkerate2(jps,dq3[jps],j,dq2[jps],dq6[jps],dq7[jps],dq8[jps],twrd,twrb,1,'','','','',''); if (czr2 == 4) { radcheck1(dq5[jps],j,twrc,'','','',jps); } } } } } n1w += ""; if (cspnafull > 0 && cspnhalf == 0) { n1w += "

"; cspnhalf = 0; } else { if (cspnhalf == 1 && (mox2 == 1 || dq13.length == jps || dq13.length == jps + 1)) { n1w += ""; } else { //topbot n1w += ""; n1w += ""; if (cspnhalf == 0) { n1w += ''; } } } } } } jps++; jps1++; if (mox2) { i = twend; //new 04/28 n1w += "
"; // n1w += "
"; n1w += ""; cbr5 = 1; // break; } } else { in8 = (r8e != 1 ? 0 : 1); in5 = 0; if (i == 0) { if (r9e == 1 || r8e == 1) { sbm2 = sz.substring(sz2,sz.length); if (sbm2.indexOf("5") == -1) { i = sz.length; } else { in5 = 1; } } } else { if (r9e == 1 || r8e == 1) { sbm2 = sz.substring(sz2,sz.length); if (sz2 > 0 && sbm2.indexOf("5") == -1) { i = sz.length; } else if (sz2 <= 0 && sbm && sbm.indexOf("5") == -1) { id5 = 0; } else { in5 = 1; } // if ((sz2 > 0 && sbm2.indexOf("5") == -1) || (sz2 <= 0 && sbm.indexOf("5") == -1)) { // i = sz.length; // } else { // in5 = 1; // } } else { i = sz.length; } } jout = jslimmer2(sbm,1,in8,in5,code2); if (in5 == 1) { // i = sz2 + 1; if (jout != 0) { //new 04/28 n1w += "

"; // n1w += "
"; n1w += ""; cbr5 = 1; } i += jout; } else { i += jout; } } } } } function jslimmer2(sz,inout,in8,in5,code2) { var f5 = f52 = f53 = pricon = 0; var rgen = 0; var rmlt = 0; var r9e = 0; var r8e = 0; var r5e = 0; var r6e = 0; var dq20null = ''; var cspn1, cspna, cspnb, cspnc, cwdth, czr1, czr2, czr3, czr4, czr5, czr6, czr7, here, mox, mox1, mox2, thar, tspn1, tspn2, twra, twrb, twrc, twend, tline, cspnhalf, cspnafull, cspnar; cspnhalf = 0; cspnafull = 0; cspnar = 0; if (in5 == null) { in5 = 0; } sz = "" + sz; if (sz.indexOf("9") >= 0) { rgen = rmlt = r9e = 1; } if (sz.indexOf("8") >= 0) { rgen = rmlt = r8e = 1; } if (sz.indexOf("6") >= 0) { rgen = r6e = 1; } if (sz.indexOf("5") >= 0) { rgen = r5e = 1; } if (rmlt == 0) { twend = sz.lastIndexOf("1"); if (sz.lastIndexOf("2") > twend) { twend = sz.lastIndexOf("2"); } if (sz.lastIndexOf("3") > twend) { twend = sz.lastIndexOf("3"); } if (sz.lastIndexOf("4") > twend) { twend = sz.lastIndexOf("4"); } } td1 = (sz.length != 1 ? '' : ''); var jps10 = pls2 = pls4 = jstart = jps1 = jps; var czr1a = jps11 = 0; if (inout == null || !inout) { inout = 0; } if (inout == 1) { for (var j = 0; j < sz.length; j++) { czr1a = sz.charAt(j); if (czr1a != 1 && czr1a != 3) { continue; } jps10++; jps11++; } } var jout = loops = looper = pls22 = pls44 = pls3 = offnine = 0; if (r6e == 0) { for (var i = jstart; i < dq1.length; i++) { if (!dq1[i]) { continue; } tline = ''; offnine = 0; if (in5 == 1 && pls44 == jps11) { break; } // if (in5 == 1 && jps >= sz.length) { break; } for (var j = loops; j < sz.length; j++) { czr1 = sz.charAt(j); if ((rmlt == 1 && czr1 >= 8) || in8 == 1) { if (offnine == 1) { break; } if (offnine == 0) { offnine = 1 ; } if (czr1 == 8 || in8 == 1) { czr6 = 0; for (var k = j+1; k < sz.length; k++) { czr7 = sz.charAt(k); if (czr7 == 8) { break; } if (czr7 == 1 || czr7 == 3) { czr6 += 2; } else if (czr7 == 2 || czr7 == 4) { czr6 += 1; } } n1w += ""; jps3++; if (j == 0) { in8 = 0; } } } } // n1w += ''; for (var j = loops; j < sz.length; j++) { jout = j; czr1 = sz.charAt(j); if (czr1 != 1 && czr1 != 3) { continue; } pls3++; czr2 = (sz.length > j + 1 ? sz.charAt(j+1) : -1); czr3 = (sz.length > j + 2 ? sz.charAt(j+2) : -1); czr4 = (sz.length > j - 1 ? sz.charAt(j-1) : -1); mox2 = 0; if (rmlt == 1) { twend = -1; czr5 = (sz.length > j + 3 ? sz.charAt(j+3) : -1); if (czr2 >= 8 || czr3 >= 8 || czr5 >= 8) { if (czr2 >= 8) { looper = j + 1; mox2 = 1; twend = j; } else if (czr3 >= 8 && czr2 != 1 && czr2 != 3) { looper = j + 2; mox2 = 1; // twend = (czr2 == 2 || czr2 == 4 ? j + 1 : -1); twend = (czr2 == 2 || czr2 == 4 || czr2 == 5 ? j + 1 : -1); } else if (czr5 >= 8 && czr2 != 1 && czr2 != 3 && czr3 != 1 && czr3 != 3) { looper = j + 3; mox2 = 1; twend = (czr2 == 2 || czr2 == 4 ? j + 1 : -1); } } } twrd = (pls22 == 0 ? 1 : 0); twra = ''; if (czr2 != 2 && czr2 != 4) { cwdth = 2; twrb = ''; twrc = ''; } else { cwdth = 3; twrb = ''; twrc = ''; } cspnafull = 0; if (inout == 1 && !dq2[jps]) { break; } if (czr2 != 7 && czr3 != 7 && czr4 != 7) { if (dq10[jps] != -8 && dq10[jps] != -1.5) { //topbot n1w += ""; cspnhalf = 0; } else { if (cspnhalf == 1 && (mox2 == 1 || dq13.length == jps || dq13.length == jps + 1)) { n1w += "
" + dq14[jps3] + "
"; if (cspnhalf == 0 && cspnar != 1) { n1w += ''; } if (cspnar != 1) { n1w += "
"; } else { n1w += "
"; } // n1w += "
"; } else { if (cspnhalf == 0) { n1w += ''; } cspnhalf = 1; n1w += ""; } else { n1w += "
  " + dq9[jps1] + " 
"; if (cspnar != 1) { n1w += "
"; } if (dq10[jps] != -6 && dq10[jps] != -3.5 && dq10[jps] != -8 && dq10[jps] != -1.5) { if (czr2 != 2 && czr2 != 4) { if (dq9[jps1+1] && dq9[jps1+1] == '
') { cspnar = 1; cspnafull = 4; n1w += ""; } else if (dq9[jps1] != '
') { cspnafull = 2; n1w += ""; } else if (dq9[jps1] == '
') { cspnar = 2; } } else { if (dq9[jps1+1] && dq9[jps1+1] == '
') { cspnar = 1; cspnafull = 6; n1w += ""; } else if (dq9[jps1] != '
') { cspnafull = 3; n1w += ""; } else if (dq9[jps1] == '
') { cspnar = 2; } } } else if (dq10[jps] == -6 || dq10[jps] == -3.5) { algn = (dq10[jps] == -3.5 ? 'center' : 'left'); if (czr2 != 2 && czr2 != 4) { n1w += ""; } else{ n1w += ""; } } else if (dq10[jps] == -8 || dq10[jps] == -1.5) { algn = (dq10[jps] == -1.5 ? 'center' : 'left'); cspnafull = 0; if (czr2 != 2 && czr2 != 4) { n1w += ""; } else { n1w += ""; } } if (cspnafull > 0 && cspnhalf == 0 && cspnar != 2) { n1w += ""; } if (cspnar == 2) { cspnar = 0; } if (!cspnhalf) { //topbot n1w += "
  " + dq9[jps1] + "
  " + dq9[jps1] + "
  " + dq9[jps1] + "
  " + dq9[jps1] + "
" + dq9[jps1] + " 
" + dq9[jps1] + " 
Full 
Full 
"; } if (czr1 == 1) { if (dq2[jps]) { for (var k = 0; k < dq2[jps].length; k++) { if (k < dq2[jps].length) { radiate1(jps,dq3[jps],k,dq4[jps],dq2[jps],'',twrb,1,dq15[jps],'',''); if (czr2 == 2) { radcheck1(dq5[jps],k,twrc,'','','',jps); } dq3[jps] = ''; } } } } else { if (dq2[jps]) { for (var k = 0; k < dq2[jps].length; k++) { if (k < dq2[jps].length) { checkerate1(jps,dq3[jps],k,dq2[jps],'',dq13[jps],'',1,'','','','',''); if (czr2 == 4) { radcheck1(dq5[jps],k,twrc,dq13[jps],'','',jps); } } } } } n1w += ""; if ((cspnafull > 0 && cspnhalf == 0 && cspnar != 1) || cspnar == 2) { n1w += "

"; } } else { if (dq13[jps] && dq13[jps] != 0 && (dq13.length == jps || dq13.length == jps + 1 || !dq13[jps+1] || dq13[jps+1] == 0 || dq13[jps+1] == 2)) { n1w += "
"; } else { //topbot n1w += ""; n1w += ""; if (cspnhalf == 0) { n1w += ''; } } } } //sevens } else { if (dq10[jps] != -8 && dq10[jps] != -1.5) { //topbot n1w += ""; if (cspnhalf == 0) { n1w += ''; } n1w += "
"; } else { if (cspnhalf == 0) { n1w += ''; } cspnhalf = 1; n1w += ""; } else { if (dq13[jps] && dq13[jps] != 0 && (dq13.length == jps || dq13.length == jps + 1 || !dq13[jps+1] || dq13[jps+1] == 0 || dq13[jps+1] == 2)) { n1w += "
  " + dq9[jps1] + " 
"; n1w += "
"; } if (dq10[jps] != -6 && dq10[jps] != -3.5 && dq10[jps] != -8 && dq10[jps] != -1.5) { if (czr2 != 2 && czr2 != 4) { cspnafull = 2; n1w += ""; } else { cspnafull = 3; n1w += ""; } } else if (dq10[jps] == -6 || dq10[jps] == -3.5) { algn = (dq10[jps] == -3.5 ? 'center' : 'left'); if (czr2 != 2 && czr2 != 4) { n1w += ""; } else{ n1w += ""; } } else if (dq10[jps] == -8 || dq10[jps] == -1.5) { algn = (dq10[jps] == -1.5 ? 'center' : 'left'); cspnafull = 0; if (czr2 != 2 && czr2 != 4) { n1w += ""; } else { n1w += ""; } } if (cspnafull > 0 && cspnhalf == 0) { n1w += ""; } if (!cspnhalf) { //topbot n1w += "
  " + dq9[jps1] + "
  " + dq9[jps1] + "
" + dq9[jps1] + " 
" + dq9[jps1] + " 
Full 
Full 
"; } if (czr4 != 7) { if (czr1 == 1) { if (dq2[jps]) { for (var k = 0; k < dq2[jps].length; k++) { if (k < dq2[jps].length) { radiate2(jps,dq3[jps],k,dq4[jps],dq2[jps],dq6[jps],dq7[jps],'',twrb,1,dq15[jps],'',''); if (czr2 == 2) { radcheck1(dq5[jps],k,twrc,'','','',jps); } dq3[jps] = ''; } } } } else { if (dq2[jps]) { for (var k = 0; k < dq2[jps].length; k++) { if (k < dq2[jps].length) { checkerate2(jps,dq3[jps],k,dq2[jps],dq6[jps],dq7[jps],dq8[jps],'',twrb,1,'','','','',''); if (czr2 == 4) { radcheck1(dq5[jps],k,twrc,'','','',jps); } } } } } } else { if (czr1 == 1) { if (dq2[jps]) { for (var k = 0; k < dq2[jps].length; k++) { if (k < dq2[jps].length) { radiate4(jps,dq3[jps],k,dq4[jps],dq2[jps],dq6[jps],dq7[jps],'',twrb,1,dq15[jps],'',''); if (czr2 == 2) { radcheck1(dq5[jps],k,twrc,'','','',jps); } dq3[jps] = ''; } } } } else { if (dq2[jps]) { for (var k = 0; k < dq2[jps].length; k++) { if (k < dq2[jps].length) { checkerate2(jps,dq3[jps],k,dq2[jps],dq6[jps],dq7[jps],dq8[jps],'',twrb,1,'','','','',''); if (czr2 == 4) { radcheck1(dq5[jps],k,twrc,'','','',jps); } } } } } } n1w += ""; if (cspnafull > 0 && cspnhalf == 0) { n1w += "

"; cspnhalf = 0; } else { if (cspnhalf == 1 && (mox2 == 1 || dq13.length == jps || dq13.length == jps + 1)) { n1w += ""; } else { //topbot n1w += ""; n1w += ""; if (cspnhalf == 0) { n1w += ''; } } } } } jps++; jps1++; pls22++; if (mox2 == 1) { //new 04/28 n1w += "
"; // n1w += "
"; n1w += ""; loops = looper; mox2 = 0; if (inout == 1) { jout = looper + 1; return(jout); } break; } } pls44 = pls22; } if (inout == 1) { jps = jps10; } //sixes } else { for (var i = jstart; i < dq1.length; i++) { if (!dq1[i]) { continue; } tline = ''; offnine = 0; if (in5 == 1 && pls44 == jps11) { break; } for (var j = loops; j < sz.length; j++) { czr1 = sz.charAt(j); if ((rmlt == 1 && czr1 >= 8) || in8 == 1) { if (offnine == 1) { break; } if (offnine == 0) { offnine = 1 ; } if (czr1 == 8 || in8 == 1) { czr6 = 0; for (var k = j+1; k < sz.length; k++) { czr7 = sz.charAt(k); if (czr7 == 8) { break; } if (czr7 == 1 || czr7 == 3) { czr6 += 1; } else if (czr7 == 2 || czr7 == 4) { } } n1w += ""; jps3++; if (j == 0) { in8 = 0; } } } } n1w += ''; for (var j = loops; j < sz.length; j++) { jout = j; czr1 = sz.charAt(j); if (czr1 != 1 && czr1 != 3) { continue; } czr2 = (sz.length > j + 1 ? sz.charAt(j+1) : -1); czr3 = (sz.length > j + 2 ? sz.charAt(j+2) : -1); czr4 = (sz.length > j - 1 ? sz.charAt(j-1) : -1); mox2 = 0; if (rmlt == 1) { twend = -1; czr5 = (sz.length > j + 3 ? sz.charAt(j+3) : -1); if (czr2 >= 8 || czr3 >= 8 || czr5 >= 8) { if (czr2 >= 8) { looper = j + 1; mox2 = 1; twend = j; } else if (czr3 >= 8 && czr2 != 1 && czr2 != 3) { looper = j + 2; mox2 = 1; // twend = (czr2 == 2 || czr2 == 4 ? j + 1 : -1); twend = (czr2 == 2 || czr2 == 4 || czr2 == 5 ? j + 1 : -1); } else if (czr5 >= 8 && czr2 != 1 && czr2 != 3 && czr3 != 1 && czr3 != 3) { looper = j + 3; mox2 = 1; twend = (czr2 == 2 || czr2 == 4 ? j + 1 : -1); } } } twrd = (pls22 == 0 ? 1 : 0); twra = ''; if (czr2 != 2 && czr2 != 4) { cwdth = 2; twrb = ''; twrc = ''; } else { cwdth = 3; twrb = ''; twrc = ''; } cspnafull = 0; if (inout == 1 && !dq2[jps]) { break; } if (czr2 != 7 && czr3 != 7 && czr4 != 7) { if (dq10[jps] != -8 && dq10[jps] != -1.5) { //topbot n1w += ""; cspnhalf = 0; } else { if (cspnhalf == 1 && (mox2 == 1 || dq13.length == jps || dq13.length == jps + 1)) { n1w += "
" + dq14[jps3] + "
"; if (cspnhalf == 0 && cspnar != 1) { n1w += ''; } if (cspnar != 1) { n1w += "
"; } else { n1w += "
"; } } else { if (cspnhalf == 0) { n1w += ''; } cspnhalf = 1; n1w += ""; } else { if (dq13[jps] && dq13[jps] != 0 && (dq13.length == jps || dq13.length == jps + 1 || !dq13[jps+1] || dq13[jps+1] == 0 || dq13[jps+1] == 2)) { n1w += "
  " + dq9[jps1] + " 
"; n1w += "
"; } if (dq10[jps] != -6 && dq10[jps] != -3.5 && dq10[jps] != -8 && dq10[jps] != -1.5) { if (czr2 != 2 && czr2 != 4) { if (dq9[jps1+1] && dq9[jps1+1] == '
') { cspnar = 1; cspnafull = 4; n1w += ""; } else if (dq9[jps1] != '
') { cspnafull = 2; n1w += ""; } else if (dq9[jps1] == '
') { cspnar = 2; } } else { if (dq9[jps1+1] && dq9[jps1+1] == '
') { cspnar = 1; cspnafull = 6; n1w += ""; } else if (dq9[jps1] != '
') { cspnafull = 3; n1w += ""; } else if (dq9[jps1] == '
') { cspnar = 2; } } } else if (dq10[jps] == -6 || dq10[jps] == -3.5) { algn = (dq10[jps] == -3.5 ? 'center' : 'left'); if (czr2 != 2 && czr2 != 4) { n1w += ""; } else{ n1w += ""; } } else if (dq10[jps] == -8 || dq10[jps] == -1.5) { algn = (dq10[jps] == -1.5 ? 'center' : 'left'); cspnafull = 0; if (czr2 != 2 && czr2 != 4) { n1w += ""; } else { n1w += ""; } } if (cspnafull > 0 && cspnhalf == 0 && cspnar != 2) { n1w += ""; } if (cspnar == 2) { cspnar = 0; } if (!cspnhalf) { //topbot n1w += "
  " + dq9[jps1] + "
  " + dq9[jps1] + "
  " + dq9[jps1] + "
  " + dq9[jps1] + "
" + dq9[jps1] + " 
" + dq9[jps1] + " 
Full 
Full 
"; } if (!dq11[jps]) { if (czr1 == 1) { if (dq2[jps]) { for (var k = 0; k < dq2[jps].length; k++) { if (k < dq2[jps].length) { radiate1(jps,dq3[jps],k,dq4[jps],dq2[jps],'',twrb,1,dq15[jps],'',''); if (czr2 == 2) { radcheck1(dq5[jps],k,twrc,'','','',jps); } dq3[jps] = ''; } } } } else { if (dq2[jps]) { for (var k = 0; k < dq2[jps].length; k++) { if (k < dq2[jps].length) { checkerate1(jps,dq3[jps],k,dq2[jps],'',dq13[jps],'',1,'','','','',''); if (czr2 == 4) { radcheck1(dq5[jps],k,twrc,dq13[jps],'','',jps); } } } } } } else { if (dq2[jps]) { for (var k = 0; k < dq2[jps].length; k++) { if (k < dq2[jps].length) { checkerate3(jps,dq3[jps],k,dq2[jps],dq6[jps],dq11[jps],dq12[jps],dq13[jps],twrb,1,'','','','',''); } } } } n1w += ""; if ((cspnafull > 0 && cspnhalf == 0 && cspnar != 1) || cspnar == 2) { // if (cspnafull > 0 && cspnhalf == 0 && cspnar != 1) { n1w += "

"; } else { //topbot n1w += ""; n1w += ""; if (cspnhalf == 0) { n1w += ''; } } } } //sevens } else { //topbot n1w += ""; n1w += ""; n1w += "
"; cspnafull = 0; if (czr2 != 2 && czr2 != 4) { cspnafull = 1; n1w += ""; } else { cspnafull = 2; n1w += ""; } if (cspnafull > 0) { n1w += ""; } //topbot n1w += "
  " + dq9[jps1] + "
  " + dq9[jps1] + "
"; } if (czr4 != 7) { if (!dq11[jps]) { if (czr1 == 1) { if (dq2[jps]) { for (var k = 0; k < dq2[jps].length; k++) { if (k < dq2[jps].length) { radiate2(jps,dq3[jps],k,dq4[jps],dq2[jps],dq6[jps],dq7[jps],'',twrb,1,dq15[jps],'',''); if (czr2 == 2) { radcheck1(dq5[jps],k,twrc,'','','',jps); } dq3[jps] = ''; } } } } else { if (dq2[jps]) { for (var k = 0; k < dq2[jps].length; k++) { if (k < dq2[jps].length) { checkerate2(jps,dq3[jps],k,dq2[jps],dq6[jps],dq7[jps],dq8[jps],'',twrb,1,'','','','',''); if (czr2 == 4) { radcheck1(dq5[jps],k,twrc,'','','',jps); } } } } } } else { if (dq2[jps]) { for (var k = 0; k < dq2[jps].length; k++) { if (k < dq2[jps].length) { checkerate3(jps,dq3[jps],k,dq2[jps],dq6[jps],dq11[jps],dq12[jps],dq13[jps],twrb,twrd,'','','','',''); } } } } } else { if (czr1 == 1) { if (dq2[jps]) { for (var k = 0; k < dq2[jps].length; k++) { if (k < dq2[jps].length) { radiate4(jps,dq3[jps],k,dq4[jps],dq2[jps],dq6[jps],dq7[jps],td1,twrb,1,dq15[jps],'',''); if (czr2 == 2) { radcheck1(dq5[jps],k,twrc,'','','',jps); } dq3[jps] = ''; } } } } else { if (dq2[jps]) { for (var k = 0; k < dq2[jps].length; k++) { if (k < dq2[jps].length) { checkerate2(jps,dq3[jps],k,dq2[jps],dq6[jps],dq7[jps],dq8[jps],td1,twrb,1,'','','','',''); if (czr2 == 4) { radcheck1(dq5[jps],k,twrc,'','','',jps); } } } } } } n1w += ""; if (cspnafull > 0 && cspnhalf == 0) { n1w += "

"; } jps++; jps1++; pls22++; if (mox2 == 1) { n1w += "
"; n1w += ""; loops = looper; mox2 = 0; if (inout == 1) { jout = looper + 1; return(jout); } break; } } n1w += ''; pls44 = pls22; } if (inout == 1) { jps = jps10; } } if (inout == 1) { return(jout); } } function SuperItem(i,d,dd,p,c,sized,ider) { this.itemno = i; this.desc = d; this.basedesc = d; this.dsub = dd; this.price = p; this.baseprice = p; this.code = c; this.tracker = new Array(); this.sz = sized; this.ider = ider; } function upadd(id,id2) { if (!id) { OW.document.order.qtyy.value = OW.document.order.qtyy.value; } else { OW.document.order.qtyy.value = OW.document.order.qtyy.value; } return 1; } var imgbkgr = ""; function showPizzaWin(itemno,d1,d2,price,code,qt,sz,ider) { var desc, owinqty = 1; var qwinmtch = 0; var dsub = ''; var nug = navigator.userAgent; op = ''; ropez = 0; if (d1 >= 0 || d1 == -2) { if (d1 != -2) { desc = fds[d1][d2]; dsub = fds[d1][4]; } else { desc = d2; dsub = itemno; } } else { owinqty = items[p1n].quantity; desc = d2; //new dsub = items[p1n].dsub; // dsub = items[p1n].dsub; } n1w = ''; var qwinqty = 1; if (qntd[code] != null) { if (owinqty < qntd[code]) { owinqty = qntd[code]; } qwinqty = qntd[code]; } var here, storage, caboose, plus; if (!prearray) { p1n = 0; } var comma = '"'; if (desc.indexOf("^") >= 0) { for ( var i = 0; i < desc.length; i++ ) { if (desc.indexOf("^") >= 0) { here = desc.indexOf("^"); storage = desc.substring(0,here); here += 1; caboose = desc.substring(here,desc.length); desc = "" + storage + comma + caboose; } else { break; } } } if (desc.indexOf("`") >= 0) { for ( var i = 0; i < desc.length; i++ ) { if (desc.indexOf("`") >= 0) { here = desc.indexOf("`"); storage = desc.substring(0,here); here += 1; caboose = desc.substring(here,desc.length); desc = "" + storage + "'" + caboose; } else { break; } } } if (dsub && dsub != '') { here = 0; if (dsub.indexOf("^") >= 0) { for ( var j = 0; j < dsub.length; j++ ) { if (dsub.indexOf("^") >= 0) { here = dsub.indexOf("^"); storage = dsub.substring(0,here); here += 1; caboose = dsub.substring(here,dsub.length); dsub = "" + storage + comma + caboose; } else { break; } } } if (dsub.indexOf("`") >= 0) { for ( var j = 0; j < dsub.length; j++ ) { if (dsub.indexOf("`") >= 0) { here = dsub.indexOf("`"); storage = dsub.substring(0,here); here += 1; caboose = dsub.substring(here,dsub.length); dsub = "" + storage + "'" + caboose; } else { break; } } } } icol_a = 0; icol_b = 0; subprice = price; w1d = 0; w1h = 0; mimic = ''; needle = 0; namehasher(); offsider(); var flcrt = 0; if (full_scrn == 1 && (sz.indexOf("9") >= 0 || sz.indexOf("8") >= 0)) { flcrt = 1; } jh = screen.availHeight; jw = screen.availWidth; if (w1h >= jh - 10 || flcrt == 1) { if (full_scrn == 0) { w1h = jh - (jh / 8.5); w1h = Math.round(w1h); } else { w1h = jh; } } if (w1d >= jw - 10) { if (full_scrn == 0) { w1d = jw - (jw / 14); w1d = Math.round(w1d); } else { w1d = jw; } } var sw = 50; if (w1d > screen.availWidth - 100) { sw = screen.availWidth - w1d - 25; if (sw < 0) { sw = 0; } } // OW = window.open("","newwin","resizable=yes,scrollbars=yes,width=" + w1d + ",height=" + w1h + ",screenX=" + sw + ",screenY=10"); oP = new SuperItem(itemno,desc,dsub,price,code,sz,ider); oP.basedesc = mr_clean(oP.basedesc); var swtchx = swtchx2 = ''; if (dq17 && dq17.length > 0) { for (var i = 0; i < dq17.length; i++) { if ((dq17[i] && dq17[i] > 0) || prearray) { swtchx += "" + i + ","; } } swtchx2 = swtchx.substring(0,swtchx.length-1); } else if (prearray) { for (var i = 0; i < dq2.length; i++) { swtchx += "" + i + ","; } swtchx2 = swtchx.substring(0,swtchx.length-1); } jslim(sz,code); n1w += "

"; n1w += ""; var fxsb = ""; var ico1 = "/icons/justdownstairs_add.gif"; var ico2 = "/icons/minus.gif"; var ico3 = ""; var up1 = "/icons/arrow4.gif"; var up2 = "/icons/arrow2.gif"; var sxt1 = ""; var sxb1 = ""; var sxt = ""; var sxb = ""; var sxc = ""; var mstr = new Array(4,1,0,0,0,0,0,0,1,1,0,0,0,0,0,4,1,0,1,0,0,0,1,0,0); var sxs = new Array(new Array("Breakfast","","GL1"),new Array("A La Carte","","GL2"),new Array("Breakfast Beverages","","GL3"),new Array("Lunch","","GF1"),new Array("Desserts","","GF2"),new Array("Beverages","","GF3")); var hds = new Array(""); var bg = "
\n"; n1w += "var swgrpe=new switchcontent('switchgroup1', 'div');\n"; n1w += "swgrpe.setStatus(' ', ' ');\n"; n1w += "swgrpe.setColor('darkred', 'black');\n"; n1w += "swgrpe.collapsePrevious(false);\n"; n1w += "swgrpe.defaultExpanded(" + swtchx2 + ")\n"; n1w += "swgrpe.init();\n"; n1w += ""; n1w += ""; } var thecss = new Array(); if (parent.document.styleSheets && parent.document.styleSheets[0]) { if (parent.document.styleSheets[0].cssRules) { thecss = parent.document.styleSheets[0].cssRules; } else { thecss = parent.document.styleSheets[0].rules; } for (var i = 0; i < thecss.length; i++) { if (thecss[i].selectorText && thecss[i].selectorText.toLowerCase() == '.olcg') { thecss[i].style.cssText="background-Color:#87a13e; color:#ffffff; text-align: center;"; break; } } } parent.overlib(parent.OLiframeContent('/icons/menuaol.html',450,550,'csspop',1,'auto'),parent.WIDTH,450,parent.TEXTPADDING,0,parent.BORDER,2,parent.STICKY,parent.DRAGGABLE,parent.CLOSECLICK,parent.CAPTIONPADDING,4,parent.CAPTION,desc,parent.CGCLASS,'olcg',parent.NOJUSTY,parent.NOJUSTX,parent.RELY,50,parent.MIDX,0,parent.BGCLASS,'round',parent.CLOSEFONTCLASS,'overclose',parent.CAPTIONFONTCLASS,'overclose2',CLOSETEXT,'\'Close\''); var ifrmr = parent.document.getElementById("csspop"); var ifrmdoc = ifrmr.contentDocument; if (ifrmdoc == undefined || ifrmdoc == null) { ifrmdoc = ifrmr.contentWindow.document; } ifrmdoc.open(); ifrmdoc.write(n1w); ifrmdoc.close(); OW = ifrmr.contentWindow; return; } function closer() { } function preshowPizzaWin(id) { prearray = items[id].tracker; p1n = id; updatemenuorder(1); parent.showPizzaWin(items[id].itemno,-1,items[id].basedesc,items[id].baseprice,items[id].code,1,items[id].sz,items[id].ider); } function checkertoo(veni,vie,vidi,vex,vici,vimin,vnumon) { var uno = 0, dos = 0; var sh = OW.document.order.elements; var elm = '', jsnumon = 0; var domlen = sh.length; for (var i = 0; i < domlen; i++) { elm = sh[i]; if (elm.name == veni + "_" + uno) { if (!vnumon || vnumon == 0) { if (elm.checked == true) { dos++; } } else { if (elm.value && elm.value >= 0) { jsnumon = elm.value - 0; dos += jsnumon; } } if (uno == vie.length - 1) { break; } uno++; } } uno = 0; if (vidi && vex) { for (var i = 0; i < domlen; i++) { elm = sh[i]; if (elm.name == vidi + "_" + uno) { if (!vnumon || vnumon == 0) { if (elm.checked == true) { dos++; } } else { if (elm.value && elm.value >= 0) { jsnumon = elm.value - 0; dos += jsnumon; } } if (uno == vex.length - 1) { break; } uno++; } } } if (vimin != null && vimin > 0) { if (dos < vimin) { if (OW != null) { OW.alert("You need to pick at least " + vimin + " subitem(s)!"); } else if (AOW2 != null) { AOW2.alert("You need to pick at least " + vimin + " subitem(s)!"); } else { alert("You need to pick at least " + vimin + " subitem(s)!"); } // alert("You need to pick at least " + vimin + " subitem(s)!"); return 1; } } if (dos > vici) { if (OW != null) { OW.alert("You have picked " + (dos - vici) + " too many items!"); } else if (AOW2 != null) { AOW2.alert("You have picked " + (dos - vici) + " too many items!"); } else { alert("You have picked " + (dos - vici) + " too many items!"); } // alert("You have picked " + (dos - vici) + " too many items!"); return 1; } else { return 0; } } function addPizzaToOrder(id) { var here, caboose, storage, tiechk, jimoff; //a op = oP.desc; if (!op) { op = oP.desc; } if (subprice != null && subprice == 0 && oP.price > 0) { oP.price = subprice; } if (q0) { if (checkertoo(q0,v0,qq0,vv0,qa0,qamin0,qanumon0)) { OW.focus(); return; } } for (var i = 0; i < op.length; i++ ) { if (op.indexOf(";
") >= 0) { here = op.indexOf(";
"); storage = op.substring(0,here); here += 1; caboose = op.substring(here,op.length); op = "" + storage + caboose; } else { break; } } if (op.indexOf("; ", op.length-2) >= 0) { op = op.substring(0,op.length-2); } if (!id) { winqty = OW.document.order.qtyy.value; } else { winqty = OW.document.order.qtyy.value; } additem(oP.itemno,-1,op,oP.dsub,oP.price,oP.code); parent.cClick(); } function cent(amount) { var end, subamt; amount = amount - 0; amount = Math.round(amount*100)/100; var str = amount + ""; var decimalPoint = '.'; var c; end = str.indexOf ( decimalPoint); if (end != -1) { var tmp1 = amount * 100; tmp1 = Math.round(tmp1); tmp1 = tmp1 + ""; end = tmp1.indexOf(decimalPoint); if (end != -1) { tmp1 = tmp1.substring(0,end); tmp1 = tmp1 -0; } amount = tmp1 / 100; } subamt = "" + amount; if (amount < 1) { c = subamt.charAt(0); if (c == '.') { amount = "" + '0' + amount; } } return (amount == Math.floor(amount)) ? amount + '.00' : ( (amount*10 == Math.floor(amount*10)) ? amount + '0' : amount); } function arrayplay() { var play = '', playful = ''; for (var i = 0; i < oP.tracker.length; i++) { playful += "-2,"; play = oP.tracker[i].join(); playful += play; if (i < oP.tracker.length - 1) { playful += ","; } } return playful; } franco = 1; bsite = "justdownstairs"; csite = "catering.justdownstairs.com"; cthru = 1; newdivstyle = 1; extracthru = 1; urlsitus = "
 Regular Menu "; var inhome = 0; var dynmifrm = 0; function displaymenuorder(id,pp1,id4,id5,id6,id7) { if (id4 && id4 == 1) { p1n = 0; prearray = ''; } totalcost = 0; var sh = ''; n1m = 0; if (n1m > 0 && callcent == 1 && callcomcent2 == 1 && sitecmnt == 0) { sh = parent.document; callcomcent1 = sh.forms[0].comments.value; } var n2w = ''; if (newlook == 0 && rfrming == 0) { n2w += ''; n2w += ''; n2w += ""; } var nu2 = navigator.userAgent; n2w += "
"; if ((n1m == 0 && hours == 0) || (id6 != null && id6 == 1 && hours == 0)) { // n2w += ""; n2w += ""; n2w += ""; n2w += ""; n2w += "
We open in 1 hour 42 mins.
"; //a //b n2w += "
Estimated Pickup: NOT AVAILABLE
Estimated Delivery: NOT AVAILABLE

"; //c //d n2w += "FREE DELIVERY.
"; //e n2w += "" + weaccept1 + ".
"; if (newlook == 0 && rfrming == 0) { n2w += "
"; parent.document.open(); parent.document.write(n2w); parent.document.close(); } else { document.getElementById('rfrme').innerHTML = n2w; } return true; } else if ((n1m == 0 && hours == 1) || (id6 != null && id6 == 1 && hours == 1)) { // n2w += "
"; n2w += ""; n2w += ""; n2w += ""; n2w += "
We open in 1 hour 42 mins.
"; //a //b n2w += "
Estimated Pickup: NOT AVAILABLE
Estimated Delivery: NOT AVAILABLE

"; //c //d n2w += "FREE DELIVERY.
"; //e n2w += "" + weaccept1 + ".
"; if (newlook == 0 && rfrming == 0) { n2w += "
"; parent.document.open(); parent.document.write(n2w); parent.document.close(); } else { document.getElementById('rfrme').innerHTML = n2w; } return true; } n2w += ""; var dclwdth = 60, dclwdth2 = 4; var tded = ''; n2w += ""; for (var i = 1; i <= n1m; i++) { n2w += ""; n2w += ""; n2w += ""; if (items[i].basedesc == null) { n2w += ""; n2w += "\n"; } else { n2w += ""; n2w += "\n"; } n2w += ""; n2w += ""; totalcost += (cent(items[i].price) * cent(items[i].quantity)); n2w += "\n"; n2w += "\n"; n2w += "\n"; n2w += ""; } if (callcent == 1) { delchrg = 0; if (parent.dchg > 0) { delchrg = 0; var sh4 = parent.document.forms[0].elements; var sh5 = parent.document.forms[0]; var partest = 0; for (var j = 0; j < sh4.length; j++) { if (sh5.elements[j].name == 'info1') { if (sh5.elements[j].checked == true && sh5.elements[j].value == 'D') { partest = 1; } break; } } if (partest == 1) { delchrg = parent.dchg; n2w += ""; } } } n2w += ""; n2w += ""; n2w += "
Qty.No.DescriptionPrice
" + i + "." + items[i].desc + "" + items[i].desc + "" + cent( (items[i].price * items[i].quantity) ) + "
Remove
Delivery Charge:" + cent(delchrg) + "
Total Cost (w/ taxes):" + cent((totalcost * taxvar) + delchrg) + "
"; if (callcent == 1 && sitecmnt == 0) { n2w += ""; } n2w += "
"; n2w += ""; n2w += ""; n2w += ""; n2w += "
"; n2w += ""; n2w += ""; n2w += "
"; n2w += ""; n2w += ""; n2w += ""; n2w += "
Estimated Pickup: NOT AVAILABLE
Estimated Delivery: NOT AVAILABLE

"; n2w += "FREE DELIVERY.
"; n2w += "" + weaccept1 + ".
"; n2w += ""; if (newlook == 0 && rfrming == 0) { n2w += ""; parent.document.open(); parent.document.write(n2w); parent.document.close(); } else { n2w += ""; document.getElementById('rfrme').innerHTML = n2w; openForm(); } return true; } function chameleon(k) { var sh = parent.document; if (k) { if (sh.forms[0].omegad.value == true) { sh.forms[0].alpha.checked = false; } } else { if (sh.forms[0].alpha.value == true) { sh.forms[0].omegad.checked = false; } } return true; } function deleteitem(id) { if (id + 1 == items.length) { items.length = id; } else { for (var i=id;i<=n1m;i++) { if (i != n1m) { items[i] = ''; items[i] = items[i+1]; } else { items.length = n1m; } } } n1m--; sveord(); update(); } function update() { var n2w = ''; var nu2 = navigator.userAgent; if (newlook == 0 && rfrming == 0) { n2w += ''; n2w += ""; if (franco == 0) { if (extracthru == 0) { n2w += ''; } else { if (nu2.indexOf("MSIE") != -1 && nu2.indexOf("Opera") == -1) { n2w += ''; } else { n2w += ''; } } } else { if (cthru == 0) { n2w += ''; } else { if (nu2.indexOf("MSIE") != -1 && nu2.indexOf("Opera") == -1) { n2w += ''; } else { n2w += ''; } } } } n2w += "

"; n2w += "
Updating Your Order
"; if (newlook == 0 && rfrming == 0) { n2w += ""; parent.document.open(); parent.document.write(n2w); parent.document.close(); } else { document.getElementById('rfrme').innerHTML = n2w; } setTimeout('displaymenuorder()',500); } function clearorder(id) { n1m = 0; hours = 0; prearray = p1n = ''; items = new Array(); sveord(); displaymenuorder(); return true; } function changemenuhours() { n1m = 0; hours = 1; displaymenuorder(); return true; } function popUp(url) { sealWin=window.open(url,"win",'toolbar=0,location =0,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=630,height=470'); self.name = "sslWin"; } var fds = new Array(new Array("0","1","","Assorted Pastry, Muffin & Bagel Tray","assorted breads with cream cheese & butter (only bagels or pastries upon request)","","","B1","Assorted Pastry, Muffin & Bagel Tray - Per Person","3.00","20001.051217","3.00 ","Per Person"),new Array("0","2","","Breakfast Basket","quick morning grabs! protein bars, breakfast cookies, whole fruit","","","B2","Breakfast Basket - Per Person","3.00","20002.051217","3.00 ","Per Person"),new Array("0","3","","Mini Yogurt Parfaits","Vanilla yogurt, almond granola & fresh berries.","","","B3","Mini Yogurt Parfaits - Per Person","2.50","20003.051217","2.50 ","Per Person"),new Array("0","4","","BYO Yogurt Bar","Vanilla & strawberry yogurt, granola.","","","B4","BYO Yogurt Bar - Per Person","6.00","20004.051217","6.00 ","Per Person"),new Array("0","5","","BYO Oatmeal or Parfait","parfait: vanilla & strawberry yogurt with granola, sliced almonds & nuts | oatmeal: dry oats, hot water & milk with fresh blue berries, raisins, almonds, brown sugar","","","B5","BYO Oatmeal or Parfait - Per Person","6.00","20005.051217","6.00 ","Per Person"),new Array("0","6","","Continental Breakfast","assorted pastries & bagels with cream cheese, fresh fruit salad & boiled eggs","","","B6","Continental Breakfast - Per Person","7.00","20006.051217","7.00 ","Per Person"),new Array("0","8","","Peet's Coffee","","","","B8","Peet`s Coffee - Per Person","2.00","20017.051217","2.00 ","Per Person"),new Array("0","9","","Peet's Hot Tea","","","","B9","Peet`s Hot Tea - Per Person","2.00","20018.051217","2.00 ","Per Person"),new Array("0","10","","Juice Carafe","Serves 10","","","B10","Juice Carafe","10.00","20019.051217","10.00 ",""),new Array("0","11","","Assorted Juices","","","","B11","Assorted Juices - Per Person","2.00","20020.051217","2.00 ","Per Person"),new Array("0","12","","Bottled Water","","","","B12","Bottled Water","2.00","20021.051217","2.00 ",""),new Array("0","1","","Sandwich Platter (pp)","an assortment of turkey BLT, the Italian, roast beef & chicken pesto (*veggie sandwiches upon request)","","","1","Sandwich Platter (pp) - Per Person","9.00","10001.051217","9.00 ","Per Person"),new Array("0","10","","Cookie","","","","10","Cookie - Per Person","2.00","10026.051717","2.00 ","Per Person"),new Array("0","11","","Brownies","","","","11","Brownies - Per Person","2.00","10027.051717","2.00 ","Per Person"),new Array("0","12","","Mixed Dessert Platter","","","","12","Mixed Dessert Platter - Per Person","3.00","10028.051717","3.00 ","Per Person"),new Array("0","13","","Assorted Bottled Drinks","","","","13","Assorted Bottled Drinks","2.50","10029.051717","2.50 ",""),new Array("0","14","","Bottled Water","","","","14","Bottled Water","2.00","10030.051717","2.00 ","")); var fxst = "




"; var nd = "
"; var spw = spw2 = spw3 = spw4 = icomod = ''; var p1 = p2 = p3 = p5 = 0; function spwfunc(id,slctqty) { if (id != Math.floor(id)) { id = Math.floor(id); } if (id == 20001) { additem('B1.','0','8','',3.00,'20001.051217',slctqty); } else if (id == 20002) { additem('B2.','1','8','',3.00,'20002.051217',slctqty); } else if (id == 20003) { additem('B3.','2','8','',2.50,'20003.051217',slctqty); } else if (id == 20004) { additem('B4.','3','8','',6.00,'20004.051217',slctqty); } else if (id == 20005) { additem('B5.','4','8','',6.00,'20005.051217',slctqty); } else if (id == 20006) { additem('B6.','5','8','',7.00,'20006.051217',slctqty); } else if (id == 20017) { additem('B8.','6','8','',2.00,'20017.051217',slctqty); } else if (id == 20018) { additem('B9.','7','8','',2.00,'20018.051217',slctqty); } else if (id == 20019) { additem('B10.','8','8','',10.00,'20019.051217',slctqty); } else if (id == 20020) { additem('B11.','9','8','',2.00,'20020.051217',slctqty); } else if (id == 20021) { additem('B12.','10','8','',2.00,'20021.051217',slctqty); } else if (id == 10001) { additem('1.','11','8','',9.00,'10001.051217',slctqty); } else if (id == 10026) { additem('10.','12','8','',2.00,'10026.051717',slctqty); } else if (id == 10027) { additem('11.','13','8','',2.00,'10027.051717',slctqty); } else if (id == 10028) { additem('12.','14','8','',3.00,'10028.051717',slctqty); } else if (id == 10029) { additem('13.','15','8','',2.50,'10029.051717',slctqty); } else if (id == 10030) { additem('14.','16','8','',2.00,'10030.051717',slctqty); } } function spwfuncq(id,slctqty) { if (id != Math.floor(id)) { id = Math.floor(id); } } var chgsub2 = ""; function chgprices(id,id2,id3,id4) { var chgprice = "", chgitm = "", chgdsc = "", chgsub = ""; chgsub2 = ""; if (id == 20001) { if (!id2 && !id3 && !id4) { chgprice = "" + 3.00; } else if (id4) { chgsub = "" + "Per Person"; chgsub2 = 1; } else if (id2) { chgitm = "" + "Assorted Pastry, Muffin & Bagel Tray"; } else if (id3) { chgdsc = "" + "assorted breads with cream cheese & butter (only bagels or pastries upon request)"; } } else if (id == 20002) { if (!id2 && !id3 && !id4) { chgprice = "" + 3.00; } else if (id4) { chgsub = "" + "Per Person"; chgsub2 = 1; } else if (id2) { chgitm = "" + "Breakfast Basket"; } else if (id3) { chgdsc = "" + "quick morning grabs! protein bars, breakfast cookies, whole fruit"; } } else if (id == 20003) { if (!id2 && !id3 && !id4) { chgprice = "" + 2.50; } else if (id4) { chgsub = "" + "Per Person"; chgsub2 = 1; } else if (id2) { chgitm = "" + "Mini Yogurt Parfaits"; } else if (id3) { chgdsc = "" + "Vanilla yogurt, almond granola & fresh berries."; } } else if (id == 20004) { if (!id2 && !id3 && !id4) { chgprice = "" + 6.00; } else if (id4) { chgsub = "" + "Per Person"; chgsub2 = 1; } else if (id2) { chgitm = "" + "BYO Yogurt Bar"; } else if (id3) { chgdsc = "" + "Vanilla & strawberry yogurt, granola."; } } else if (id == 20005) { if (!id2 && !id3 && !id4) { chgprice = "" + 6.00; } else if (id4) { chgsub = "" + "Per Person"; chgsub2 = 1; } else if (id2) { chgitm = "" + "BYO Oatmeal or Parfait"; } else if (id3) { chgdsc = "" + "parfait: vanilla & strawberry yogurt with granola, sliced almonds & nuts | oatmeal: dry oats, hot water & milk with fresh blue berries, raisins, almonds, brown sugar"; } } else if (id == 20006) { if (!id2 && !id3 && !id4) { chgprice = "" + 7.00; } else if (id4) { chgsub = "" + "Per Person"; chgsub2 = 1; } else if (id2) { chgitm = "" + "Continental Breakfast"; } else if (id3) { chgdsc = "" + "assorted pastries & bagels with cream cheese, fresh fruit salad & boiled eggs"; } } else if (id == 20017) { if (!id2 && !id3 && !id4) { chgprice = "" + 2.00; } else if (id4) { chgsub = "" + "Per Person"; chgsub2 = 1; } else if (id2) { chgitm = "" + "Peet's Coffee"; } else if (id3) { } } else if (id == 20018) { if (!id2 && !id3 && !id4) { chgprice = "" + 2.00; } else if (id4) { chgsub = "" + "Per Person"; chgsub2 = 1; } else if (id2) { chgitm = "" + "Peet's Hot Tea"; } else if (id3) { } } else if (id == 20019) { if (!id2 && !id3 && !id4) { chgprice = "" + 10.00; } else if (id4) { chgsub = "" + ""; chgsub2 = 1; } else if (id2) { chgitm = "" + "Juice Carafe"; } else if (id3) { chgdsc = "" + "Serves 10"; } } else if (id == 20020) { if (!id2 && !id3 && !id4) { chgprice = "" + 2.00; } else if (id4) { chgsub = "" + "Per Person"; chgsub2 = 1; } else if (id2) { chgitm = "" + "Assorted Juices"; } else if (id3) { } } else if (id == 20021) { if (!id2 && !id3 && !id4) { chgprice = "" + 2.00; } else if (id4) { chgsub = "" + ""; chgsub2 = 1; } else if (id2) { chgitm = "" + "Bottled Water"; } else if (id3) { } } else if (id == 10001) { if (!id2 && !id3 && !id4) { chgprice = "" + 9.00; } else if (id4) { chgsub = "" + "Per Person"; chgsub2 = 1; } else if (id2) { chgitm = "" + "Sandwich Platter (pp)"; } else if (id3) { chgdsc = "" + "an assortment of turkey BLT, the Italian, roast beef & chicken pesto (*veggie sandwiches upon request)"; } } else if (id == 10026) { if (!id2 && !id3 && !id4) { chgprice = "" + 2.00; } else if (id4) { chgsub = "" + "Per Person"; chgsub2 = 1; } else if (id2) { chgitm = "" + "Cookie"; } else if (id3) { } } else if (id == 10027) { if (!id2 && !id3 && !id4) { chgprice = "" + 2.00; } else if (id4) { chgsub = "" + "Per Person"; chgsub2 = 1; } else if (id2) { chgitm = "" + "Brownies"; } else if (id3) { } } else if (id == 10028) { if (!id2 && !id3 && !id4) { chgprice = "" + 3.00; } else if (id4) { chgsub = "" + "Per Person"; chgsub2 = 1; } else if (id2) { chgitm = "" + "Mixed Dessert Platter"; } else if (id3) { } } else if (id == 10029) { if (!id2 && !id3 && !id4) { chgprice = "" + 2.50; } else if (id4) { chgsub = "" + ""; chgsub2 = 1; } else if (id2) { chgitm = "" + "Assorted Bottled Drinks"; } else if (id3) { } } else if (id == 10030) { if (!id2 && !id3 && !id4) { chgprice = "" + 2.00; } else if (id4) { chgsub = "" + ""; chgsub2 = 1; } else if (id2) { chgitm = "" + "Bottled Water"; } else if (id3) { } } if (chgprice) { chgprice = cent(chgprice); return chgprice; } else if (chgitm) { return chgitm; } else if (chgdsc) { return chgdsc; } else if (chgsub) { return chgsub; } } function chgfrmprices(id2) { var subprce = '', subprce2 = '', newprice = '', getvar = ''; var nuq = navigator.userAgent; var ifrmed2 = ''; if (nuq.indexOf("MSIE 9") == -1 && nuq.indexOf("MSIE 1") == -1) { ifrmed2 = parent.document.getElementsByTagName("span"), i = ifrmed2.length; } else { ifrmed2 = parent.document.querySelectorAll("span"), i = ifrmed2.length; } var anext = i; while(i--) { if (ifrmed2[i].id && ifrmed2[i].id.indexOf('i_') != -1) { subprce = ifrmed2[i].id; subprce2 = subprce.substr(2); newprice = chgprices(subprce2); if (!newprice || newprice == undefined || newprice == null) { newprice = ''; } getvar = ifrmed2[i].id; parent.document.getElementById(getvar).innerHTML = newprice; } } if (id2) { i = anext; while(i--) { if (ifrmed2[i].id) { if (ifrmed2[i].id.indexOf('a_') != -1) { subitm = ifrmed2[i].id; subitm2 = subitm.substr(2); newprice = chgprices(subitm2,1); if (!newprice || newprice == undefined || newprice == null) { newprice = ''; } getvar = ifrmed2[i].id; parent.document.getElementById(getvar).innerHTML = newprice; } else if (ifrmed2[i].id.indexOf('b_') != -1) { subitm = ifrmed2[i].id; subitm2 = subitm.substr(2); newprice = chgprices(subitm2,'',1); if (!newprice || newprice == undefined || newprice == null) { newprice = ''; } getvar = ifrmed2[i].id; parent.document.getElementById(getvar).innerHTML = newprice; } else if (ifrmed2[i].id.indexOf('c_') != -1) { subitm = ifrmed2[i].id; subitm2 = subitm.substr(2); newprice = chgprices(subitm2,'','',1); if (!newprice || newprice == undefined || newprice == null) { newprice = ''; } getvar = ifrmed2[i].id; parent.document.getElementById(getvar).innerHTML = newprice; } else if (ifrmed2[i].id.indexOf('j_') != -1) { subitm = ifrmed2[i].id; subitm2 = subitm.substr(2); newprice = chgprices(subitm2,'','',1); // if (!newprice || newprice == undefined || newprice == null) { if (!chgsub2) { getvar = ifrmed2[i].id; parent.document.getElementById(getvar).innerHTML = ''; } } } } } } n3w += ("

Online Ordering Is Currently Closed. Please Check Back Later.


"); p1 = p2 = p3 = p5 = 0; // if (id == null) { id = 0; } // if (id == 0) { var pj1 = -1, pj2 = 1, sctn = 0; var sectitlsw = divsecst = 0, subyfx = priceyfx = loopend0 = loopend1 = loopend2 = ''; for (var i = 0; i < mstr.length; i++) { if (mstr[i] == 0) { if (fds[p1][0] == 0 || fds[p1][0] == 1) { if (fds[p1][4] == undefined || fds[p1][4] == null) { fds[p1][4] = ''; } if (fds[p1][0] == 0) { for (var j = 7; j < fds[p1].length; j++) { p5 = j+1; if (fds[p1][j+5]) { subyfx = " - " + fds[p1][j+5]; } else { subyfx = ''; } n3w += ("
  • " + fds[p1][3] + " " + subyfx + "
    " + fds[p1][j+2] + "
    " + fds[p1][4] + "
  • "); if (fds[p1].length == j + 5 + 1) { break; }; j += 5; } } else { for (var j = 7; j < fds[p1].length; j++) { p5 = j+1; if (fds[p1][j+5]) { subyfx = " - " + fds[p1][j+5]; } else { subyfx = ''; } n3w += ("
  • " + fds[p1][3] + " " + subyfx + "
    " + fds[p1][j+2] + "
    " + fds[p1][4] + "
  • "); if (fds[p1].length == j + 8 + 1) { break; }; j += 8; } } } p1++; pj2++; } else if (mstr[i] < 4) { if (i != 0) { n3w += (""); } if (mstr[i] == 1) { n3w += ("
    " + sxs[p2][0] + "
    " + sxs[p2][1] + "