/* ---------------------------------------------------------------- sniffing code to detect for IE4 on either Windows NT or 95 ---------------------------------------------------------------- */ var sAgent = navigator.userAgent; var bIs95NT = sAgent.indexOf("Windows 95") > -1 || sAgent.indexOf("Windows NT") > -1 || sAgent.indexOf("Win32") > -1 || sAgent.indexOf("Windows 98") > -1; var bIsIE4 = (sAgent.indexOf("IE 7") > -1 || sAgent.indexOf("IE 6") > -1 || sAgent.indexOf("IE 5") > -1 || sAgent.indexOf("IE 4") > -1) && sAgent.indexOf("b1") <= -1 && sAgent.indexOf("p1") <= -1; var bIsIE432 = bIs95NT && bIsIE4; /* ---------------------------------------------------------------- variable declarations for doMenu sOpenMenuID points to any open pop-up menus, is blank otherwise ---------------------------------------------------------------- */ var sOpenMenus = new Array; var sCurrentMenu = ''; var sMenuID = 'idMenu'; var sTitleID = 'idMenuTitle'; var iPercentCurrent = 0; var iPercentStart = 0; //25 var iPercentIncrease = 3; //3 var iSpeed = 10; //10 // Milliseconds var iTimerID; /* ---------------------------------------------------------------- main function, doMenu, that hides any open pop-up menus, determines which menu DIV to access, and starts its display ---------------------------------------------------------------- */ function doMenu() { var iLoop = 0; var sCurrentMenu = ''; if (bIsIE432) { // Find the element the user clicked on. var eSrc = window.event.srcElement // Cancel the event from bubbling up the food chain. window.event.cancelBubble = true // If the currently clicked item is a menu. if (eSrc.className == "clsMenuTitle") { // If the currently clicked item is a menu // Get the menu's contents. sCurrentMenu = sMenuID + eSrc.id.substring(sTitleID.length, eSrc.id.length) if (sOpenMenus.length > 0) { // If it's a submenu of the currently last selected menu if (sOpenMenus[sOpenMenus.length-1] == sCurrentMenu.substring(0, sOpenMenus[sOpenMenus.length-1].length)) { // Show current list. for (iLoop = 0; iLoop < sOpenMenus.length; iLoop++) { var oMenu = document.all[sOpenMenus[iLoop]] if (oMenu) { oMenu.style.display = 'block'; } } } else { // Clear last List (hiding as we go) for (iLoop = sOpenMenus.length-1; iLoop > -1; iLoop--) { var oMenu = document.all[sOpenMenus[iLoop]] if (oMenu) { oMenu.style.display = 'none'; } sOpenMenus.length--; } } // End If currently clicked is submenu of last shown menu. } // Add the current menu to the list. sOpenMenus[sOpenMenus.length] = sCurrentMenu; // Show current sub-menu slowly. startMenu(sCurrentMenu, eSrc); } else { // Clear List (hiding as we go) for (iLoop = sOpenMenus.length-1; iLoop > -1; iLoop--) { var eMenu = document.all[sOpenMenus[iLoop]]; if (eMenu) { eMenu.style.display = 'none'; } sOpenMenus.length--; } // End For looping through open menus } // End If current click is on a menu. } // End If IE4+ } // End function function startMenu(sCurrentMenu, eSrc) { var eMenu = document.all[sCurrentMenu] eSrc.parentElement.style.clip = "rect(0 auto auto 0)" if (eMenu) { eMenu.style.clip = "rect(0 0 0 0)"; eMenu.style.display = "block"; iPercentCurrent = iPercentStart; iTimerID = window.setTimeout("showMenu(" + eMenu.id + ")," + iSpeed); } } function showMenu(eMenu) { eMenu.style.clip = "rect(0 100% " + iPercentCurrent + "% 0)" iPercentCurrent += iPercentIncrease; if (iPercentCurrent <= 100) { iTimerID = window.setTimeout("showMenu(" + eMenu.id + ")," + iSpeed) } else { window.clearTimeout(iTimerID) eMenu.style.clip = "rect(0 auto auto 0)" } } function ExpandCollapse(obj) { if (obj.style.display == '') { obj.style.display = 'none'; } else { obj.style.display = ''; } return false; } function FloatTopDiv() { var startX = 3, startY = 50; var ns = (navigator.appName.indexOf("Netscape") != -1); var d = document; function ml(id) { var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id]; if (d.layers) { el.style=el; } el.sP=function(x,y){this.style.left=x;this.style.top=y;}; el.x = startX; el.y = startY; return el; } window.stayTopLeft=function() { var pY = ns ? pageYOffset : document.body.scrollTop; ftlObj.y += (pY + startY - ftlObj.y)/8; ftlObj.sP(ftlObj.x, ftlObj.y); setTimeout("stayTopLeft()", 10); } ftlObj = ml("divStayTopLeft"); stayTopLeft(); }