var g_interval=null;var g_current=4;var g_strip=null;var g_preview=null;var g_init=false;function initProjektorbox(){if(!document.getElementById||!document.getElementsByTagName){return }g_preview=document.getElementById("projektorbox_preview");g_strip=document.getElementById("projektorbox_strip");startInterval();g_init=true;setActivePreview(0);for(i=0;i<5;i++){shadow=getShadowById(i);shadow.myOpacity=0.5;setOpacity(shadow)}}function startInterval(){stopInterval();g_interval=window.setInterval("handleInterval()",5000)}function stopInterval(){if(g_interval){window.clearInterval(g_interval)}}function handleInterval(){var A=g_strip.getElementsByTagName("span");next=(A[g_current+1]?g_current+1:0);setActivePreview(next)}function handleMouseOver(A){stopInterval();setActivePreview(A)}function setActivePreview(A){shadowThumb(A);switchOver(g_current,A);g_current=A}function shadowThumb(B){if(g_init){var A=g_strip.getElementsByTagName("span");for(i=0;i<A.length;i++){var C=A[i].getElementsByTagName("img")[1];if(B==i){C.style.display="block"}else{C.style.display="none"}}}}function switchOver(B,A){from=getPreviewById(B);to=getPreviewById(A);from.style.display="none";to.style.display="block"}function allOtherPreviewsInBackground(){for(i=0;i<5;i++){if(i!=g_current){var A=getPreviewById(i);A.style.display="none";A.myOpacity=0}}}function setOpacity(A){if(A.myOpacity>0.99){A.myOpacity=0.99;return }A.style.opacity=A.myOpacity;A.style.MozOpacity=A.myOpacity;A.style.filter="alpha(opacity="+(A.myOpacity*100)+")"}function getPreviewById(A){if(g_init){return g_preview.getElementsByTagName("div")[A]}}function getThumbnailById(A){if(g_init){return g_strip.getElementsByTagName("span")[A].getElementsByTagName("img")[0]}}function getShadowById(A){if(g_init){return g_strip.getElementsByTagName("span")[A].getElementsByTagName("img")[1]}};