/********************* Begin slideshow module *********************/ // Let's see how many items there are on this page var currPic = 0; var paused = false; var ssTxt = new Array(4); var ssPh = new Array(4); var ssBtns = new Array(4); var ppBtn; var timer1; try { document.execCommand('BackgroundImageCache', false, true); } catch(e) {} function initPageComponents() { /* Used to load all components on the page */ ssTxt[0] = document.getElementById('txt1'); ssTxt[1] = document.getElementById('txt2'); ssTxt[2] = document.getElementById('txt3'); ssTxt[3] = document.getElementById('txt4'); ssPh[0] = document.getElementById('ph1'); ssPh[1] = document.getElementById('ph2'); ssPh[2] = document.getElementById('ph3'); ssPh[3] = document.getElementById('ph4'); ssBtns[0] = document.getElementById('a1'); ssBtns[1] = document.getElementById('a2'); ssBtns[2] = document.getElementById('a3'); ssBtns[3] = document.getElementById('a4'); ppBtn = document.getElementById('ppBtn'); timer1 = setTimeout('timedStory()', 7000); } function change(num) { currPic = num; ssTxt[0].style.display = (num == 0 ? "block" : "none"); ssTxt[1].style.display = (num == 1 ? "block" : "none"); ssTxt[2].style.display = (num == 2 ? "block" : "none"); ssTxt[3].style.display = (num == 3 ? "block" : "none"); ssPh[0].style.display = (num == 0 ? "block" : "none"); ssPh[1].style.display = (num == 1 ? "block" : "none"); ssPh[2].style.display = (num == 2 ? "block" : "none"); ssPh[3].style.display = (num == 3 ? "block" : "none"); ssBtns[0].className = "on"; ssBtns[1].className = "on"; ssBtns[2].className = "on"; ssBtns[3].className = "on"; ssBtns[0].className = "off"; ssBtns[1].className = "off"; ssBtns[2].className = "off"; ssBtns[3].className = "off"; ssBtns[0].className = (num == 0 ? "on" : "off"); ssBtns[1].className = (num == 1 ? "on" : "off"); ssBtns[2].className = (num == 2 ? "on" : "off"); ssBtns[3].className = (num == 3 ? "on" : "off"); } /* change picture, wait some seconds, repeat */ function timedStory() { currPic = (currPic + 1)%4; change(currPic); timer1 = setTimeout('timedStory()', 7000); } /* executed when the play/pause button is selected */ function doButton() { paused=!paused; doImageSwap(); if (paused==true) { clearTimeout(timer1); /* stop the image loop */ }else{ timedStory(); /* restart the image loop */ } } /*executed when a number link is selected */ function doNumber(num) { paused = true; doImageSwap(); change(num); clearTimeout(timer1); /*document.myform.nm1.focus();*/ } /* swap the play/pause button image */ function doImageSwap() { if (paused==true){ ppBtn.style.backgroundPosition = "-75px -66px"; }else{ ppBtn.style.backgroundPosition = "-75px -22px"; } //ppBtn.style.backgroundPosition = (paused ? "-75px -66px" : "-75 -22px"); } /********************* End slideshow module *********************/ function tii_callFunctionOnElementLoad (targetId, functionToCall) { var myArguments = arguments; addLoadEvent (function () { window.loaded = true; }); var targetElement = document.getElementById (targetId); if (targetElement == null && !window.loaded) { var pollingInterval = setInterval (function () { if (window.loaded) { clearInterval (pollingInterval); } targetElement = document.getElementById (targetId); if (targetElement != null) { clearInterval (pollingInterval); var argumentsTemp = new Array (); var argumentsTempLength = myArguments.length - 2; for (var i = 0; i < argumentsTempLength; i++) { argumentsTemp [i] = myArguments [i + 2]; } functionToCall.apply (this, argumentsTemp); } }, 10); } } function addLoadEvent(func) { var oldonload = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function() { if (oldonload) { oldonload(); } func(); } } } function doIt_wallpaper() { var wall = "wa_l="+document.wallpaper.wa_l.value+"&"+"wa_h="+document.wallpaper.wa_h.value; /* window.location="/aolhome/calculator/wallpaper/results/0,21655,,00.html"+"?"+wall+"&"+h_window+"&"+door; */ window.location="/aolhome/calculator/wallpaper/results/0,21655,,00.html"+"?"+wall; } //tii_callFunctionOnElementLoad ('footer',function(){initPageComponents();}); addLoadEvent(function(){initPageComponents();});