Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

686 lines
26 KiB

  1. //************************************************ EVENT HANDLING ********************************************
  2. //*******************************************************************************************************************
  3. // re-directs to the proper event-driven functions.
  4. document.onclick= onclickTriage;
  5. //******************************************** USER-DEFINED GLOBAL VARIABLES ************************************
  6. //********************************************************************************************************************
  7. // The images listed below can all be changed by the user.
  8. var sPreviousTip= "Previous topic";
  9. var sNextTip= "Next topic";
  10. var sExpandTip= "Expand/collapse";
  11. var sPopupTip= "View definition";
  12. var sShortcutTip= "";
  13. var moniker= "ms-its:"; // moniker= ""; for flat files
  14. var sSharedCHM= moniker+"ntshared.chm::/";
  15. var closed = sSharedCHM + "plusCold.gif"; //image used for collapsed item in callExpand()
  16. var closedHot = sSharedCHM + "plusHot.gif"; //hot image used for collapsed item in callExpand()
  17. var expand = sSharedCHM + "minusCold.gif"; //image used for expanded item in callExpand()
  18. var expandHot = sSharedCHM + "minusHot.gif"; //hot image used for expanded item in callExpand()
  19. var previousCold= sSharedCHM + "previousCold.gif";
  20. var previousHot= sSharedCHM + "previousHot.gif";
  21. var nextCold= sSharedCHM + "nextCold.gif";
  22. var nextHot= sSharedCHM + "nextHot.gif";
  23. var shortcutCold= sSharedCHM + "shortcutCold.gif";
  24. var shortcutHot= sSharedCHM + "shortcutHot.gif";
  25. var popupCold= sSharedCHM + "popupCold.gif";
  26. var popupHot= sSharedCHM + "popupHot.gif";
  27. var emptyImg= sSharedCHM + "empty.gif"; //image used for empty expand
  28. var noteImg= sSharedCHM + "note.gif"; //image used for notes
  29. var tipImg= sSharedCHM + "tip.gif"; //image used for tips
  30. var warningImg= sSharedCHM + "warning.gif"; //image used for warnings
  31. var cautionImg= sSharedCHM + "caution.gif"; //image used for cautions
  32. var importantImg= sSharedCHM + "important.gif"; //image used for important notice
  33. var relTopicsImg= sSharedCHM + "rel_top.gif"; //image used for important notice
  34. var branchImg= sSharedCHM + "elle.gif";
  35. var branchImg_RTL= sSharedCHM + "elle_rtl.gif";
  36. //******************************************** GLOBAL VARIABLES ******************************************
  37. //********************************************************************************************************
  38. var printing = "FALSE";
  39. var single = "FALSE";
  40. var isRTL= (document.dir=="rtl");
  41. var imgStyleRTL= "";
  42. if (isRTL) imgStyleRTL=" style='filter:flipH' ";
  43. var sActX_TDC= "CLASSID='CLSID:333C7BC4-460F-11D0-BC04-0080C7055A83'"; //Tabular Data Control for reusable text data
  44. var sSharedReusableTextFile= sSharedCHM + "shared.txt"; // common reusable text file
  45. var sSharedReusableTextFileRecord= "para"; //reusable text record
  46. var numbers= /\d/g; //javascript regular expression
  47. var spaces= /\s/g; //javascript regular expression
  48. var semicolon= /;/g; //javascript regular expression
  49. var isIE5= (navigator.appVersion.indexOf("MSIE 5")>0) || (navigator.appVersion.indexOf("MSIE")>0 && parseInt(navigator.appVersion)> 4);
  50. var isPersistent= false;
  51. //***** onclickTriage ****************************************************************************************
  52. // redirects to the appropriate function based on the ID of the clicked <A> tag.
  53. function onclickTriage(){
  54. var e= window.event.srcElement;
  55. // if the innerHTML in the <a> tag is encapsulated by a style tag or hightlighted in the word search,
  56. // the parentElement is called.
  57. for (var i=0; i < 5; i++)
  58. if (e.tagName!="A" && e.parentElement!=null) e= e.parentElement;
  59. eID= e.id.toLowerCase();
  60. if (popupOpen) closePopup();
  61. // expand image in a new window
  62. if (eID=="thumbnail" || eID=="pophtm") popNewWindow(e);
  63. else if (eID=="thumbnailweb") callThumbnailWeb(e);
  64. else if (eID=="wpopup") callPopup(e);
  65. else if (eID=="wpopupweb") callPopupWeb(e);
  66. else if (eID=="shortcut") callShortcut(e);
  67. else if (eID=="reltopics") callRelatedTopics(e);
  68. else if (eID=="altloc") callAltLocation(e);
  69. else if (eID=="expand") callExpand(e);
  70. return;
  71. }
  72. //****************************************** OBJECT CONSTRUCTION **************************************
  73. //*****************************************************************************************************
  74. // Uses an A tag to pass parameters between an HTML page and this script.
  75. // Creates an ActiveX Object from these parameters, appends the Object to the end of the page,
  76. // and clicks it. These objects relate to HTMLHelp environment and information about them can be found on the http://HTMLHelp site.
  77. // Object construction variables *********************************************************************
  78. var sParamCHM,sParamFILE, sParamEXEC, sParamMETA,iEND;
  79. var sActX_HH= " type='application/x-oleobject' classid='clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11' ";
  80. //*** callPopup ***************************************************************************************
  81. // creates an object from an <A> tag HREF, the object inserts a winhelp popup
  82. // called by: <A ID="wPopup" HREF="HELP=@@file_name.hlp@@ TOPIC=@@topic#@@">@@Popup text@@</A>
  83. function callPopup(eventSrc) {
  84. var e= eventSrc;
  85. var eH= unescape(e.href);
  86. var eH_= eH.toLowerCase();
  87. event.returnValue = false;
  88. var iTOPIC = eH_.lastIndexOf("topic=");
  89. if (iTOPIC==-1) return;
  90. sParamTOPIC = eH.substring((iTOPIC+6),eH.length); // extracts the topic for item2
  91. var iHELP = eH_.lastIndexOf("help=");
  92. if (iHELP==-1) return;
  93. sParamHELP = eH.substring(iHELP+5,iTOPIC); // extracts the help file for item1
  94. if (document.hhPopup) document.hhPopup.outerHTML = ""; // if hhPopup object exists, clears it
  95. var h= "<object id='hhPopup'"+ sActX_HH + "STYLE='display:none'><param name='Command' value='WinHelp, Popup'>";
  96. h= h + "<param name='Item1' value='" + sParamHELP + "'><param name='Item2' value='" + sParamTOPIC + "'></object>";
  97. document.body.insertAdjacentHTML("beforeEnd", h);
  98. document.hhPopup.hhclick();
  99. }
  100. //*** callAltLocation******************************************************************************
  101. // creates an object from an <A> tag HREF, the object will navigate to the alternate location if the first location is not found.
  102. // called from: <A ID="altLoc" HREF="CHM=@@1st_chm_name.chm;Alt_chm_name.chm@@ FILE=@@1st_file_name.htm;Alt_file_name.htm@@">@@Link text here@@</A>
  103. function callAltLocation(eventSrc) {
  104. var e= eventSrc;
  105. var eH= unescape(e.href);
  106. var eH_= eH.toLowerCase();
  107. var sFILEarray,sCHMarray;
  108. event.returnValue = false;
  109. var sParamTXT= e.innerHTML;
  110. sParamTXT= sParamTXT.replace(semicolon,"");
  111. var iFILE = eH_.lastIndexOf("file=");
  112. if (iFILE==-1) return;
  113. sParamFILE= eH.substring((iFILE+5),eH.length); // extracts the 2 HTM files
  114. sParamFILE= sParamFILE.replace(spaces,"");
  115. iSPLIT= sParamFILE.match(semicolon);
  116. if (iSPLIT)
  117. sFILEarray = sParamFILE.split(";"); // separates the 2 HTM files
  118. else return;
  119. var iCHM = eH_.lastIndexOf("chm=");
  120. if(iCHM==-1) return;
  121. else sParamCHM = eH.substring(iCHM+4,iFILE); // extracts the 2 CHM's
  122. sParamCHM= sParamCHM.replace(spaces,"");
  123. iSPLIT= sParamCHM.match(semicolon);
  124. if (iSPLIT)
  125. sCHMarray= sParamCHM.split(";"); // separates the 2 CHM's
  126. else return;
  127. sParamFILE= moniker + sCHMarray[0]+ "::/" + sFILEarray[0] + ";" + moniker + sCHMarray[1]+ "::/" + sFILEarray[1];
  128. if (document.hhAlt) document.hhAlt.outerHTML = ""; // if hhAlt object exists, clears it
  129. var h= "<object id='hhAlt'"+ sActX_HH + "STYLE='display:none'><PARAM NAME='Command' VALUE='Related Topics'>";
  130. h= h + "<param name='Item1' value='" + sParamTXT +";" + sParamFILE + "'></object>";
  131. document.body.insertAdjacentHTML("beforeEnd", h);
  132. document.hhAlt.hhclick();
  133. }
  134. //*** callRelatedTopics******************************************************************************
  135. // creates an object from an <A> tag HREF, the object inserts a popup of the related topics to select
  136. // called from: <A ID="relTopics" HREF="CHM=@@chm_name1.chm;chm_name2.chm@@ META=@@a_filename1;a_filename2@@">Related Topics</A>
  137. function callRelatedTopics(eventSrc) {
  138. var e= eventSrc;
  139. var eH= unescape(e.href);
  140. var eH_= eH.toLowerCase();
  141. event.returnValue = false;
  142. var iMETA = eH_.lastIndexOf("meta=");
  143. if (iMETA==-1) return;
  144. sParamMETA = eH.substring((iMETA+5),eH.length); // extracts the META keywords for item2
  145. var iCHM = eH_.lastIndexOf("chm=");
  146. if(iCHM==-1) sParamCHM = "";
  147. else sParamCHM = eH.substring(iCHM+4,iMETA); // extracts the CHM files for item1
  148. if (document.hhRel) document.hhRel.outerHTML = ""; // if hhRel object exists, clears it
  149. var h= "<object id='hhRel'"+ sActX_HH + "STYLE='display:none'><param name='Command' value='ALink,MENU'>";
  150. h= h + "<param name='Item1' value='" + sParamCHM + "'><param name='Item2' value='" + sParamMETA + "'></object>";
  151. document.body.insertAdjacentHTML("beforeEnd", h);
  152. document.hhRel.hhclick();
  153. }
  154. //*** popNewWindow***************************************************************************************
  155. // creates an object from an <A> tag HREF, the object then opens a new window from the image URL found in the HREF
  156. // called from: <a id="thumbnail" title="Enlarge figure" href="CHM=NTArt.chm FILE=@@image_name.gif@@">@@alt text here@@</A>
  157. // the thumbnail image is loaded by loadPage();
  158. function popNewWindow(eventSrc) {
  159. var eH= eventSrc.href;
  160. event.returnValue = false;
  161. // extracts the thumbnail image URL from the <a> tag HREF
  162. sParamFILE = getURL(eH);
  163. if (sParamFILE=="") return;
  164. // if the hhWindow object exists, clears it
  165. if (document.hhWindow) document.hhWindow.outerHTML = "";
  166. var h = "<object id='hhWindow'"+ sActX_HH +" STYLE='display:none'><param name='Command' value='Related Topics'>";
  167. h = h + "<param name='Window' value='$global_largeart'><param name='Item1' value='$global_largeart;" + moniker + sParamFILE+ "'> </object>";
  168. document.body.insertAdjacentHTML("beforeEnd", h);
  169. document.hhWindow.hhclick();
  170. }
  171. //*** callShortcut ***************************************************************************************
  172. // creates an object from an <A> tag, the object then calls the executable code
  173. // called from: <A ID="shortcut" HREF="EXEC=@@executable_name.exe@@ CHM=ntshared.chm FILE=@@error_file_name.htm@@">@@Shortcut text@@</A>
  174. // the shortcut image is loaded by loadInitialImg();
  175. function callShortcut(eventSrc) {
  176. var e= eventSrc;
  177. var eH= unescape(e.href);
  178. var eH_= eH.toLowerCase();
  179. event.returnValue = false;
  180. // extracts the error file URL from the <a> tag HREF
  181. iEND= eH.length;
  182. sParamFILE = getURL(eH);
  183. var iEXEC = eH_.lastIndexOf("exec=");
  184. if (iEXEC==-1) return;
  185. else sParamEXEC = eH.substring(iEXEC+5,iEND); // extracts the executable for item1
  186. if (document.hhShortcut) document.hhShortcut.outerHTML = ""; // if the hhShortcut object exists, clears it
  187. var h = "<object id='hhShortcut'"+ sActX_HH +" STYLE='display:none'> <param name='Command' value='ShortCut'>";
  188. if(sParamFILE != "") h = h + "<param name='Window' value='" + moniker + sParamFILE+ "'>";
  189. h = h + "<param name='Item1' value='" + sParamEXEC + "'><param name='Item2' value='msg,1,1'></object>";
  190. document.body.insertAdjacentHTML("beforeEnd", h);
  191. document.hhShortcut.hhclick();
  192. }
  193. //**************************************** EXPAND FUNCTIONS *********************************************************
  194. //********************************************************************************************************************
  195. //** callExpand **************************************************************************************************
  196. // This expands & collapses (based on current state) "expandable" nodes as they are clicked.
  197. // Called by: <A ID="expand" href="#">@@Hot text@@</A>
  198. // Followed by: <div class="expand">
  199. function callExpand(eventSrc) {
  200. var e= eventSrc;
  201. event.returnValue = false; // prevents navigating for <A> tag
  202. var oExpandable = getExpandable(e);
  203. var oImg = getImage(e);
  204. if (oExpandable.style.display == "block")
  205. doCollapse(oExpandable, oImg);
  206. else doExpand(oExpandable, oImg);
  207. }
  208. //** expandGoesHot *********************************************************************************************
  209. // Returns expand image to hot.
  210. function expandGoesHot(eventSrc){
  211. var e= eventSrc;
  212. var oExpandable = getExpandable(e);
  213. var oImg = getImage(e);
  214. if (oExpandable.style.display == "block") oImg.src = expandHot;
  215. else oImg.src = closedHot;
  216. }
  217. //** expandGoesCold *********************************************************************************************
  218. // Returns expand image to cold.
  219. function expandGoesCold(eventSrc){
  220. var e= eventSrc;
  221. var oExpandable = getExpandable(e);
  222. var oImg = getImage(e);
  223. if (oExpandable.style.display == "block") oImg.src = expand;
  224. else oImg.src = closed;
  225. }
  226. //** getExpandable *****************************[used by callExpand, expandGoesHot, expandGoesCold]*******
  227. // Determine if the element is an expandable node or a child of one.
  228. function getExpandable(eventSrc){
  229. var e = eventSrc;
  230. var iNextTag, oExpandable;
  231. for (var i=1;i<4; i++){
  232. iNextTag= e.sourceIndex+e.children.length+i;
  233. oExpandable= document.all(iNextTag);
  234. if (oExpandable.className.toLowerCase()=="expand" || iNextTag == document.all.length)
  235. break;
  236. }
  237. return oExpandable;
  238. }
  239. //** getImage ***********************************[used by callExpand, expandGoesHot, expandGoesCold]*******
  240. // Find the first image in the children of the current srcElement.
  241. // (allows the image to be placed anywhere inside the <A HREF> tag)
  242. function getImage(header) {
  243. var oImg = header;
  244. if(oImg.tagName != "IMG") oImg=oImg.children.tags("IMG")(0);
  245. return oImg;
  246. }
  247. //**** expandAll *******************************************************************************************************
  248. // Will expand or collapse all "expandable" nodes when clicked. [calls closeAll()]
  249. // called by: <A HREF="#" onclick="expandAll();">expand all</A>
  250. var stateExpand = false; //applies to the page
  251. //**** ****************************************************************************************************************
  252. function expandAll() {
  253. var oExpandToggle, oImg;
  254. var expandAllMsg = "expand all"; //message returned when CloseAll() is invoked
  255. var closeAllMsg = "close all"; //message returned when ExpandAll() is invoked
  256. var e= window.event.srcElement;
  257. event.returnValue = false;
  258. for (var i=0; i< document.anchors.length; i++){
  259. oExpandToggle = document.anchors[i];
  260. if (oExpandToggle.id.toLowerCase() == "expand"){
  261. oExpandable = getExpandable(oExpandToggle);
  262. oImg = getImage(oExpandToggle);
  263. if (stateExpand == true) doCollapse(oExpandable, oImg);
  264. else doExpand(oExpandable, oImg);
  265. }
  266. }
  267. if (stateExpand == true) {
  268. stateExpand = false;
  269. e.innerText= expandAllMsg;
  270. }
  271. else {
  272. stateExpand = true;
  273. e.innerText= closeAllMsg;
  274. }
  275. }
  276. //**** doExpand *******************************************************************************************************
  277. // Expands expandable block & changes image
  278. var redo = false;
  279. function doExpand(oToExpand, oToChange) {
  280. var oExpandable= oToExpand;
  281. var oImg= oToChange;
  282. oImg.src = expand;
  283. oExpandable.style.display = "block";
  284. if (!redo && !isIE5) {
  285. redo = true;
  286. focus(oToExpand);
  287. doExpand(oToExpand, oToChange);
  288. }
  289. }
  290. //**** doCollapse *****************************************************************************************************
  291. // Collapses expandable block & changes image
  292. function doCollapse(oToCollapse, oToChange) {
  293. if (printing == "TRUE") return;
  294. var oExpandable= oToCollapse;
  295. var oImg= oToChange;
  296. oExpandable.style.display = "none";
  297. oImg.src = closed;
  298. }
  299. //*******************************************************************************************************
  300. //******* WEB FUNCTIONS **************************************************************************
  301. //*******************************************************************************************************
  302. //**** callThumbnailWeb **************************************************************************************
  303. function callThumbnailWeb(eventSrc) {
  304. var e= eventSrc;
  305. event.returnValue = false;
  306. var thumbnailWin= window.open (e.href, "$global_largeart", "height=450, width=600, left=10, top=10, dependent=yes, resizable=yes, status=no, directories=no, titlebar=no, toolbar=yes, menubar=no, location=no","true");
  307. thumbnailWin.document.write ("<html><head><title>Windows 2000</title></head><body><img src='"+e.href+"'></body></html>");
  308. return;
  309. }
  310. //*********************************************************************************************************
  311. //*********************************************************************************************************
  312. var popupOpen= false; //state of popups
  313. var posX, posY; //coordinates of popups
  314. var oPopup; //object to be used as popup content
  315. //**** callPopupWeb **************************************************************************************
  316. // the web popups have been converted from the object winHelp popup for the web.
  317. // called by: <A ID="wPopupWeb" HREF="#">@@Popup text@@</A>
  318. // followed by: <div class="popup">Popup content</div>
  319. function callPopupWeb(eventSrc) {
  320. var e= eventSrc;
  321. // find the popup <div> that follows <a id="wPopupWeb"></a>
  322. findPopup(e);
  323. positionPopup(e)
  324. oPopup.style.visibility = "visible";
  325. popupOpen = true;
  326. return;
  327. }
  328. //**** findPopup ****************************************************************************************
  329. function findPopup(oX){
  330. var e= oX;
  331. var iNextTag;
  332. for (var i=1;i<4; i++){
  333. iNextTag= e.sourceIndex + i;
  334. oPopup= document.all(iNextTag);
  335. if (oPopup.className.toLowerCase()=="popup" || iNextTag == document.all.length)
  336. break;
  337. }
  338. if (iNextTag != document.all.length) {
  339. posX = window.event.clientX;
  340. posY = window.event.clientY + document.body.scrollTop+10;
  341. }
  342. else closePopup();
  343. }
  344. //**** positionPopup ************************************************************************************
  345. // Set size and position of popup.
  346. // If it is off the page, move up, but not past the very top of the page.
  347. function positionPopup(oX){
  348. var e= oX;
  349. var popupOffsetWidth = oPopup.offsetWidth;
  350. //determine if popup will be offscreen to right
  351. var rightlimit = posX + popupOffsetWidth;
  352. if (rightlimit >= document.body.clientWidth)
  353. posX -= (rightlimit - document.body.clientWidth);
  354. if (posX < 0) posX = 0;
  355. //position popup
  356. oPopup.style.top = posY;
  357. oPopup.style.left = posX;
  358. var pageBottom = document.body.scrollTop + document.body.clientHeight;
  359. var popupHeight = oPopup.offsetHeight;
  360. if (popupHeight + posY >= pageBottom) {
  361. if (popupHeight <= document.body.clientHeight)
  362. oPopup.style.top = pageBottom - popupHeight;
  363. else
  364. oPopup.style.top = document.body.scrollTop;
  365. }
  366. }
  367. //**** closePopup ****************************************************************************************
  368. // Close Popup
  369. function closePopup() {
  370. oPopup.style.visibility = "hidden";
  371. popupOpen = false;
  372. return;
  373. }
  374. //********************************************* GENERAL FUNCTIONS ************************************************
  375. //**************************************************************************************************************************
  376. //***ajustImg *************************************************************************************************************
  377. // expands an image to the with of the window or shrinks it to 90px
  378. function ajustImg(eventSrc) {
  379. var e= eventSrc;
  380. var fullWidth= document.body.offsetWidth;
  381. fullWidth = fullWidth - 50;
  382. if (e.style.pixelWidth==90)
  383. e.style.pixelWidth=fullWidth;
  384. else e.style.pixelWidth=90;
  385. }
  386. //** getURL **************************************[used in callShortcut, popNewWindow& loadPage]********
  387. // extracts the file location (CHM::/HTM) URL
  388. function getURL(sHREF) {
  389. var spaces= /\s/g
  390. var eH = unescape(sHREF);
  391. eH = eH.replace(spaces,"");
  392. var eH_= eH.toLowerCase();
  393. var sParamFILE= "";
  394. var sParamCHM= "";
  395. var iFILE= eH_.lastIndexOf("file=");
  396. if (iFILE!=-1){
  397. iEND= iFILE +1;
  398. sParamFILE = eH.substring(iFILE+5,eH.length);
  399. }
  400. var iCHM = eH_.lastIndexOf("chm=");
  401. if (iCHM!=-1){
  402. iEND = iCHM +1; // iEND used by callShortcut
  403. sParamCHM = eH.substring(iCHM+4, iFILE);
  404. sParamFILE= sParamCHM+"::/"+sParamFILE;
  405. }
  406. return sParamFILE;
  407. }
  408. //****************************************************************************************************************************
  409. //******************************************** IE5 PERSISTENCE *************************************************************
  410. //****************************************************************************************************************************
  411. var oTD,iTD; // persistence
  412. //****** Persistence for userData *********************************************************************************************
  413. function getChecklistState(){
  414. var pageID= addID();
  415. if (checklist.all== "[object]") {
  416. oTD=checklist.all.tags("INPUT");
  417. iTD= oTD.length;
  418. }
  419. else
  420. {
  421. printing = "TRUE";
  422. isPersistent = false;
  423. return;
  424. }
  425. if (iTD == 0){
  426. printing = "TRUE";
  427. isPersistent = false;
  428. return;
  429. }
  430. checklist.load("oXMLStore");
  431. if (checklist.getAttribute("sPersist"+pageID+"0"))
  432. for (i=0; i<iTD; i++){
  433. if (oTD[i].type =="checkbox" || oTD[i].type =="radio"){
  434. checkboxValue= checklist.getAttribute("sPersist"+pageID+i);
  435. if (checkboxValue=="yes") oTD[i].checked=true;
  436. else oTD[i].checked=false;
  437. }// if
  438. if (oTD[i].type =="text")
  439. oTD[i].value= checklist.getAttribute("sPersist"+pageID+i);
  440. }// for
  441. } // end persistence
  442. //** saveChecklistState *************************************************************************************************************
  443. function saveChecklistState(){
  444. var pageID= addID();
  445. if (!isPersistent) return;
  446. for (i=0; i<iTD; i++){
  447. if (oTD[i].type =="checkbox" || oTD[i].type =="radio"){
  448. if (oTD[i].checked) checkboxValue="yes";
  449. else checkboxValue="no";
  450. checklist.setAttribute("sPersist"+pageID+i, checkboxValue);
  451. }// if
  452. if (oTD[i].type =="text")
  453. checklist.setAttribute("sPersist"+pageID+i, oTD[i].value);
  454. } // for
  455. checklist.save("oXMLStore");
  456. }//end function
  457. //** resizeDiv *******************************[used with callPopupWeb, setPreviousNext}****************************************************
  458. // resize the page when the <div class=nav></div> && <div class=text></div> are found
  459. function resizeDiv(){
  460. if (printing == "TRUE") return;
  461. var oNav = document.all.item("nav");
  462. var oText= document.all.item("text");
  463. if (popupOpen) closePopup();
  464. if (oText == null) return;
  465. if (oNav != null){
  466. document.all.nav.style.width= document.body.offsetWidth;
  467. document.all.text.style.width= document.body.offsetWidth-4;
  468. document.all.text.style.top= document.all.nav.offsetHeight;
  469. if (document.body.offsetHeight > document.all.nav.offsetHeight)
  470. document.all.text.style.height= document.body.offsetHeight - document.all.nav.offsetHeight;
  471. else document.all.text.style.height=0;
  472. }
  473. }
  474. //** addID *************************************************************************************************************
  475. function addID(){
  476. var locID = document.location.href;
  477. var iHTM = locID.lastIndexOf(".htm");
  478. var iName=locID.lastIndexOf("/");
  479. locID = locID.substring(iName+1,iHTM);
  480. return locID;
  481. }
  482. //** set_to_print ***************
  483. function set_to_print(){
  484. var i;
  485. printing = "TRUE";
  486. for (i=0; i < document.all.length; i++){
  487. if (document.all[i].id == "expand") {
  488. callExpand(document.all[i]);
  489. single = "TRUE";
  490. }
  491. if (document.all[i].tagName == "BODY") {
  492. document.all[i].scroll = "auto";
  493. }
  494. if (document.all[i].tagName == "A") {
  495. document.all[i].outerHTML = "<A HREF=''>" + document.all[i].innerHTML + "</a>";
  496. }
  497. }
  498. }
  499. //** used to reset a page if needed ********************
  500. function reset_form(){
  501. if (single == "TRUE") document.location.reload();
  502. }
  503. //** on error routine *********************************
  504. function errorHandler() {
  505. // alert("Error Handled");
  506. return true;
  507. }