// Functions for Eclipse Fasteners - www.snapfx.com.au var grey = new Array("#eeeeee","#f0f0f0","#f2f2f2","#f4f4f4","#f6f6f6","#f8f8f8","white"); function nav_top() { var tnav = document.getElementById("nav_top"); var ulArray = tnav.getElementsByTagName("ul"); for (i = 0;i < ulArray.length; i++) { ullisteners(ulArray[i]); var links = ulArray[i].getElementsByTagName("a"); for (x = 0; x < links.length; x++) { aListener(links[x],links[x],grey); } } } function ullisteners(thisOne) { var t; var tt; thisOne.parentNode.onmouseover = function() { clearTimeout(tt); thisOne.style.zIndex=2000; t = setTimeout(function() {thisOne.style.visibility="visible"},200); } thisOne.parentNode.onmouseout = function() { thisOne.style.zIndex=1000; tt = setTimeout(function() {thisOne.style.visibility="hidden"},200); } } function aListener(myLink,myTarget,colourArray) { var thisLink = myLink; var thisTarget = myTarget; var interval; thisLink.onmouseover = function() { clearTimeout(interval); thisTarget.style.background=colourArray[0]; } thisLink.onmouseout = function() { fadeOut(0); } function fadeOut(colour) { var myColour = colourArray[colour]; thisTarget.style.background=myColour; if(colour < colourArray.length-1) { var newColour = colour + 1; interval = setTimeout(function() {fadeOut(newColour)},50); } } } function region(newText) { document.getElementById("regiontxt").innerHTML = "" + newText + ""; } window.onload = function() { nav_top(); }