window.imgon = 1; window.imgnext = 2; window.trans = 100; window.canclick = true; function goleft() { if ( window.canclick == true ) { window.pause = false; clearTimeout(window.timechange); window.imgnext = window.imgon - 1; if ( window.imgnext < 1 ) { window.imgnext = 9; } window.timechange = setTimeout("shownext()",1); } } function goright() { if ( window.canclick == true ) { window.pause = false; clearTimeout(window.timechange); window.timechange = setTimeout("shownext()",1); } } function shownext() { if ( window.trans == 100 && window.pause == true ) { window.timechange = setTimeout("shownext()",8000); } else if ( window.trans >= 5 ) { window.canclick = false; window.trans= window.trans-5; transb = window.trans/100; transc = 100-window.trans; transd = transc/100; document.getElementById('frame' + window.imgon).setAttribute("class",'show' + window.trans); document.getElementById('frame' + window.imgnext).setAttribute("class",'show' + transc); window.timechange = setTimeout("shownext()",50); } else { window.canclick=true; document.getElementById('frame' + window.imgon).setAttribute("class",'hideme'); window.trans = 100; window.imgon = window.imgnext; window.imgnext = window.imgnext + 1; window.timechange = setTimeout("shownext()",8000); if ( window.imgon >= 9 ) { window.imgnext = 1; } } } window.pause = false; window.timechange = setTimeout("shownext()",8000); function checkenter(e) { if(e.which == 13 || event.keyCode == 13){ window.open('https://search.treasuretrooper.com?q=' + document.getElementById('searchbox').value); } }