addEvent(window, "load", setupCalendar, false); var presents; var todaysPresent; function setupCalendar() { //alert("got this far"); var calendar = document.getElementById("calendar"); //alert("got this far again"); if (!calendar) return; // Make sure this is the calendar page var doors = getElementsByClass("calendarDoor", calendar, null); for (i=0;iThe Wish Library by Bristol Libraries, City Learning Centre Brislington and Brislington Enterprise College", "01", document.getElementById("door01"), "http://www.dshed.net/content/p00000014/s00000191/c00001556/c00001556_p.jpg"); presents[1] = new Present("Through My Eyes by BBC Radio Bristol, CSV, Lawrence, Jeff, Watershed", "02", document.getElementById("door02"), "http://www.dshed.net/content/p00000014/s00000192/c00001557/c00001557_p.jpg"); presents[2] = new Present("Wishing Well by Bath Spa University Interactive Design Group and Cotham School", "03", document.getElementById("door03"), "http://www.dshed.net/content/p00000014/s00000182/c00001564/c00001564_p.jpg"); presents[3] = new Present("Build Your Own Teacher by Connexions West of England, eShed.net and Ella Bissett-Johnson", "04", document.getElementById("door04"), "http://www.dshed.net/content/p00000014/s00000184/c00001546/c00001546_p.jpg"); presents[4] = new Present("How Do Wishes Work? by Hannah More Primary School with Simon Johnson", "05", document.getElementById("door05"), "http://www.dshed.net/content/p00000014/s00000187/c00001549/c00001549_p.jpg"); presents[5] = new Present("Wishing On A Star by At-Bristol Space School", "06", document.getElementById("door06"), "http://www.dshed.net/content/p00000014/s00000176/c00001562/c00001562_p.jpg"); presents[6] = new Present("Wishing Worlds by Amy Feneck, Oli Lyndale, UWE and Creative Partnerships", "07", document.getElementById("door07"), "http://www.dshed.net/content/p00000014/s00000181/c00001551/c00001551_p.jpg"); presents[7] = new Present("In The Future You Will See by Meriton Education & Support for Young Parents, Nathan Hughes, Duncan Speakman", "08", document.getElementById("door08"), "http://www.dshed.net/content/p00000014/s00000178/c00001552/c00001552_p.jpg"); presents[8] = new Present("Wishing For A Greener Knowle West by Knowle West Media Centre and Green Bristol", "09", document.getElementById("door09"), "http://www.dshed.net/content/p00000014/s00000195/c00001560/c00001560_p.jpg"); presents[9] = new Present("Visible And Invisible by British Empire & Commonwealth Museum, Anna Farthing", "10", document.getElementById("door10"), "http://www.dshed.net/content/p00000014/s00000193/c00001558/c00001558_p.jpg"); presents[10] = new Present("Future Schools by Withywood and Henbury Extended Schools with Fluffy Logic and Calling the Shots", "11", document.getElementById("door11"), "http://www.dshed.net/content/p00000014/s00000197/c00001565/c00001565_p.jpg"); presents[11] = new Present("Bristol Wishes by City of Bristol College and New Oak Primary School", "12", document.getElementById("door12"), "http://www.dshed.net/content/p00000014/s00000177/c00001544/c00001544_p.jpg"); presents[12] = new Present("Flying by Kuumba, Roxana Freeman, Hattie and Lucia", "13", document.getElementById("door13"), "http://www.dshed.net/content/p00000014/s00000186/c00001548/c00001548_p.jpg"); presents[13] = new Present("Live, Work, Play by Beef and Connecting Bristol", "14", document.getElementById("door14"), "http://www.dshed.net/content/p00000014/s00000189/c00001553/c00001553_p.jpg"); presents[14] = new Present("We Could Be Heroes by eShed, Connexions,Hengrove Community Arts College, Noel Goodwin and Simon Johnson", "15", document.getElementById("door15"), "http://www.dshed.net/content/p00000014/s00000194/c00001559/c00001559_p.jpg"); presents[15] = new Present("'Caught in the Middle' trailer by StreetScenes", "16", document.getElementById("door16"), "http://www.dshed.net/content/p00000014/s00000198/c00001566/c00001566_p.jpg"); presents[16] = new Present("Brunel's Britain Route Planner by Available Light and GridClub", "17", document.getElementById("door17"), "http://www.dshed.net/content/p00000014/s00000179/c00001545/c00001545_p.jpg"); presents[17] = new Present("I Wish by Urbana Laguna", "18", document.getElementById("door18"), "http://www.dshed.net/content/p00000014/s00000188/c00001550/c00001550_p.jpg"); presents[18] = new Present("The Sky I Missed - The Sky I Wished by Kathryn Thomas, Simon Whetham", "19", document.getElementById("door19"), "http://www.dshed.net/content/p00000014/s00000190/c00001555/c00001555_p.jpg"); presents[19] = new Present("Can You Wish On A Frog? by Fast Forward, Firstborn Creatives and Circumnavigate", "20", document.getElementById("door20"), "http://www.dshed.net/content/p00000014/s00000185/c00001547/c00001547_p.jpg"); presents[20] = new Present("Adisa by Bread Youth Project (Kumani) young people and workers, Full Circle, Dani Landau and the Museum of Bristol.", "21", document.getElementById("door21"), "http://www.dshed.net/content/p00000014/s00000199/c00001567/c00001567_p.jpg"); presents[21] = new Present("Wishing you an improvised Christmas by The Birdman of Alkijazz, Quadrode", "22", document.getElementById("door22"), "http://www.dshed.net/content/p00000014/s00000200/c00001568/c00001568_p.jpg"); presents[22] = new Present("Mutant Supertoy by Arnolfini, i-DAT, Headley Park Primary School and the Kahve Society", "23", document.getElementById("door23"), "http://www.dshed.net/content/p00000014/s00000183/c00001554/c00001554_p.jpg"); presents[23] = new Present("Wishing Machine by The i City Learning Centre, Bristol Gateway School, Monks Park School and St Bedes School", "24", document.getElementById("door24"), "http://www.dshed.net/content/p00000014/s00000180/c00001561/c00001561_p.jpg"); } function getPresent(pageObject) { for (i = 0; i < presents.length; i++) { if (presents[i].pageElement == pageObject) return presents[i]; } return null; } function getTodaysPresent() { // Get the data from the HTML as this JS may be cached by the client var theDescription = document.getElementById("todaysCreation").innerHTML; var calendar = document.getElementById("calendar"); if (!calendar) return; var doors = getElementsByClass("calendarDoor", calendar, null); var todaysDoor = null; for (i=0;i;'; x.document.open(); x.document.write(text2); x.document.close(); } } function openPresent(presentIndex) { if (navigator.userAgent.indexOf("Safari")!=-1) window.open("/06/calendar/" + presentIndex + "/", "present", "status=yes,scrollbars=no,resizable=yes,width=640,height=527"); window.open("/06/calendar/" + presentIndex + "/", "present", "status=yes,scrollbars=no,resizable=yes,width=640,height=510"); }