var oCKMenuTimer; var oCKMenuTimer2; var bCKMenuTimerOn = false; function findPos(obj) { var curleft = curtop = 0; if (obj == null) return [0,0]; if (obj.offsetParent) { do { curleft += obj.offsetLeft; curtop += obj.offsetTop; } while (obj = obj.offsetParent); } return [curleft,curtop]; } function fnCKMenuOverMain(oSendMenu,szMenu) { fnCKMenuClearTimer(); var oMenu = document.getElementById(szMenu); var rgnMenu = findPos(oSendMenu); //alert (rgnMenu[0]); oMenu.style.left = 160; oMenu.style.top = 0; //alert(oSendMenu.offsetHeight); oMenu.style.visibility="visible"; oSendMenu.className = "CKMenuMain0Over"; } function fnCKMenuOutMain() { fnCKMenuOut(); fnCKMenuHideAll(); } function fnCKMenuOverSub(oSendMenu,szMenu) { fnCKMenuClearTimer(); fnCKMenuHideSub(oSendMenu); var nBrowserWidth = window.document.body.clientWidth; var rgnMenu = findPos(oSendMenu); var oMenu = document.getElementById(szMenu); //alert(rgnMenu[0]); if ((rgnMenu[0] + oSendMenu.offsetWidth + oMenu.offsetWidth ) > nBrowserWidth) oMenu.style.left = 0 - oMenu.offsetWidth; else oMenu.style.left = oSendMenu.offsetWidth; oMenu.style.top = 0; oMenu.style.visibility="visible"; } function fnCKMenuHideAll() { var oMenu = document.getElementById("CKMenuBar"); var ch=oMenu.childNodes; for(var i=0;i 1) var test2 = fnCKHideNode(bh[y]); } var patt1=/CKMenuMain0/g; if (oNode.tagName == "DIV" && oNode.className.match(patt1)) { if (oNode.className == "CKMenuMain0Over") oNode.className = "CKMenuMain0"; } } function fnCKMenuOut() { if (!bCKMenuTimerOn) { oCKMenuTimer = setTimeout("fnCKMenuTimer()",1000); bCKMenuTimerOn = true; } } function fnCKMenuClearTimer() { if (bCKMenuTimerOn) { clearTimeout(oCKMenuTimer); bCKMenuTimerOn = false; } } function fnCKMenuTimer() { fnCKMenuHideAll(); }