Public feed #601929

Something

public javascript v1 · immutable
Raw Edit
·published 2007-07-03 20:11 UTC
rendered paste body
    <!-- start mrBlaQs Slidshow Script -->        <script type="text/javascript">            var currentTab;            var tabNumber;            var ourInterval;            var totalTabs = 3;            currentTab = 0;	    function showTab(tabNumber) {		    document.getElementById("frame" + tabNumber).style.zIndex = "2";		    document.getElementById("tab" + tabNumber + "on").style.zIndex = "2";		    document.getElementById("tab" + tabNumber + "off").style.zIndex = "1";		    if (currentTab > 0)		    {			    document.getElementById("frame" + currentTab).style.zIndex = "1";			    document.getElementById("tab" + currentTab + "on").style.zIndex = "1";			    document.getElementById("tab" + currentTab + "off").style.zIndex = "2";		    }		    currentTab = tabNumber;	    }            function switchFrame() {                nextTab = currentTab + 1;                if (nextTab > totalTabs) {                    nextTab = 1;                }                showTab(nextTab);            }            function loadTab(loadNumber) {                clearInterval(ourInterval);                showTab(loadNumber);            }            function init() {                showTab(1);                ourInterval = setInterval("switchFrame()", 5000);            }        // get rid of onload tag in body...also allows multiple scripts to play nicely together	if (!addEvent)	{		function addEvent(oTarget, sEventName, fAttachFunc) 		{ 			if (window.attachEvent) 				oTarget.attachEvent("on" + sEventName, fAttachFunc);			else 				oTarget.addEventListener(sEventName, fAttachFunc, false);		}	}	addEvent(window, "load", new Function("init();"));        </script>        <!-- End mrBlaQs slideshow script -->