start_slideshow(1, 9, 4000); function start_slideshow(start_frame, end_frame, delay) { setTimeout(switch_slides(start_frame,start_frame,end_frame, delay), delay); } function switch_slides(frame, start_frame, end_frame, delay) { return (function() { Effect.Fade('slideshow' + frame); if (frame == end_frame) { frame = start_frame; } else { frame = frame + 1; } setTimeout("Effect.Appear('slideshow" + frame + "');", 850); setTimeout(switch_slides(frame, start_frame, end_frame, delay), delay + 850); }) }/* * Javascript implementations for WhatAMan 2008 website * (c) Papercut Media. No reproduction without permission. Feel free to ask. * Author: Patrick Pittman * Date: October 2007 * Version: 1.0 * Requires: Prototype.js framework, ufo.js for flash loading, Dreamgirl on the other end for AJAXy JSON communication */ var Cookie = { set: function(name, value, daysToExpire) { var expire = ''; if (daysToExpire != undefined) { var d = new Date(); d.setTime(d.getTime() + (86400000 * parseFloat(daysToExpire))); expire = '; expires=' + d.toGMTString(); } return (document.cookie = escape(name) + '=' + escape(value || '') + expire); }, get: function(name) { // alert(document.cookie.inspect()); var cookie = document.cookie.match(new RegExp('(^|;)\\s*' + escape(name) + '=([^;\\s]*)')); return (cookie ? unescape(cookie[2]) : null); }, erase: function(name) { var cookie = Cookie.get(name) || true; Cookie.set(name, '', -1); return cookie; }, accept: function() { if (typeof navigator.cookieEnabled == 'boolean') { return navigator.cookieEnabled; } Cookie.set('_test', '1'); return (Cookie.erase('_test') === '1'); } }; function Papercut() { this.loaderlock = false; this.baseHref = "http://www.deckchairtheatre.com.au/"; this.ajaxBase = this.baseHref+"js/ajax/"; this.ajaxProgress = document.createElement('img'); this.ajaxProgress.src = this.baseHref+"images/icons/ajax-loader.gif"; this.anchors = $H({}); } Papercut.prototype.init = function(e) { Element.extend(document.body); this.setupListBox(); fixIEPNG(); if (!document.location.href.match('login') && !document.body.hasClassName('editmode')) { } } Papercut.prototype.setupListBox = function() { if ($('MailingList_Email')) { var emailwords = "enter your email address"; if ($('MailingList_Email').value=='') { $('MailingList_Email').value = emailwords; } $('MailingList_Email').observe('focus',function(e){ if (this.value==emailwords) { this.value = ''; } }); $('MailingList_Email').observe('blur',function(e){ if (this.value=='') { this.value = emailwords; } }); } } function cleanupFP9IELeaks() { __flash_unloadHandler = function() {}; __flash_savedUnloadHandler = function() {}; } function fixIEPNG() { var version = parseFloat(navigator.appVersion.split('MSIE')[1]); if ((version >= 5.5) && (document.body.filters)) { for(var i=0; i" img.outerHTML = strNewHTML i = i-1 } } } } function initPapercut() { Papercut.init(); if (window.setupZoom) { setupZoom(); } } var Papercut = new Papercut(); document.observe('dom:loaded',initPapercut);