11,16d10 < var phpcont=[], phpcontname=[], phpname=[]; < < if (document.URL.substring(1).toLowerCase().indexOf('http') != -1) { < location.href=document.URL.replace(".html", ".php").replace(".htm", ".php"); < } < 35c29 < var images=[phpmap(location.search.split('image1=')[1] ? decodeURIComponent(location.search.split('image1=')[1].split('&')[0]) : 'IMG_0085.JPG'),phpmap(location.search.split('image2=')[1] ? decodeURIComponent(location.search.split('image2=')[1].split('&')[0]) : 'IMG_0086.JPG')]; --- > var images=[(location.search.split('image1=')[1] ? decodeURIComponent(location.search.split('image1=')[1].split('&')[0]) : 'IMG_0085.JPG'),(location.search.split('image2=')[1] ? decodeURIComponent(location.search.split('image2=')[1].split('&')[0]) : 'IMG_0086.JPG')]; 37a32 > if (document.URL.indexOf('?image12') != -1 || document.URL.indexOf('&image12') != -1) { // doppelganger image logic 47,50c42 < var oneimage=phpmap((location.search.split(huhc + '=')[1] ? decodeURIComponent(location.search.split(huhc + '=')[1].split('&')[0]) : '')); < < if (document.URL.indexOf('?image12') != -1 || document.URL.indexOf('&image12') != -1) { // doppelganger image logic < --- > var oneimage=(location.search.split(huhc + '=')[1] ? decodeURIComponent(location.search.split(huhc + '=')[1].split('&')[0]) : ''); 66c58 < images.push(phpmap((location.search.split('image' + next + '=')[1] ? decodeURIComponent(location.search.split('image' + next + '=')[1].split('&')[0]) : ''))); --- > images.push((location.search.split('image' + next + '=')[1] ? decodeURIComponent(location.search.split('image' + next + '=')[1].split('&')[0]) : '')); 78c70 < imageo[eval(-1 + iois)].src=phpmap(images[eval(-1 + iois)]); --- > imageo[eval(-1 + iois)].src=images[eval(-1 + iois)]; 84,105d75 < function phpmap(iniurl) { < if (iniurl != '') { < if (iniurl.toLowerCase().indexOf('http') == 0 && inMinusOneArray(iniurl, phpcontname) != -1) { < //alert('found name ' + iniurl); < return phpcont[inMinusOneArray(iniurl, phpcontname)]; < } else if (iniurl.toLowerCase().indexOf('http') == -1 && inMinusOneArray(iniurl, phpname) != -1) { < //alert('found ref ' + iniurl); < return phpcont[inMinusOneArray(iniurl, phpname)]; < } < } < //alert('not found name ' + String.fromCharCode(10) + iniurl + ' versus ' + String.fromCharCode(10) + phpcontname[0]); < return iniurl; < } < < function inMinusOneArray(needle, haystack) { // thanks to https://stackoverflow.com/questions/784012/javascript-equivalent-of-phps-in-array < var length = haystack.length; < for (var i = 0; i < length; i++) { < if (('' + haystack[i]).replace(/\ /g,'+').trim() == ('' + needle).replace(/\ /g,'+').trim()) return i; < } < return -1; < } < 192,193c162,163 < document.body.innerHTML+='
'; < document.body.innerHTML+=''; --- > document.body.innerHTML+=''; > document.body.innerHTML+=''; 344c314 < var data = '