function dooropen(door) { today=new Date(); daynow=today.getDate(); monthnow=today.getMonth(); // ############################################### // I've de-activated the date controls for testing purposes // Before launching, you should remove the // from the start of the next three lines that start with 'if' // That will ensure that people can't use the calendar before December or after January // And that they can't open doors early // ############################################### if (monthnow!=11 && monthnow!=0) {alert("This feature opens in December. Please come back then."); return false;} if (daynow==door-1) {alert("Come back tomorrow to see what's behind that door!");return false;} if (door>daynow) {alert("You\'ll have to wait "+(door-daynow)+" days before that door's available!"); return false;} // you don't need to edit this bit oNewWindow=window.open(urlsarray[door], '_blank','directories=no,height='+heightarray[door]+',width='+widtharray[door]+',location=0,menubar=0,resizable=yes,scrollbars='+scrollbarsarray[door]+',status=no,titlebar=0,toolbar=0'); } urlsarray = new Array(); widtharray = new Array(); heightarray = new Array(); scrollbarsarray= new Array(); // ############################################### // edit variables here // ############################################### var x=30; // offset from left where doors begin in px var y=30; // offset from top where doors begin in px var rows=5; // number of rows of doors var cols=6; // number of columns of doors var spacinghoriz=80; // spacing between doors horizontal in px var spacingvert=70; // spacing between doors vertical in px // ############################################### // put your URLs, width and height in here. the scrollbarsarray[] is optional and should be set to 1 to enable scrollbars // ############################################### urlsarray[1]="https://i.imgur.com/wWG12gM.jpg"; widtharray[1]="250"; heightarray[1]="275"; urlsarray[2]="https://i.imgur.com/izC0gXw.jpg"; widtharray[2]="250"; heightarray[2]="275"; urlsarray[3]="https://i.imgur.com/zvzuscf.gif"; widtharray[3]="250"; heightarray[3]="275"; urlsarray[4]="https://i.imgur.com/zcPRhDy.png"; widtharray[4]="250"; heightarray[4]="275"; scrollbarsarray[4]=1; // ############################################### // The first four doors work - I've provided sample doors for you to test with // Try opening the rest of the doors and you'll get an error message until you've added your doors in below // ############################################### urlsarray[5]="https://i.imgur.com/ouSayU2.jpg"; widtharray[5]="250"; heightarray[5]="275"; urlsarray[6]="https://i.imgur.com/NQzv2yV.gif"; widtharray[6]="250"; heightarray[6]="275"; urlsarray[7]="https://i.imgur.com/reG6zJC.gif"; widtharray[7]="250"; heightarray[7]="275"; urlsarray[8]="https://i.imgur.com/pxvtGbC.gif"; widtharray[8]="250"; heightarray[8]="275"; urlsarray[9]="https://i.imgur.com/9M7RWPx.gif"; widtharray[9]="250"; heightarray[9]="275"; urlsarray[10]="https://i.imgur.com/Q8ZYMtF.gif"; widtharray[10]="250"; heightarray[10]="275"; urlsarray[11]="https://i.imgur.com/lvWNCzC.gif"; widtharray[11]="250"; heightarray[11]="275"; urlsarray[12]="https://i.imgur.com/ImEx5b4.gif"; widtharray[12]="250"; heightarray[12]="275"; urlsarray[13]="https://i.imgur.com/INYKF0K.gif"; widtharray[13]="250"; heightarray[13]="275"; urlsarray[14]="https://i.imgur.com/IriVEUD.gif"; widtharray[14]="250"; heightarray[14]="275"; urlsarray[15]="https://i.imgur.com/1DymWtk.gif"; widtharray[15]="250"; heightarray[15]="275"; urlsarray[16]="https://i.imgur.com/MOzU7Qz.gif"; widtharray[16]="250"; heightarray[16]="275"; urlsarray[17]="https://i.imgur.com/OTK9OOm.jpg"; widtharray[17]="250"; heightarray[17]="275"; urlsarray[18]="https://i.imgur.com/kymr9Py.gif"; widtharray[18]="250"; heightarray[18]="275"; urlsarray[19]="https://i.imgur.com/Ymo9UvG.gif"; widtharray[19]="250"; heightarray[19]="275"; urlsarray[20]="https://i.imgur.com/8OTzj6f.gif"; widtharray[20]="250"; heightarray[20]="275"; urlsarray[21]="https://i.imgur.com/wv1e5r2.gif"; widtharray[21]="250"; heightarray[21]="275"; urlsarray[22]="https://i.imgur.com/vrEKzWA.gif"; widtharray[22]="250"; heightarray[22]="275"; urlsarray[23]="https://i.imgur.com/zZuKJNQ.gif"; widtharray[23]="250"; heightarray[23]="275"; urlsarray[24]="https://i.imgur.com/dk9TBAJ.gif"; widtharray[24]="250"; heightarray[24]="275"; urlsarray[25]="https://i.imgur.com/Fu1r5a6.gif"; widtharray[25]="250"; heightarray[25]="275"; urlsarray[26]="https://i.imgur.com/B41uXh1.gif"; widtharray[26]="250"; heightarray[26]="275"; urlsarray[27]="https://i.imgur.com/U3YIqQp.gif"; widtharray[27]="250"; heightarray[27]="275"; urlsarray[28]="https://i.imgur.com/NgJal4o.jpg"; widtharray[28]="250"; heightarray[28]="275"; urlsarray[29]="https://i.imgur.com/ogIlfag.gif"; widtharray[29]="250"; heightarray[29]="275"; urlsarray[30]="https://i.imgur.com/ZAEmaok.gif"; widtharray[30]="250"; heightarray[30]="275"; // you don't need anything below this line var doorno=1; for (h=0;h'+doorno+'');} }