window.onload = function() { //Code for Scroll bar d = document.getElementById("whatsnew"); if(d.offsetHeight){ height=d.offsetHeight; } else if(d.style.pixelHeight){ height=d.style.pixelHeight; } if (height > 352) { d.style.height = "352px"; d.style.overflow = "auto"; } domA = new Array(); //Code for Image transitions d = document.getElementById("body"); imgTags = d.getElementsByTagName("img"); numImg = imgTags.length; for (i = 0 ; i < imgTags.length ; i++) { imgTags[i].style.position = "absolute"; makeNumbers(i); if (i != 0) { opacity(imgTags[i], 0); imgTags[i].style.display = "none"; } else { domA[i].style.color = "#DA2028" } } // add more link to box i++; domA[i] = document.createElement("a"); domA[i].setAttribute("href", "gallery_skate.php"); domA[i].appendChild(document.createTextNode("More")); domA[i].style.marginLeft = "1em"; domA[i].style.marginRight = "1.5em"; domA[i].style.color = "#808284"; domA[i].style.textDecoration = "none"; document.getElementById("imgLinks").appendChild(domA[i]); // Add the events if (document.attachEvent) { //For Internet Explorer domA[i].attachEvent("onmouseover", function() { domA[i].style.textDecoration = "underline"; }); domA[i].attachEvent("onmouseout", function() { domA[i].style.textDecoration = "none"; }); } //End if if (document.addEventListener) { //For everyone domA[i].addEventListener("mouseover", function() { domA[i].style.textDecoration = "underline"; }, false); domA[i].addEventListener("mouseout", function() { domA[i].style.textDecoration = "none"; }, false); } //End If // Change Images imgCount = numImg; hide = 0; show = 1; notVisible = 0; imgOut = null; myTimer = setInterval("imgChange()", 8000); } // End onload function imgChange() { if(imgOut != null) { return; } domA[show].style.color = "#DA2028"; domA[hide].style.color = "#808284"; opacity(imgTags[hide], 0); imgTags[hide].style.display = "none"; imgTags[show].style.display = "inline"; imgOut = setInterval("imgOutFunc()", 1); } function imgOutFunc() { notVisible = notVisible + .1; opacity(imgTags[show], notVisible); if (notVisible > .9) { clearInterval(imgOut); opacity(imgTags[show], .99); notVisible = 0; hide = show; show++; imgOut = null; if (show == imgCount) { show = 0; } } } function clickChange(i) { clearInterval(myTimer); clearInterval(imgOut); imgTags[show].style.MozOpacity = 0; domA[show].style.color = "#808284"; show = i; imgChange(); // opacity(imgTags[hide], 0); imgTags[hide].style.display = "none"; // domA[show].style.color = "#DA2028"; domA[hide].style.color = "#808284"; // imgTags[hide].style.MozOpacity = 0; show = i; imgOut = setInterval("imgOutFunc()", 1); } // End Function clickChange function opacity(d, o) { if(window.opera)return; d.style.MozOpacity = o; d.style.KhtmlOpacity = o; d.style.opacity = o; d.style.filter = "alpha(opacity="+o*100+")"; } function makeNumbers(i) { domA[i] = document.createElement("a"); domA[i].setAttribute("href", "javascript:clickChange("+i+");"); domA[i].appendChild(document.createTextNode(i+1)); domA[i].style.marginLeft = ".5em"; domA[i].style.marginRight = ".5em"; domA[i].style.color = "#808284"; domA[i].style.textDecoration = "none"; document.getElementById("imgLinks").appendChild(domA[i]); // Add the events if (document.attachEvent) { //For Internet Explorer domA[i].attachEvent("onmouseover", function() { domA[i].style.textDecoration = "underline"; }); domA[i].attachEvent("onmouseout", function() { domA[i].style.textDecoration = "none"; }); } //End if if (document.addEventListener) { //For everyone domA[i].addEventListener("mouseover", function() { domA[i].style.textDecoration = "underline"; }, false); domA[i].addEventListener("mouseout", function() { domA[i].style.textDecoration = "none"; }, false); } //End If } // End function makeNumbers