function get(eid) {return document.getElementById(eid);} ; function showSitemapSub(sRef, show) { if ('undefined' == typeof show) show = true; /* try{ // if IE, do special handling for its dumbass event model to prevent on/off flickering // of suboptions displays for extraneous mouse-movement event notifications if (window.event) { // get event-related aspects var evt = window.event; evt.cancelBubble = true; // get sitemap top-level options var list = get('sitemap').childNodes; var last = list.length; var sinkEvt = false; for (var i = 0; i < last; i++) { if (list[i].className && 'sitemapMain' == list[i].className) { sinkEvt = sinkEvt || killShowSitemap(evt, list[i].id); } } if (sinkEvt) return; } } catch (e) { ; // very fast mouse movements onto/off-of sitemap can cause IE to puke an object error...ignore it } */ var subId = sRef.id + 'Sub'; get(subId).style.left = show?'0':'-2000px'; get(subId).style.top = (-get(subId).offsetHeight) + 'px'; } ; function killShowSitemap(evt, optId) { var isOut = 'mouseout' == evt.type; var fromEl = evt.fromElement; var fromId = fromEl.id?fromEl.id:'none'; var toEl = evt.toElement; var toId = toEl.id?toEl.id:'none'; var toEp = toEl.parentNode; var toEpp = toEl.parentNode.parentNode; // true, if moving from open suboptions to external content element of page var toExternal = toEl.className?(containsSubstring(toEl.className,['toolbar', 'cell', 'row', 'frame'])):false; var optSubId = optId + 'Sub'; // construct pro-forma id of corresponding suboption container var isSubOn = 0 <= get(optSubId).offsetLeft; // Boolean to indicate whether suboptions are on-screen // true, if moving from open sub to anther main option var toSibMain = (-1 != fromId.indexOf('Sub')) && (-1 == fromId.indexOf(toId)); // Boolean to indicate whether event is extraneous (true ==> extraneous) var kill = (fromId == optId && toId == optSubId) || // true, if moving from main to sub (fromId == optSubId && toId == optId) || // true, if moving from sub to main ('none' == toId && fromId == optId && isSubOn) || // true, if no to id and moving from main while sub is displayed ('none' == toId && fromId == optSubId && isSubOn) || // true, if no to id and moving from sub while sub is displayed ('none' == fromId && toId == optId && isSubOn) || // true, if no from id and moving to main while sub is displayed ('none' == fromId && toId == optSubId && isSubOn) || // true, if no from id and moving to sub while sub is displayed ('none' == fromId && 'none' == toId && isSubOn); // true, if no from or to id while sub is displayed return kill && !toExternal && ! toSibMain; } ; function containsSubstring(s, sSet) { var last = sSet.length; var contains = false; for (var i = 0; i < last; i++) { contains = -1 != s.indexOf(sSet[i]); if (contains) break; } return contains; } ;