// Filename: shared.js in NTShared.chm // Version post beta 3 (7) // version 07.01.99 //************************************************ EVENT HANDLING ******************************************** //******************************************************************************************************************* // re-directs to the proper event-driven functions. window.onload= loadPage; document.onclick= onclickTriage; document.onmouseover= gettingHot; document.onmouseout= gettingCold; window.onunload=saveChecklistState; window.onresize= resizeDiv; window.onbeforeprint= set_to_print; window.onafterprint= reset_form; //******************************************** USER-DEFINED GLOBAL VARIABLES ************************************ //******************************************************************************************************************** // The images listed below can all be changed by the user. var sPreviousTip= "Previous topic"; var sNextTip= "Next topic"; var sExpandTip= "Expand/collapse"; var sPopupTip= "View definition"; var sShortcutTip= ""; var moniker= "ms-its:"; // moniker= ""; for flat files var sSharedCHM= moniker+"DomainMig.chm::/"; var closed = sSharedCHM + "plusCold.gif"; //image used for collapsed item in callExpand() var closedHot = sSharedCHM + "plusHot.gif"; //hot image used for collapsed item in callExpand() var expand = sSharedCHM + "minusCold.gif"; //image used for expanded item in callExpand() var expandHot = sSharedCHM + "minusHot.gif"; //hot image used for expanded item in callExpand() var previousCold= sSharedCHM + "previousCold.gif"; var previousHot= sSharedCHM + "previousHot.gif"; var nextCold= sSharedCHM + "nextCold.gif"; var nextHot= sSharedCHM + "nextHot.gif"; var shortcutCold= sSharedCHM + "shortcutCold.gif"; var shortcutHot= sSharedCHM + "shortcutHot.gif"; var popupCold= sSharedCHM + "popupCold.gif"; var popupHot= sSharedCHM + "popupHot.gif"; var emptyImg= sSharedCHM + "empty.gif"; //image used for empty expand var noteImg= sSharedCHM + "note.gif"; //image used for notes var tipImg= sSharedCHM + "tip.gif"; //image used for tips var warningImg= sSharedCHM + "warning.gif"; //image used for warnings var cautionImg= sSharedCHM + "caution.gif"; //image used for cautions var importantImg= sSharedCHM + "important.gif"; //image used for important notice var relTopicsImg= sSharedCHM + "rel_top.gif"; //image used for important notice var branchImg= sSharedCHM + "elle.gif"; var branchImg_RTL= sSharedCHM + "elle_rtl.gif"; //******************************************** GLOBAL VARIABLES ****************************************** //******************************************************************************************************** var printing = "FALSE"; var single = "FALSE"; var scroller = "FALSE"; var isRTL= (document.dir=="rtl"); var imgStyleRTL= ""; if (isRTL) imgStyleRTL=" style='filter:flipH' "; var sActX_TDC= "CLASSID='CLSID:333C7BC4-460F-11D0-BC04-0080C7055A83'"; //Tabular Data Control for reusable text data var sSharedReusableTextFile= sSharedCHM + "shared.txt"; // common reusable text file var sSharedReusableTextFileRecord= "para"; //reusable text record var numbers= /\d/g; //javascript regular expression var spaces= /\s/g; //javascript regular expression var semicolon= /;/g; //javascript regular expression var isIE5= (navigator.appVersion.indexOf("MSIE 5")>0) || (navigator.appVersion.indexOf("MSIE")>0 && parseInt(navigator.appVersion)> 4); var isPersistent= false; //******************************************** INITIALIZATION ************************************************* //****************************************************************************************************************** //*** loadPage ********************************************************************************************** // Adds the default image tags and re-usable text to the HTML page. function loadPage(){ isPersistent= (document.all.item("checklist")!=null) && (isIE5); setPreviousNext(); resizeDiv(); if (isPersistent) getChecklistState(); addReusableText(); insertImages(); } //****** setPreviousNext ************************************************************************ ********************************************************************************************* // insert previous/next navbar // called by:
function setPreviousNext(){ var oNav = document.all.item("nav"); if (oNav == null ) return; var sPreviousALT= sPreviousTip; var sNextALT= sNextTip; var sHTMLfile= oNav.innerHTML; var imgPrev= "" +imgPrev + " | " +imgNext+ " |
" +sThumbnailText+"
"; if (isRTL) thumbDiv.style.styleFloat= "right"; } document.anchors[i].innerHTML = imgInsert + document.anchors[i].innerHTML; if (isRTL) document.anchors[i].dir="rtl"; } } //***** onclickTriage **************************************************************************************** // redirects to the appropriate function based on the ID of the clicked tag. function onclickTriage(){ var e= window.event.srcElement; // if the innerHTML in the tag is encapsulated by a style tag or hightlighted in the word seach, // the parentElement is called. for (var i=0; i < 5; i++) if (e.tagName!="A" && e.parentElement!=null) e= e.parentElement; eID= e.id.toLowerCase(); if (popupOpen) closePopup(); // expand image in a new window if (eID=="thumbnail" || eID=="pophtm") popNewWindow(e); else if (eID=="thumbnailweb") callThumbnailWeb(e); else if (eID=="wpopup") callPopup(e); else if (eID=="wpopupweb") callPopupWeb(e); else if (eID=="shortcut") callShortcut(e); else if (eID=="reltopics") callRelatedTopics(e); else if (eID=="altloc") callAltLocation(e); else if (eID=="expand") callExpand(e); return; } //*** gettingHot **************************************************************************************** // Makes all the required changes for mouseover. function gettingHot() { var e = window.event.srcElement; if (e.id.toLowerCase()=="cold") e.id ="hot"; else if (e.src== previousCold) e.src = previousHot; else if (e.className.toLowerCase()=="navbar" && e.children.tags("IMG")(0).src== previousCold) e.children.tags("IMG")(0).src= previousHot; else if (e.src== nextCold) e.src = nextHot; else if (e.className.toLowerCase()=="navbar" && e.children.tags("IMG")(0).src== nextCold) e.children.tags("IMG")(0).src= nextHot; else if (e.className.toLowerCase()=="shortcut" && e.tagName=="IMG") e.src = shortcutHot; //