// Sliding Menu Start theMenu = new Array; // sideMenu array sideMenuH = new Array; // sideMenu array for storing height theTipH = new Array; // subMenu array for storing height function layerSetup(id) { theObj = document.getElementById(id); return theObj; // Return the object layer } function getHeight(id) { theHeight = layerSetup(id).offsetHeight; // Get the offsetHeight of the sideMenu return theHeight; // Return the height } function showDiv(id,posX,posY) { layerSetup(id).style.visibility = 'visible'; // Set sideMenu to visible for theObj layerSetup(id).style.left = parseInt(posX); // Set the position at posX for theObj layerSetup(id).style.top = parseInt(posY); // Set the position at posY for theObj } function hideDiv(id) { layerSetup(id).style.visibility = 'hidden'; } function menuSetup(id,Ytop) { this.space = 5; // Set the spacing between sideMenu this.posX = 8; // Set the left margin for the sideMenu this.id = id; this.mainId = "sideMenu" + id; this.tipId = "theTip" + id; this.Ytop = Ytop; this.posY=0; this.delay = 2; // Set the delay in the sideMenu move. The higher the number the slower it moves. this.timer; this.measure = measure; this.showMenu = showMenu; this.newPosition = newPosition; this.layerMove = layerMove; this.slideMenu = slideMenu; this.showTip = showTip; } function measure() { sideMenuH[this.id] = getHeight(this.mainId); // Save the height of this sideMenu ID in the sideMenuH array theTipH[this.id] = getHeight(this.tipId); // Save the height of the subMenu ID in the TipH array } function showMenu() { posY=this.Ytop; for (var i=0;i<=this.id-1;i++) { posY += parseInt(sideMenuH[i]) + this.space; // Calculate the position of the sideMenu } this.posY = posY; showDiv(this.mainId,this.posX,posY); // Show the sideMenu } function newPosition(id) { hideDiv(this.tipId); // First of all hide the specified subMenu posY=this.Ytop; // Set the Ytop position for (var i=0;i<=this.id-1;i++) { posY += parseInt(sideMenuH[i]) + this.space; // Calculate the new position for the specified sideMenu } if (this.id == sideMenuH.length-1) { // If the specified sideMenu is the last menu then set var f var f="openTip(" + id + ")"; }else { var f="doNothing()"; // 09-21-04 PN - Add this logic to support IE 5.0 less forgiving function call } this.finish = new Function(f); // Open the subMenu this.layerMove(posY,-5) // Move the sideMenu layer to the specified new position } function doNothing() { // alert (" doNothing "); // 09-21-04 PN - This is used to support IE 5.0 because it is less forgiving than the later version. } function layerMove(posY,moveY) { if (moveY>0) { // if moveY is greater than 0 then set var a var a=posY-this.posY; // Get the difference between posY and the current --- move sideMenu down } else { var a=this.posY-posY; // if moveY is less than 0 then move sideMenu up } if (a>0) { this.posY = this.posY + moveY; showDiv(this.mainId,this.posX,this.posY); // Show the sideMenu if(this.timer) { clearTimeout(this.timer); // Clear all Timeout } eval("theMenu[" + this.id + "].timer = setTimeout(\"theMenu[" + this.id + "].layerMove("+posY+","+moveY+","+this.delay+")\"," + this.delay + ")"); // Move the layer with delay setting } else { this.finish(); // Do not do anything } } function openTip(id) { for (var i=0;i -1) { pos4 = urlstr2.lastIndexOf("#"); if (pos4 > -1) {document.links[i].href= document.links[i].href.substring(0,document.links[i].href.length-2) + "&" + main + "-" +side;} else { // check to see if it is Notes DB. If it is then append the suffix otherwise ignore pos5 = urlstr2.lastIndexOf(".nsf"); if (pos5 > -1) {document.links[i].href=document.links[i].href + "&" + main + "-" +side;} } // pos4 end } // pos3 end } // side2 end } // if (document.links[i].href) end } } // 03-25-05 PN - Removed the sliding switch statement to determine which sidemenu to expand // By removing this code it correct the error while loading a page that don't use sliding menu document._Page.searchinputhtml.value =""; // openMenu('0'); } } // Sliding Menu End