var lastMenuId = 0; var timer; var mSheets = new Array(); var currZ = 100; var mReady = false; var mLeftPos = 526; function MenuLink(textVal, linkVal, subVal){ this.text = textVal; this.action = linkVal; this.submenu = subVal; } function menuHideAll(){ for (var c in mSheets) mSheets[c].hide(); } function menuHideTimerSet(){ timer = window.setTimeout(menuHideAll, 100); } function menuHideTimerReset(){ if (timer) window.clearTimeout(timer); } function menuAddLink(textVal, linkVal){ this.links[this.links.length] = new MenuLink(textVal, linkVal, null); } function menuAddSubmenu(textVal, linkVal){ this.links[this.links.length] = new MenuLink(textVal, linkVal, new MenuSheet(this)); } function menuShow(leftVal, topVal){ this.block.style.left = leftVal + "px"; this.block.style.top = topVal + "px"; this.block.style.display = "block"; } function menuHide(){ this.hideCh(); this.block.style.display = "none"; } function menuFlip(leftVal, topVal){ var disp = this.block.style.display; if (disp == "none") this.show(leftVal, topVal); else this.hide(); } function menuHideCh(){ for (var c in this.links){ curLink = this.links[c]; if (curLink.submenu) curLink.submenu.hide(); } } function menuCreate(path){ var res = "
"; var curLink; var newPath; if (path == null) path = "mSheets[" + this.id + "]"; var nikCounter = 0; for (var c in this.links){ curLink = this.links[c]; nikCounter++; res += ""; } res += "
" + curLink.text + "
"; this.block.innerHTML = res; this.block.style.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity=90)"; } function MenuSheet(parentObj){ this.links = new Array(); this.addLink = menuAddLink; this.addSubmenu = menuAddSubmenu; this.create = menuCreate; this.show = menuShow; this.hide = menuHide; this.flip = menuFlip; this.hideCh = menuHideCh; this.id = lastMenuId; lastMenuId++; this.parent = parentObj; this.block = document.createElement("DIV"); this.block.className = "blk-menu"; this.block.style.position = "absolute"; this.block.style.display = "none"; this.block.style.zIndex = currZ; currZ++; this.block.id = "ms" + this.id; document.body.appendChild(this.block); } function showMenu(objVal, numVal){ if (mReady){ menuHideAll(); objVal.className = "item act"; mSheets[numVal].show(getLeftPos(objVal)+0, mTopPos+10); menuHideTimerReset(); } } function hideMenu(objVal, numVal){ if (mReady){ menuHideTimerSet(); objVal.className = "item"; } } function createMenus(){ for (c = 0; c < 9; c++) mSheets[c] = new MenuSheet(); // Seminars mSheets[1].addLink("Nursing Certification Review Symposium", "nursesymposium.php"); mSheets[1].addLink("Peds RN Symposium", "Peds_RN_Symposium.php"); mSheets[1].addLink("CPN Review Course", "CPN_Review_Course.php"); mSheets[1].addLink("Pediatric CCRN Review Course", "pediatric_ccrn_review_course.php"); mSheets[1].addLink("Neonatal Intensive Care Nursing Review Course", "Neonatal_Intensive_Care_Nursing_Review_Course.php"); mSheets[1].addLink("Low Risk Neonatal Nursing Review Course", "Low_Risk_Neonatal_Certification.php"); mSheets[1].addLink("Certified Nurse Manager and Leader Review Course", "certified_nurse_manager.php"); mSheets[1].addLink("Pediatric Laboratory Interpretation", "Pediatric_Laboratory_Interpretation.php"); mSheets[1].addLink("Keynote Presentations", "Keynote_Presentations.php"); mSheets[1].addLink("Presentations Potpourri", "Presentations_Potpourri.php"); mSheets[1].addLink("Pediatric Physical Assessment", "Pediatric_Physical_Assessment.php"); // Products mSheets[2].addLink("CPN Study Aides", "details.php?page=CPN_Study_Aides_1.php"); mSheets[2].addLink("Pediatric CCRN Study Aides", "details.php?page=Pediatric_CCRN_Study_Aides_3.php"); mSheets[2].addLink("CPEN Study Aides", "details.php?page=CPEN_Study_Aides_2.php"); mSheets[2].addLink("CE for Nurses DVDs, Audio CDs, Self Learning Modules", "details.php?page=CE_for_Nurses_DVDs_Audio_CDs.php"); for (var c in mSheets) mSheets[c].create(); mReady = true; }