var m_bordercolor_selected = "#C4C4C4"; var MenuBorderSelected = "#999999"; var SubMenuBg = "#F1F1F1"; function mnpMenuMouseover() { var div = window.event.srcElement; var status = div.getAttribute("status"); var disabledLink = div.getAttribute("disablelink"); if (status) window.status = status; if (disabledLink=='yes') { div.style.background = SubMenuBg; div.style.borderColor = m_bordercolor_selected; } else { div.style.background = m_bordercolor_selected; div.style.borderColor = m_bordercolor_selected; } var pt = new mnpMenuPt(div); var x; if (mnpMenuDirSave == "LTR") x = pt.left + div.offsetWidth - 1; else x = pt.left + 2; var y = pt.top - 3; var menu = div.getAttribute("menu"); if (menu) menu = "'" + menu + "'"; else menu = "null"; if (mnpMenuPopup) window.clearTimeout(mnpMenuPopup); var parent = div.parentElement.parentElement; mnpMenuPopup = window.setTimeout("mnpMenuOpen(" + menu + ", '" + parent.id + "', " + x + ", " + y + ")", 200); } function mnpToolbarDir() { return "LTR"; } function mnpMenuDir() { return "LTR"; } function mnpMenuCT() { return true; } var mnpMenuTop = null; var mnpMenuKill = null; var mnpMenuPopup = null; var mnpMenuUrl = null; var mnpMenuParent = null; var mnpMenuScrollTimer = null; var mnpMenuShadows = new Array(); var mnpMenuDirSave = "LTR"; var mnpMenuCTSave = false; window.attachEvent("onload", mnpMenuInit); function mnpMenuInit() { try { mnpMenuDirSave = mnpMenuDir(); mnpMenuCTSave = mnpMenuCT(); } catch(e) { return; } mnpMenuTop = document.getElementById("mnpMenuTop"); mnpMenuUrl = mnpMenuTop.getAttribute("url"); mnpMenuParent = mnpMenuTop.getAttribute("parent"); mnpMenuAttach(mnpMenuTop); } function mnpPage(label, url, target, menu, linkID) { this.label = label; this.url = url; this.target = target; this.menu = menu; this.linkID = linkID; } function mnpLabel(label) { this.label = label; } function mnpMenuEnter() { if (mnpMenuKill) { window.clearTimeout(mnpMenuKill); mnpMenuKill = null; } } function mnpMenuLeave() { mnpMenuKill = window.setTimeout("mnpMenuKiller()", 200); } function mnpMenuKiller() { mnpKillMenu(mnpMenuTop.getAttribute("currentMenu")); mnpMenuTop.removeAttribute("currentMenu"); } function mnpMenuAttach(el) { el.attachEvent("onmouseenter", mnpMenuEnter); el.attachEvent("onmouseleave", mnpMenuLeave); var divs = el.getElementsByTagName("DIV"); for (var i=0; i < divs.length; i++) { var div = divs.item(i); if (div.className == "mnpMenuRow") { div.attachEvent("onmouseenter", mnpMenuMouseover); div.attachEvent("onmouseleave", mnpMenuMouseout); div.attachEvent("onmousedown", mnpMenuMousedown); div.attachEvent("onmouseup", mnpMenuMouseup); div.setAttribute("save-background", div.style.background); div.setAttribute("save-border", div.style.borderColor); var a = div.getElementsByTagName("A"); if (a.length > 0) { var a0 = a[0]; if (a0.getAttribute("aoff")) a0.outerHTML = a0.innerHTML; else { div.setAttribute("status", a0.href); div.attachEvent("onclick", mnpMenuClick); } } if (div.getAttribute("menu")) { var imgs = div.getElementsByTagName("IMG"); if (imgs.length > 0) { var img = imgs[0]; img.style.visibility = "visible"; } else { var x; if (mnpMenuDirSave == "LTR") x = (div.offsetWidth - 10) + "px"; else if (mnpMenuTop.contains(div)) x = "4px"; else x = "6px"; var img = ""; div.insertAdjacentHTML("afterBegin", img); } } } } } function mnpMenuClick() { var div = window.event.srcElement; var a = div.getElementsByTagName("A"); if (a.length == 0) return; if (window.event.shiftKey) { var target = a[0].target; a[0].target = "_new"; a[0].click(); a[0].target = target; } else a[0].click(); } function mnpKillMenu(id) { if (id == null) return; var menu = document.getElementById(id); var current = menu.getAttribute("currentMenu"); if (current) { mnpKillMenu(current); menu.removeAttribute("currentMenu"); } var temp = mnpMenuShadows[id]; if (temp) { var i; for (i=1; i<=4; i++) document.body.removeChild(temp[i]); mnpMenuShadows[id] == null; } var parent = document.getElementById(menu.getAttribute("parentMenu")); var rows = parent.getElementsByTagName("DIV"); for (var i=0; i"; html += ""; html += "
"; var isThisPage = false; for (var i=0; i" + label + ""; else html += "" + label + ""; } else html += "" + label + ""; html += "
"; } html += ""; html += ""; html += ""; document.body.insertAdjacentHTML("beforeEnd", html); var div = document.getElementById(id); var sa = div.childNodes.item(1); var max = 0; for (var i=0; i max) max = w; } max += 34; if (max < 100) max = 100; else if (max > 410) max = 410; div.style.width = max + "px"; for (var i=0; i bodyHeight) { up.style.display = ""; up.childNodes.item(0).src = "/library/mnp/2/gif/up_disabled.gif"; down.style.display = ""; down.childNodes.item(0).src = "/library/mnp/2/gif/down_enabled.gif"; box.style.height = (bodyHeight - up.offsetHeight - down.offsetHeight - 6) + "px"; } var bodyBottom = bodyTop + bodyHeight; if (y + div.offsetHeight > bodyBottom) y -= div.offsetHeight - 25; if (y < bodyTop) y = bodyTop + (bodyHeight - div.offsetHeight) / 2; if (mnpMenuDirSave == "RTL") x -= div.offsetWidth; div.style.left = x + "px"; div.style.top = y + "px"; div.style.zIndex = parent.style.zIndex + 10; if (div.offsetLeft + div.offsetWidth > bodyWidth + bodyLeft) document.body.scrollLeft = div.offsetLeft + div.offsetWidth - bodyWidth; mnpMenuShadows[id] = mnpMenuShadow(div, "#666666", 4); hide_elements("SELECT", div); hide_elements("OBJECT", div); } function mnpMenuPt(el) { this.left = 0; this.top = 0; while (el) { this.left += el.offsetLeft; this.top += el.offsetTop; el = el.offsetParent; } } function mnpMenuMouseover() { var div = window.event.srcElement; var status = div.getAttribute("status"); var disabledLink = div.getAttribute("disablelink"); if (status) window.status = status; if (disabledLink=='yes') { div.style.background = SubMenuBg; div.style.borderColor = m_bordercolor_selected; } else { div.style.background = m_bordercolor_selected; div.style.borderColor = MenuBorderSelected; } var pt = new mnpMenuPt(div); var x; if (mnpMenuDirSave == "LTR") x = pt.left + div.offsetWidth - 1; else x = pt.left + 2; var y = pt.top - 3; var menu = div.getAttribute("menu"); if (menu) menu = "'" + menu + "'"; else menu = "null"; if (mnpMenuPopup) window.clearTimeout(mnpMenuPopup); var parent = div.parentElement.parentElement; mnpMenuPopup = window.setTimeout("mnpMenuOpen(" + menu + ", '" + parent.id + "', " + x + ", " + y + ")", 200); } function mnpMenuMouseout() { var div = window.event.srcElement; window.status = ""; var disabledLink = div.getAttribute("disablelink"); var menu = div.getAttribute("menu"); if (menu != null && menu == div.parentElement.parentElement.getAttribute("currentMenu")) { if (disabledLink=='yes') { div.style.background = SubMenuBg; div.style.borderColor = m_bordercolor_selected; } else { div.style.background = m_bordercolor_selected; div.style.borderColor = m_bordercolor_selected; } } else { div.style.background = div.getAttribute("save-background"); div.style.borderColor = div.getAttribute("save-border"); } if (mnpMenuPopup) { window.clearTimeout(mnpMenuPopup); mnpMenuPopup = null; } } function mnpMenuMousedown() { var div = window.event.srcElement; var disabledLink = div.getAttribute("disablelink"); if (div.tagName != "DIV") div = div.parentElement; if (disabledLink != "yes") div.style.background = MenuBorderSelected; } function mnpMenuMouseup() { var div = window.event.srcElement; if (div.tagName != "DIV") div = div.parentElement; div.style.background = div.getAttribute("save-background"); } function mnpMenuTime() { var time = new Date(); return time.valueOf(); } function mnpStartScroll(dy) { var src = window.event.srcElement; src.style.background = m_bordercolor_selected; src.style.borderColor = MenuBorderSelected; var div = src.parentElement; div.setAttribute("scrollTime0", mnpMenuTime()); div.setAttribute("scrollTop0", div.childNodes.item(1).scrollTop); mnpMenuScrollTimer = window.setInterval("mnpMenuScroll('" + div.id + "', " + dy + ")", 35); } function mnpStopScroll() { var src = window.event.srcElement; src.style.background = SubMenuBg; src.style.borderColor = SubMenuBg; if (mnpMenuScrollTimer) window.clearInterval(mnpMenuScrollTimer); mnpMenuScrollTimer = null; } function mnpMenuScroll(id, dy) { var div = document.getElementById(id); var current = div.getAttribute("currentMenu"); if (current) { mnpKillMenu(current); div.removeAttribute("currentMenu"); } var box = div.childNodes.item(1); var y = div.getAttribute("scrollTop0") + Math.round((mnpMenuTime() - div.getAttribute("scrollTime0")) * 0.150) * dy box.scrollTop = y; if (y != box.scrollTop) { window.clearInterval(mnpMenuScrollTimer); mnpMenuScrollTimer = null; if (box.scrollTop == 0) div.childNodes.item(0).childNodes.item(0).src = "/library/mnp/2/gif/up_disabled.gif"; else div.childNodes.item(2).childNodes.item(0).src = "/library/mnp/2/gif/down_disabled.gif"; } else if (dy < 0) div.childNodes.item(2).childNodes.item(0).src = "/library/mnp/2/gif/down_enabled.gif"; else div.childNodes.item(0).childNodes.item(0).src = "/library/mnp/2/gif/up_enabled.gif"; } function mnpMenuShadow(el, color, size) { var temp = new Array(); var i; for (i=size; i>0; i--) { var rect = document.createElement('div'); var rs = rect.style rs.position = 'absolute'; rs.left = (el.style.posLeft + i) + 'px'; rs.top = (el.style.posTop + i) + 'px'; rs.width = el.offsetWidth + 'px'; rs.height = el.offsetHeight + 'px'; rs.zIndex = el.style.zIndex - i; rs.backgroundColor = color; var opacity = 1 - i / (i + 1); rs.filter = 'alpha(opacity=' + (100 * opacity) + ')'; document.body.appendChild(rect); temp[i] = rect; } return temp; } var mnpgtCurrent = null; var mnpgtTimer = null; var mnpgtKill = null; var mnpMHCT = false; window.attachEvent("onload", mnpInitMasthead); function mnpInitMasthead() { var mnpMastheadTable = document.getElementById("mnpMastheadTable"); if (mnpMastheadTable) if (mnpMastheadTable.getAttribute("clickTrax")) mnpMHCT = true; var tds = document.getElementsByTagName("TD"); for (var tdi=0; tdi"; var linkIdNum = 0; for (var g=0; g"; for (var i=0; i
"; } html += "
"; } html += ""; document.body.insertAdjacentHTML("beforeEnd", html); div = document.getElementById(guid); } div.style.top = (y + 4) + "px"; div.style.display = ""; if (div.dir.toUpperCase() == "LTR") div.style.left = (x - 8) + "px"; else div.style.left = (x + w + 8 - div.offsetWidth) + "px"; if (div.offsetLeft + div.offsetWidth >= document.body.scrollLeft + document.body.clientWidth) { div.style.left = ""; var h = document.body.scrollLeft + document.body.clientWidth - div.offsetWidth; div.style.left = h + "px"; } if (div.offsetLeft < 0) div.style.left = "0px"; hide_elements("SELECT", div); hide_elements("OBJECT", div); } function MNPGT_onmouseout() { MNPGT_exitRegion(); var el = window.event.srcElement; el.style.color = el.parentNode.style.color; if (mnpgtTimer) { window.clearTimeout(mnpgtTimer); mnpgtTimer = null; } } function MNPGT_menu_onmouseover() { MNPGT_enterRegion(); } function MNPGT_menu_onmouseout() { MNPGT_exitRegion(); } function MNPGT_clientRect(el) { this.left = el.offsetLeft; this.top = el.offsetTop; var temp = el.offsetParent; while (temp) { this.left += temp.offsetLeft; this.top += temp.offsetTop; temp = temp.offsetParent; } this.width = el.offsetWidth; this.right = this.left + this.width; this.height = el.offsetHeight; this.bottom = this.top + this.height; return this; } function hide_elements(tagName, menu) { windowed_element_visibility(tagName, -1, menu) } function show_elements(tagName, menu) { windowed_element_visibility(tagName, +1, menu) } function windowed_element_visibility(tagName, change, menu) { var els = document.getElementsByTagName(tagName) var i var rect = new element_rect(menu) for (i=0; i < els.length; i++) { var el = els.item(i) if (elements_overlap(el, rect)) { if (el.visLevel) el.visLevel += change else el.visLevel = change if (el.visLevel == -1) { el.visibilitySave = el.style.visibility el.style.visibility = "hidden" } else if (el.visLevel == 0) el.style.visibility = el.visibilitySave } } } function element_rect(el) { var left = 0 var top = 0 this.width = el.offsetWidth this.height = el.offsetHeight while (el) { left += el.offsetLeft top += el.offsetTop el = el.offsetParent } this.left = left; this.top = top; } function elements_overlap(el, rect) { var r = new element_rect(el); return ((r.left < rect.left + rect.width) && (r.left + r.width > rect.left) && (r.top < rect.top + rect.height) && (r.top + r.height > rect.top)) } function jsTrim(s) {return s.replace(/(^\s+)|(\s+$)/g, "");} function trackInfo(objLink) { if (!objLink) return; if (!objLink.LinkID || !objLink.href) return; // For Link Text - take innerText if available, or ALT if image var LinkText; //if (objLink.innerText) LinkText = objLink.innerText; // text link //change made 7/19/2002 marmca if (objLink.innerText && jsTrim(objLink.innerText)) LinkText = jsTrim(objLink.innerText);// text link else if (objLink.alt) LinkText = objLink.alt; // image map link else if (objLink.all(0)) LinkText = objLink.all(0).alt; // ... link if (!LinkText || typeof(LinkText)=="undefined") return; LinkText = jsTrim(LinkText); if (LinkText=="") return; // override link's HREF and send on its way // Sometimes with slow browser reaction and rapid clicks this can get called more than once - // ensure there's no repetition. if (objLink.href.toString().indexOf("CTRedir") < 0) objLink.href = objLink.href; } function trackSearch(objLink, objText) { if (!objLink) return true; if (!objText) return true; if (!objLink.LinkID || !objLink.href || !objText.value) return true; // override link's HREF and send on its way // For Link Text - take innerText if available, or ALT if image // Sometimes with slow browser reaction and rapid clicks this can get called more than once - // ensure there's no repetition. if (objLink.href.toString().indexOf("CTRedir") < 0) objLink.href = "/isapi/CTRedir.asp?type=CT&source=WWW&sPage=" + ((objLink.LinkID)?escape(objLink.LinkID):"") + "|" + ((objLink.LinkArea)?escape(objLink.LinkArea):"") + "|" + ((objLink.LinkGroup)?escape(objLink.LinkGroup):"") + "|" + "Search" + "&tPage=" + objLink.href + objText.value; objLink.click(); // click on the link to navigate - allows to have HTTP_REFERRER in CTRedir.asp return false; }