//fix for sub + loc flipers_run = 0; //Vars var n, v, abuf, sbuf, x; var shopsdb = Array( "", "", "", " - ", "", " 0) { echo '-ad-';} ?>", "", "", ''); var reclen; reclen = 8; var noshops; noshops = Math.floor(shopsdb.length / reclen); var shoporder; shoporder = Array(noshops); for (x=0; x < shoporder.length; x++) { shoporder[x] = x; } var fad, fon, fap, floc, fsub; fad = 0; fon = 0; fap = 0; floc = '' fsub = ''; back_url = ''; //Query String (Form data (only use GET requests)) sbuf = String(self.location.search); sbuf = sbuf.substring(1,999); abuf = sbuf.split('&'); for (x=0; x < abuf.length; x++) { sbuf = abuf[x].split("="); n = String(unescape("" + sbuf[0])); n = n.toLowerCase(); if (sbuf.length > 1) { v = String(unescape(sbuf[1])); v = v.replace(/\+/, " "); } else { v = String(''); } if (n == 'filter') { if (v == 'on') { fon = 1; } else if (v == 'ad') { fad = 1; } else if (v == 'ap') { fap = 1; } } else if (n == 'loc') { floc = v; } else if (n == 'sub') { fsub = v; } else if (n == 'back_url') { back_url = v; } } /************************************************************************ * * ************************************************************************ ************************************************************************/ //Flippers function flipers() { var x; if (back_url != '') { document.form1.back_url.value = back_url; } if (document.form1.loc) { for(x=0; x < document.form1.loc.length; x++) { if (document.form1.loc.options[x].value == floc) { document.form1.loc.selectedIndex = x; break; } } } if (document.form1.sub) { for(x=0; x < document.form1.sub.length; x++) { if (document.form1.sub.options[x].value == fsub) { document.form1.sub.selectedIndex = x; break; } } } if (self.location.search != "") { if (document.form1.filter) { for(x=0; x < document.form1.filter.length; x++) { if (document.form1.filter[x].value == 'on') { document.form1.filter[x].checked = (fon == 1); } else if (document.form1.filter[x].value == 'ad') { document.form1.filter[x].checked = (fad == 1); } else if (document.form1.filter[x].value == 'ap') { document.form1.filter[x].checked = (fap == 1); } } } } window.setTimeout("flipers_run = 1;", 500) } // 0=img, 1=www, 2=.htm, 3=name, 4=loc, 5=fil, 6=subloc, 7=real_web function showshop_x (sn) { var offs; var real_web; offs = sn * reclen; real_web = ((shopsdb[offs + 7]=="") ? ("http://" + shopsdb[offs + 1] + "/") : shopsdb[offs + 7]); document.write(''); document.writeln(' ' + shopsdb[offs + 3] + ' '); document.writeln(' ' + shopsdb[offs + 1] + '  '); document.writeln(' Info '); document.writeln(''); } /************************************************************************ ************************************************************************ * * ************************************************************************/ var y, z; for (x = (shoporder.length - 1); x > 0; x--) { y = Math.floor(Math.random() * x); if (y != x) { z = shoporder[y]; shoporder[y] = shoporder[x]; shoporder[x] = z; } //document.writeln("x=" + x + "
y=" + y + "
r=" + Math.floor(Math.random() * x) + "
--
"); } if ((self.location.search != "") || false) { // 4=loc, 5=fil, 6=subloc document.writeln(''); z=0; for (x=0; x < shoporder.length; x++) { if ((fad == 0) || (shopsdb[(shoporder[x] * reclen) + 5].indexOf('-ad-') >= 0)) { if ((fap == 0) || (shopsdb[(shoporder[x] * reclen) + 5].indexOf('-ap-') >= 0)) { if ((fon == 0) || (shopsdb[(shoporder[x] * reclen) + 5].indexOf('-on-') >= 0)) { if ((floc == '') || (shopsdb[(shoporder[x] * reclen) + 4] == floc)) { if ((fsub == '') || (shopsdb[(shoporder[x] * reclen) + 6] == fsub)) { showshop_x(shoporder[x]); z++; } } } } } } if (z==0) { document.writeln(''); } document.writeln('
'); document.writeln('Sorry, no matches found for your region...
'); document.writeln('
You can click here to see matches from other areas.
'); document.writeln(' Remember however that some of these may have
shipping resrictions.
'); document.writeln('
'); } // 0=img, 1=www, 2=.htm, 3=name, 4=loc, 5=fil, 6=subloc, 7=real_web function showSmallAdv() { var offs; offs = shoporder[0] * reclen; document.writeln(''); document.writeln('' + shopsdb[offs+3] + ''); } function openInfoWin(sn) { window.open('http://www.oldcuriosityshop.net/shop/se_res_info.php?id=' + sn, '_blank', 'width=590,height=440'); }