home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 2001 July / VPR0107A.BIN / ACCESSIB.CHM / shared.js < prev    next >
Text (UTF-16)  |  2000-06-19  |  84KB  |  1,060 lines

  1. // Filename: shared.js in IEIEShared.chm
  2. // Version post beta 3 (7)
  3. // version 07.01.99
  4.  
  5. //************************************************ EVENT HANDLING ********************************************
  6. //*******************************************************************************************************************
  7. //  re-directs to the proper event-driven functions.
  8.  
  9. window.onload= loadPage;
  10. document.onclick= onclickTriage;
  11. document.onmouseover= gettingHot;
  12. document.onmouseout= gettingCold;
  13. window.onunload=saveChecklistState;
  14. window.onresize= resizeDiv;
  15.  
  16. //window.onbeforeprint= set_to_print;
  17. //window.onafterprint= reset_form;
  18. //********************************************  USER-DEFINED GLOBAL VARIABLES  ************************************
  19. //********************************************************************************************************************
  20. //  The images listed below can all be changed by the user.
  21.  
  22. var sPreviousTip= "前のトピックへ";
  23. var sNextTip= "次のトピックへ";
  24. var sExpandTip= "展開/折りたたみ";
  25. var sPopupTip= "定義を表示";
  26. var sShortcutTip= "";
  27.  
  28. var moniker= "ms-its:";                                         // moniker= ""; for flat files
  29. var sSharedCHM= moniker+"IEShared.chm::/";
  30.  
  31. var closed = sSharedCHM + "plusCold.gif";                //image used for collapsed item in callExpand()
  32. var closedHot = sSharedCHM + "plusHot.gif";            //hot image used for collapsed item in callExpand()
  33. var expand = sSharedCHM + "minusCold.gif";            //image used for expanded item in callExpand()
  34. var expandHot = sSharedCHM + "minusHot.gif";        //hot image used for expanded item in callExpand()
  35.  
  36. var previousCold= sSharedCHM + "previousCold.gif";
  37. var previousHot= sSharedCHM + "previousHot.gif"; 
  38. var nextCold= sSharedCHM + "nextCold.gif";
  39. var nextHot= sSharedCHM + "nextHot.gif"; 
  40.  
  41. var shortcutCold= sSharedCHM + "shortcutCold.gif";
  42. var shortcutHot= sSharedCHM + "shortcutHot.gif";
  43.  
  44. var popupCold= sSharedCHM + "popupCold.gif";
  45. var popupHot= sSharedCHM + "popupHot.gif";
  46.  
  47. var emptyImg= sSharedCHM + "empty.gif";        //image used for empty expand
  48. var noteImg= sSharedCHM + "note.gif";            //image used for notes
  49. var tipImg= sSharedCHM + "tip.gif";            //image used for tips
  50. var warningImg= sSharedCHM + "warning.gif";        //image used for warnings
  51. var cautionImg= sSharedCHM + "caution.gif";        //image used for cautions
  52. var importantImg= sSharedCHM + "important.gif";        //image used for important notice
  53. var relTopicsImg= sSharedCHM + "rel_top.gif";        //image used for important notice
  54.  
  55. var branchImg= sSharedCHM + "elle.gif";
  56. var branchImg_RTL= sSharedCHM + "elle_rtl.gif";
  57.  
  58.  
  59. //********************************************  GLOBAL VARIABLES  ******************************************
  60. //********************************************************************************************************
  61.  
  62. var printing = "FALSE";
  63. var single = "FALSE";
  64. var scroller = "FALSE";
  65. var isRTL= (document.dir=="rtl");
  66. var imgStyleRTL= ""; 
  67.       if (isRTL) imgStyleRTL=" style='filter:flipH' ";
  68.  
  69. var sActX_TDC= "CLASSID='CLSID:333C7BC4-460F-11D0-BC04-0080C7055A83'";        //Tabular Data Control  for  reusable text data
  70. var sSharedReusableTextFile= sSharedCHM + "shared.txt";                                        // common reusable text file
  71. var sSharedReusableTextFileRecord= "para";                                                        //reusable text record
  72.  
  73. var numbers= /\d/g;                //javascript regular expression
  74. var spaces= /\s/g;                //javascript regular expression
  75. var semicolon= /;/g;            //javascript regular expression
  76.  
  77. var isIE5= (navigator.appVersion.indexOf("MSIE 5")>0) || (navigator.appVersion.indexOf("MSIE")>0 && parseInt(navigator.appVersion)> 4);
  78. var isPersistent= false;
  79.  
  80.  
  81. //********************************************  INITIALIZATION  *************************************************
  82. //******************************************************************************************************************
  83.  
  84. //*** loadPage **********************************************************************************************
  85. //  Adds the default image tags and re-usable text to the HTML page.
  86.  
  87. function loadPage(){
  88. isPersistent= (document.all.item("checklist")!=null) && (isIE5);
  89.  
  90.   setPreviousNext();
  91.   resizeDiv();
  92.   if (isPersistent) getChecklistState();
  93.   addReusableText();
  94.   insertImages();
  95. }
  96.  
  97. //****** setPreviousNext  ************************************************************************ ********************************************************************************************* 
  98. // insert previous/next navbar
  99. // called by: <div id="nav">@@HTMLsequenceFile.txt or .lst@@</div>
  100.  
  101. function setPreviousNext(){
  102.  
  103.  
  104.   var oNav = document.all.item("nav");
  105.         if (oNav == null ) return;
  106.   
  107.   var sPreviousALT= sPreviousTip;
  108.   var sNextALT= sNextTip;
  109.   var sHTMLfile= oNav.innerHTML;
  110.  
  111.   var imgPrev= "<IMG SRC='"+previousCold+"' BORDER=0 ALT='"+ sPreviousALT +"' ALIGN='top' "+ imgStyleRTL +">";
  112.   var imgNext= "<IMG SRC='"+nextCold+"' BORDER=0 ALT='"+ sNextALT  + "' ALIGN='top' "+ imgStyleRTL +">";
  113.   
  114.   var previousNextObject= "<OBJECT ID='HTMlist' WIDTH=100 HEIGHT=51 " + sActX_TDC +"><param name='DataURL' value='"
  115.         +sHTMLfile +"'><param name='UseHeader' value=True></OBJECT>";
  116.       
  117.         oNav.innerHTML= "<TABLE WIDTH='100%' STYLE='margin-top:0;' cellspacing=0>"
  118.         + "<TR><TD style='text-align=left; background-color:transparent'><A ID='previousLink' HREF='#' REL='previous' CLASS='navbar'>"
  119.         +imgPrev + "</A></TD><TD width='100%' align='center'></td><TD style='text-align=right; background-color:transparent'><A ID='nextLink' HREF='#' REL='next' CLASS='navbar'>"
  120.         +imgNext+ "</A></TD></TR></TABLE>";
  121.                     
  122.       document.body.innerHTML= document.body.innerHTML +  previousNextObject;
  123.       findPageSeq();
  124.       if (printing == "TRUE") return;
  125.       var  thisLoc= document.location.href +"#";
  126.  
  127.       if (previousLink.href== thisLoc) previousLink.style.display="none";
  128.       else  previousLink.style.display="block";
  129.  
  130.       if (nextLink.href== thisLoc) nextLink.style.display="none";
  131.       else  nextLink.style.display="block";
  132.       
  133. }
  134.  
  135. //****** findPageSeq *********************************************************************************************
  136. // finds this page in the "html sequence list" file (filename.lst) and determines the previous & next pages from the list
  137. // the list is created from a tool named "chumper"
  138.  
  139. function findPageSeq() {
  140.  
  141. var rs= HTMlist.recordset;
  142. var thisLoc= document.location.href;
  143. var iLoc= thisLoc.lastIndexOf("/");
  144.  
  145.     if (iLoc > 0) thisLoc= thisLoc.substring(iLoc+1, thisLoc.length);
  146.     
  147.     
  148.     if (nav.style == "[object]") {
  149.                 nav.style.visibility="hidden";
  150.                 printing = "FALSE";
  151.                 }
  152.         else
  153.             {
  154.                 printing = "TRUE";
  155.                 return;
  156.             }
  157.     
  158.        
  159.     rs.moveFirst();
  160.        
  161.     while (!rs.EOF) {
  162.           if (thisLoc == rs.fields("HTMfiles").value){
  163.               nav.style.visibility="visible"; 
  164.                 rs.MoveNext();
  165.               break;
  166.           }
  167.           previousLink.href=rs.fields("HTMfiles").value;      
  168.           rs.moveNext();
  169.      }
  170.                 
  171.       if (!rs.EOF) nextLink.href=rs.fields("HTMfiles").value;
  172. }
  173.  
  174.  
  175. //******Re-usable text ********************************************************************************************* 
  176. // Inserts the Tabular Data Control (TDC) object at the end of the page 
  177. // Inserts "re-usable text" from the txt file at: <span id="@@CHM_name@@@@index#@@" class="reuse"></span>
  178. // e.g.<span id="printing4" class="reuse"></span> for record#4 in the printing.txt in printing.chm.
  179.  
  180. function addReusableText(){
  181.  
  182. var IESharedAdded= false;                    // make sure the object is only added once
  183. var CHMspecificAdded= false;                // make sure the object is only added once
  184. var coll = document.all.tags("SPAN");
  185. var sIndex,sRecord,sFile,sFileID,dataBindingObject;
  186.  
  187. // TDC object for IEShared.chm
  188. var coreObject= "WIDTH=100 HEIGHT=51 "+sActX_TDC+"><param name='UseHeader' value=True><param name='FieldDelim' value='~'><param name='sort' value='INDEX'>";
  189. var shareTextObject = "<OBJECT ID='IESharedText' " + coreObject + "<param name='DataURL' value='"+sSharedReusableTextFile+"'></OBJECT>";
  190.  
  191.     for (var i=0; i< coll.length; i++)                                   
  192.          if (coll[i].className.toLowerCase()=="reuse"){
  193.              if (isRTL) coll[i].dir= "rtl";
  194.              
  195.              if (coll[i].id == null) return;
  196.              
  197.                 sFile= coll[i].id.toLowerCase();
  198.              sFile= sFile.replace(spaces,"");
  199.              sFileID= sFile;
  200.              sFile= sFile.replace(numbers,""); 
  201.  
  202.              if (sFile == sSharedReusableTextFileRecord) coll[i].dataSrc= "#IESharedText";
  203.              else coll[i].dataSrc= "#CHMspecificText";
  204.     
  205.              coll[i].dataField= "INDEX";
  206.       
  207.              if (!IESharedAdded && sFile==sSharedReusableTextFileRecord){
  208.                  document.body.innerHTML= document.body.innerHTML + shareTextObject;
  209.                  IESharedAdded= true;
  210.              }
  211.  
  212.              else if (!CHMspecificAdded && sFile !=sSharedReusableTextFileRecord){
  213.                       dataBindingObject= "<OBJECT ID='CHMspecificText'" + coreObject
  214.                       + "<param name='DataURL' value='"+sSharedCHM+sFile+".txt'></OBJECT>";
  215.                       document.body.innerHTML= document.body.innerHTML + dataBindingObject; 
  216.                       CHMspecificAdded= true;
  217.              }
  218.                     
  219.              if (sFile == sSharedReusableTextFileRecord)
  220.                  sRecord= IESharedText.recordset;
  221.              else sRecord= CHMspecificText.recordset; 
  222.                                                     
  223.              sRecord.moveFirst(); 
  224.     
  225.               do { sIndex= sRecord.fields("INDEX").value;
  226.                      sText= sRecord.fields("TEXT").value;
  227.                      
  228.                      if (sIndex < sFileID) sRecord.moveNext();
  229.                      else break;
  230.               } while (!sRecord.EOF);
  231.                   
  232.                if (sIndex == sFileID) coll[i].innerHTML= sText;
  233.     }           
  234. }
  235.  
  236.  //****** insertImages ********************************************************************************************* 
  237.  //  Inserts shared images in User-Defined Variables section and thumbnails.
  238.  
  239. function insertImages(){
  240.  
  241. // insert alert icons
  242.   var collP = document.all.tags("P");
  243.   for (var i=0; i<collP.length; i++) {
  244.        if (collP[i].className.toLowerCase()=="note")            collP[i].innerHTML ="<img class='alert' src='"+noteImg+"' "+ imgStyleRTL +"> " +     collP[i].innerHTML;
  245.        else if (collP[i].className.toLowerCase()=="warning")    collP[i].innerHTML ="<img class='alert' src='"+warningImg+"'> " +  collP[i].innerHTML;
  246.        else if (collP[i].className.toLowerCase()=="caution")    collP[i].innerHTML ="<img class='alert' src='"+cautionImg+"'> " +  collP[i].innerHTML;
  247.        else if (collP[i].className.toLowerCase()=="tip")        collP[i].innerHTML ="<img class='alert' src='"+tipImg+"'> " +      collP[i].innerHTML;
  248.        else if (collP[i].className.toLowerCase()=="important")  collP[i].innerHTML ="<img class='alert' src='"+importantImg+"'> " + collP[i].innerHTML;
  249.        else if (collP[i].className.toLowerCase()=="empty")      collP[i].innerHTML ="<img class='alert' src='"+emptyImg+"'> " +    collP[i].innerHTML;
  250.        else if (collP[i].className.toLowerCase()=="reltopics")  collP[i].innerHTML ="<img class='alert' src='"+relTopicsImg+"'> " + collP[i].innerHTML;
  251.   }
  252.   
  253. //indents for Navigation Tree 
  254. var collUL = document.all.tags("UL");
  255.  
  256. for (var i=0; i<collUL.length; i++) {
  257.        var indent= 0;
  258.        if (collUL[i].className.toLowerCase()=="navtree"){
  259.            if (isRTL) collUL[i].style.listStyleImage= "url('" + branchImg_RTL + "')";
  260.            else collUL[i].style.listStyleImage= "url('" + branchImg + "')";
  261.              for (var j = 0; j < collUL[i].children.length; j++)
  262.                 if (collUL[i].children[j].className.toLowerCase()=="branch"){
  263.                     if (isRTL) collUL[i].children[j].style.marginRight= (indent +'em');
  264.                     else   collUL[i].children[j].style.marginLeft= (indent +'em');
  265.                     indent= indent + 0.75;
  266.                 }
  267.       }
  268. }
  269.    
  270.   for (var i=0; i < document.anchors.length; i++){
  271.          var imgInsert="";  
  272.          var imgStyle= "";
  273.          var imgSpace= "<span class='space'></span>";      
  274.          var oBefore=document.anchors[i].parentElement.tagName;
  275.          var oAnchor= document.anchors[i].id.toLowerCase();
  276.          
  277. // insert RELTOPICS icons
  278. //       if (oAnchor=="reltopics")          
  279. //            if (document.anchors[i].children.tags("IMG")(0) && document.anchors[i].children.tags("IMG")(0).className.toLowerCase() == "reltopics")
  280. //                    imgInsert= "";    // not to re-insert when persistent
  281. //            else  imgInsert= "<img class='alert' src='"+relTopicsImg+"'>" + imgSpace;
  282.             
  283. // insert SHORTCUT icons
  284.        if (oAnchor=="shortcut") {    
  285.             document.anchors[i].title= sShortcutTip;     
  286.             if (document.anchors[i].children.tags("IMG")(0) && document.anchors[i].children.tags("IMG")(0).className.toLowerCase() == "shortcut")
  287.                     imgInsert= "";    // not to re-insert when persistent
  288.             else  imgInsert= "<img class='shortcut' src='"+shortcutCold+"' "+ imgStyleRTL+ ">" + imgSpace;
  289.         }    
  290.                       
  291. // insert POPUP icons
  292.        else if (oAnchor=="wpopup" || oAnchor=="wpopupweb") document.anchors[i].title= sPopupTip;
  293.        else if (document.anchors[i].className.toLowerCase()=="popupicon")
  294.             if (document.anchors[i].children.tags("IMG")(0) && document.anchors[i].children.tags("IMG")(0).className.toLowerCase() == "popup")
  295.                    imgInsert= "";    // not to re-insert when persistent
  296.             else imgInsert= "<img class='popup' src='"+popupCold+"'>" + imgSpace;
  297.  
  298. // insert EXPAND icons 
  299.        else if (oAnchor=="expand") {
  300.               document.anchors[i].title= sExpandTip;
  301.               if (document.anchors[i].children.tags("IMG")(0) && document.anchors[i].children.tags("IMG")(0).className.toLowerCase() == "expand")
  302.                   imgInsert= "";     // not to re-insert when persistent      
  303.               else{ 
  304.                   if (document.anchors[i].parentElement.offsetLeft == document.anchors[i].offsetLeft) {
  305.                       imgSpace= "<span class='space' style='width:0'></span>";     
  306.                       if (isRTL){ document.anchors[i].parentElement.style.marginRight= "1.5em";  imgStyle=" style=margin-right:'-1.5em'";}
  307.                       else { document.anchors[i].parentElement.style.marginLeft= "1.5em";  imgStyle=" style=margin-left:'-1.5em'";}
  308.                   }      
  309.                   imgInsert= "<img class='expand' src='"+ closed +"' "+imgStyle+">" +imgSpace;
  310.               }
  311.        }
  312.  
  313. // insert thumbnail images       
  314.        else if (oAnchor=="thumbnail"  || oAnchor=="thumbnailweb"){ 
  315.             var sAltText = document.anchors[i].innerHTML;
  316.  
  317.             var sThumbnailText = document.anchors[i].title; 
  318.             var oImg = document.anchors[i].href.toLowerCase();
  319.                   if (oAnchor=="thumbnail") 
  320.                          var sThumbnailImg= moniker + getURL(oImg);
  321.                   else var sThumbnailImg = document.anchors[i].href.toLowerCase();
  322.                 document.anchors[i].outerHTML = "<DIV id='thumbDiv' class='thumbnail'>"+document.anchors[i].outerHTML+"</div>";
  323.                 document.anchors[i].innerHTML = "<img class='thumbnail' src='" + sThumbnailImg + "' alt= ' " + sAltText + "'><p>" +sThumbnailText+"</p>";
  324.                 
  325.                   if (isRTL) thumbDiv.style.styleFloat= "right";
  326.            }
  327.         
  328.         document.anchors[i].innerHTML = imgInsert + document.anchors[i].innerHTML;
  329.        if (isRTL) document.anchors[i].dir="rtl";
  330.    }
  331. }
  332.  
  333.  
  334. //***** onclickTriage ****************************************************************************************
  335. // redirects to the appropriate function based on the ID of the clicked <A> tag.
  336.  
  337. function onclickTriage(){
  338. var e= window.event.srcElement;
  339.  
  340. //  if the innerHTML in the <a> tag is encapsulated by a style tag or hightlighted in the word seach,
  341. //  the parentElement is called.
  342.  
  343.     for (var i=0; i < 5; i++)
  344.            if (e.tagName!="A" && e.parentElement!=null) e= e.parentElement;
  345.     eID= e.id.toLowerCase();
  346.                 
  347.     if (popupOpen) closePopup();
  348.     
  349.  // expand image in a new window
  350.     if (eID=="thumbnail" || eID=="pophtm") popNewWindow(e);
  351.     else if (eID=="thumbnailweb") callThumbnailWeb(e);
  352.     else if (eID=="wpopup")    callPopup(e);
  353.     else if (eID=="wpopupweb") callPopupWeb(e);
  354.     else if (eID=="shortcut")  callShortcut(e);
  355.     else if (eID=="reltopics") callRelatedTopics(e);
  356.     else if (eID=="altloc")    callAltLocation(e);
  357.     else if (eID=="expand")    callExpand(e);
  358.     return;
  359. }
  360.  
  361.  
  362. //*** gettingHot ****************************************************************************************
  363. // Makes all the required changes for mouseover.
  364.  
  365. function gettingHot() {
  366. var e = window.event.srcElement;
  367.   
  368.   if (e.id.toLowerCase()=="cold")  e.id ="hot";
  369.   else if (e.src== previousCold)  e.src = previousHot;
  370.   else if (e.className.toLowerCase()=="navbar" && e.children.tags("IMG")(0).src== previousCold)  e.children.tags("IMG")(0).src= previousHot;
  371.   else if (e.src== nextCold)  e.src = nextHot;
  372.   else if (e.className.toLowerCase()=="navbar" && e.children.tags("IMG")(0).src== nextCold)  e.children.tags("IMG")(0).src= nextHot;
  373.   
  374.   else if (e.className.toLowerCase()=="shortcut" && e.tagName=="IMG")  e.src = shortcutHot;            //<img> tags have a class
  375.   else if (e.id.toLowerCase()=="shortcut")  e.children.tags("IMG")(0).src = shortcutHot;            //<a> tags have an ID
  376.   
  377.   else if (e.className.toLowerCase()=="popup" && e.tagName=="IMG")  e.src = popupHot;            //<img> tags have a class
  378.   else if (e.className.toLowerCase()=="popupicon")  e.children.tags("IMG")(0).src = popupHot;            //<a> tags have an ID
  379.   
  380.   else if ((e.className.toLowerCase()=="expand" && e.tagName=="IMG") ||( e.id.toLowerCase()=="expand")) expandGoesHot(e);
  381.  
  382. }
  383.  
  384. //*** gettingCold **************************************************************************************
  385. // Initial state for mouseout.
  386.  
  387. function gettingCold() {
  388. var e = window.event.srcElement;
  389.  
  390.   if (e.id.toLowerCase()=="hot")  e.id ="cold";
  391.   else if (e.src== previousHot)  e.src = previousCold;
  392.   else if (e.className.toLowerCase()=="navbar" && e.children.tags("IMG")(0).src== previousHot)  e.children.tags("IMG")(0).src= previousCold;
  393.   else if (e.src== nextHot)  e.src = nextCold;
  394.   else if (e.className.toLowerCase()=="navbar" && e.children.tags("IMG")(0).src== nextHot)  e.children.tags("IMG")(0).src= nextCold;
  395.   
  396.   else if (e.className.toLowerCase()=="shortcut" && e.tagName=="IMG")   e.src = shortcutCold;        //<img> tags have a class
  397.   else if (e.id.toLowerCase()=="shortcut")  e.children.tags("IMG")(0).src= shortcutCold;             //<a> tags have an ID
  398.   
  399.   else if (e.className.toLowerCase()=="popup" && e.tagName=="IMG")   e.src = popupCold;        //<img> tags have a class
  400.   else if (e.className.toLowerCase()=="popupicon")  e.children.tags("IMG")(0).src= popupCold;             //<a> tags have an ID
  401.   
  402.   else if ((e.className.toLowerCase()=="expand" && e.tagName=="IMG") ||( e.id.toLowerCase()=="expand")) expandGoesCold(e);
  403. }
  404.  
  405. //****************************************** OBJECT CONSTRUCTION **************************************
  406. //*****************************************************************************************************
  407. //  Uses an A tag to pass parameters between an HTML page and this script.
  408. //  Creates an ActiveX Object from these parameters, appends the Object to the end of the page,
  409. //  and clicks it. These objects relate to HTMLHelp environment and information about them can be found on the http://HTMLHelp site.
  410.  
  411. //  Object construction variables *********************************************************************
  412.  
  413. var sParamCHM,sParamFILE, sParamEXEC, sParamMETA,iEND;
  414. var sActX_HH= " type='application/x-oleobject' classid='clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11' ";
  415.  
  416.  
  417. //*** callPopup ***************************************************************************************
  418. // creates an object from an <A> tag HREF, the object inserts a winhelp popup
  419. // called by: <A ID="wPopup" HREF="HELP=@@file_name.hlp@@ TOPIC=@@topic#@@">@@Popup text@@</A>
  420.  
  421. function callPopup(eventSrc) {
  422. var e= eventSrc;
  423. var eH= unescape(e.href);
  424. var eH_= eH.toLowerCase();
  425.        event.returnValue = false;
  426.                                                                
  427.   var iTOPIC      = eH_.lastIndexOf("topic=");
  428.         if (iTOPIC==-1) return;
  429.         sParamTOPIC = eH.substring((iTOPIC+6),eH.length);          // extracts the topic for item2
  430.         
  431.   var iHELP       = eH_.lastIndexOf("help=");
  432.         if (iHELP==-1) return;
  433.         sParamHELP = eH.substring(iHELP+5,iTOPIC);            // extracts the help file for item1
  434.         
  435.         if (document.hhPopup) document.hhPopup.outerHTML = "";    // if hhPopup object exists, clears it
  436.  
  437.  
  438.  var  h= "<object id='hhPopup'"+ sActX_HH + "STYLE='display:none'><param name='Command' value='WinHelp, Popup'>";
  439.       h= h + "<param name='Item1' value='" + sParamHELP + "'><param name='Item2' value='" + sParamTOPIC + "'></object>";
  440.         
  441.         document.body.insertAdjacentHTML("beforeEnd", h);     
  442.         document.hhPopup.hhclick();
  443. }
  444.  
  445.  
  446. //*** callAltLocation******************************************************************************
  447. // creates an object from an <A> tag HREF, the object will navigate to the alternate location if the first location is not found.
  448. // 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>
  449.    
  450.  
  451. function callAltLocation(eventSrc) {
  452. var e= eventSrc;
  453. var eH= unescape(e.href);
  454. var eH_= eH.toLowerCase();
  455. var sFILEarray,sCHMarray;
  456.      event.returnValue = false;
  457.      
  458.   var sParamTXT= e.innerHTML;
  459.       sParamTXT= sParamTXT.replace(semicolon,"");
  460.                                        
  461.   var iFILE = eH_.lastIndexOf("file=");
  462.         if (iFILE==-1) return;
  463.         sParamFILE= eH.substring((iFILE+5),eH.length);                  // extracts the 2 HTM files
  464.         sParamFILE= sParamFILE.replace(spaces,"");
  465.         iSPLIT= sParamFILE.match(semicolon);
  466.         if (iSPLIT)
  467.               sFILEarray = sParamFILE.split(";");                                        // separates the 2 HTM files
  468.         else return;
  469.           
  470.   var iCHM  = eH_.lastIndexOf("chm=");
  471.         if(iCHM==-1) return;
  472.         else         sParamCHM = eH.substring(iCHM+4,iFILE);            // extracts the 2 CHM's
  473.         sParamCHM= sParamCHM.replace(spaces,"");
  474.         iSPLIT= sParamCHM.match(semicolon);
  475.         if (iSPLIT)
  476.             sCHMarray= sParamCHM.split(";");                                    // separates the 2 CHM's
  477.         else return;
  478.         
  479.         sParamFILE= moniker + sCHMarray[0]+ "::/" + sFILEarray[0] + ";" + moniker + sCHMarray[1]+ "::/" + sFILEarray[1];
  480.                 
  481.         if (document.hhAlt) document.hhAlt.outerHTML = "";                // if hhAlt object exists, clears it
  482.  
  483.  
  484.   var h= "<object id='hhAlt'"+ sActX_HH + "STYLE='display:none'><PARAM NAME='Command' VALUE='Related Topics'>";
  485.       h= h + "<param name='Item1' value='" + sParamTXT +";" + sParamFILE + "'></object>";
  486.     
  487.         document.body.insertAdjacentHTML("beforeEnd", h); 
  488.         document.hhAlt.hhclick();
  489. }
  490.  
  491.  
  492. //*** callRelatedTopics******************************************************************************
  493. // creates an object from an <A> tag HREF, the object inserts a popup of the related topics to select
  494. // called from: <A ID="relTopics" HREF="CHM=@@chm_name1.chm;chm_name2.chm@@ META=@@a_filename1;a_filename2@@">Related Topics</A>
  495.    
  496.  
  497. function callRelatedTopics(eventSrc) {
  498. var e= eventSrc;
  499. var eH= unescape(e.href);
  500. var eH_= eH.toLowerCase();
  501.      event.returnValue = false;
  502.                                        
  503.   var iMETA = eH_.lastIndexOf("meta=");
  504.         if (iMETA==-1) return;
  505.         sParamMETA = eH.substring((iMETA+5),eH.length);              // extracts the META keywords for item2
  506.         
  507.   var iCHM  = eH_.lastIndexOf("chm=");
  508.         if(iCHM==-1) sParamCHM = "";
  509.         else         sParamCHM = eH.substring(iCHM+4,iMETA);            // extracts the CHM files for item1
  510.     
  511.         if (document.hhRel) document.hhRel.outerHTML = "";            // if hhRel object exists, clears it
  512.  
  513.  
  514.   var h= "<object id='hhRel'"+ sActX_HH + "STYLE='display:none'><param name='Command' value='ALink,MENU'>";
  515.       h= h + "<param name='Item1' value='" + sParamCHM + "'><param name='Item2' value='" + sParamMETA + "'></object>";
  516.     
  517.         document.body.insertAdjacentHTML("beforeEnd", h);     
  518.         document.hhRel.hhclick();
  519. }
  520.  
  521. //*** popNewWindow***************************************************************************************
  522. // creates an object from an <A> tag HREF, the object then opens a new window from the image URL found in the HREF
  523. // called from: <a id="thumbnail" title="Enlarge figure" href="CHM=NTArt.chm FILE=@@image_name.gif@@">@@alt text here@@</A>
  524. // the thumbnail image is loaded by loadPage();
  525.  
  526.  
  527. function popNewWindow(eventSrc) {
  528. var eH= eventSrc.href;
  529.       event.returnValue = false;
  530.       
  531.  // extracts the thumbnail image URL from the <a> tag HREF
  532.     sParamFILE =  getURL(eH);
  533.     if (sParamFILE=="") return;
  534.        
  535.  // if the hhWindow object exists, clears it
  536.     if (document.hhWindow) document.hhWindow.outerHTML = "";        
  537.         
  538. var  h =  "<object id='hhWindow'"+ sActX_HH +" STYLE='display:none'><param name='Command' value='Related Topics'>";
  539.      h = h + "<param name='Window' value='$global_largeart'><param name='Item1' value='$global_largeart;" + moniker + sParamFILE+ "'> </object>";
  540.     
  541.      document.body.insertAdjacentHTML("beforeEnd", h);
  542.      document.hhWindow.hhclick();
  543. }
  544.  
  545. //*** callShortcut ***************************************************************************************
  546. // creates an object from an <A> tag, the object then calls the executable code
  547. // called from: <A ID="shortcut" HREF="EXEC=@@executable_name.exe@@ CHM=IEShared.chm FILE=@@error_file_name.htm@@">@@Shortcut text@@</A>
  548. // the shortcut image is loaded by loadInitialImg();
  549.  
  550. function callShortcut(eventSrc) {
  551. var e= eventSrc;
  552. var eH= unescape(e.href);
  553. var eH_= eH.toLowerCase();
  554.  
  555.  
  556.     event.returnValue = false;
  557.               
  558.  // extracts the error file URL from the <a> tag HREF
  559.     iEND= eH.length;
  560.     sParamFILE =  getURL(eH);
  561.     
  562. //code added to redirect if shortcut is nonexisting
  563.  
  564. var con_mmc;
  565. var doc_mmc;
  566.  
  567.     doc_mmc = sParamFILE.toLowerCase();
  568.     con_mmc = doc_mmc.indexOf("mmc.chm");
  569.     if (con_mmc != -1){
  570.         doc_mmc = " " + document.location;
  571.         con_mmc = doc_mmc.indexOf("mmc.chm");
  572.         if (con_mmc == -1){
  573.             sParamFILE = "IEShared.chm::/alt_url_deux.htm"
  574.             }
  575.         }
  576. // *************************************************
  577.         
  578.      
  579.      
  580. var iEXEC = eH_.lastIndexOf("exec="); 
  581.         if (iEXEC==-1) return;
  582.         else sParamEXEC = eH.substring(iEXEC+5,iEND);                // extracts the executable for item1
  583.         
  584.         if (document.hhShortcut) document.hhShortcut.outerHTML = "";            // if the hhShortcut object exists, clears it
  585.     
  586. var  h =  "<object id='hhShortcut'"+ sActX_HH +" STYLE='display:none'> <param name='Command' value='ShortCut'>";
  587.      if(sParamFILE != "") h = h + "<param name='Window' value='" + moniker + sParamFILE+ "'>";
  588.      h = h + "<param name='Item1' value='" + sParamEXEC + "'><param name='Item2' value='msg,1,1'></object>";
  589.  
  590.         document.body.insertAdjacentHTML("beforeEnd", h);
  591.         document.hhShortcut.hhclick();
  592. }
  593.  
  594. //****************************************  EXPAND FUNCTIONS *********************************************************
  595. //********************************************************************************************************************
  596.  
  597. //**  callExpand **************************************************************************************************
  598. //  This expands & collapses (based on current state) "expandable" nodes as they are clicked.
  599. //  Called by: <A ID="expand" href="#">@@Hot text@@</A>
  600. //  Followed by:  <div class="expand">
  601.  
  602. function callExpand(eventSrc) {
  603.  
  604. var e= eventSrc;
  605.     event.returnValue = false;                    // prevents navigating for <A> tag
  606.     
  607. var oExpandable = getExpandable(e); 
  608. var oImg = getImage(e);
  609.  
  610.      if (oExpandable.style.display == "block")
  611.           doCollapse(oExpandable, oImg);
  612.      else doExpand(oExpandable, oImg);
  613. }
  614.  
  615. //** expandGoesHot *********************************************************************************************
  616. // Returns expand image to hot. 
  617.  
  618. function expandGoesHot(eventSrc){
  619. var e= eventSrc;
  620.     
  621. var oExpandable = getExpandable(e);  
  622. var oImg = getImage(e);
  623.  
  624.     if (oExpandable.style.display == "block") oImg.src = expandHot;
  625.     else oImg.src = closedHot;
  626. }
  627.  
  628.  
  629. //** expandGoesCold *********************************************************************************************
  630. // Returns expand image to cold.
  631.  
  632. function expandGoesCold(eventSrc){
  633. var e= eventSrc;
  634.  
  635. var oExpandable = getExpandable(e);   
  636. var oImg = getImage(e);
  637.  
  638.     if (oExpandable.style.display == "block") oImg.src = expand;
  639.     else oImg.src = closed;
  640. }
  641.  
  642.  
  643. //** getExpandable *****************************[used by callExpand, expandGoesHot, expandGoesCold]*******
  644. //  Determine if the element is an expandable node or a child of one.  
  645.  
  646. function getExpandable(eventSrc){
  647. var  e = eventSrc;
  648. var iNextTag, oExpandable;
  649.  
  650.        for (var i=1;i<4; i++){
  651.                iNextTag=    e.sourceIndex+e.children.length+i;
  652.               oExpandable= document.all(iNextTag);
  653.               if (oExpandable.className.toLowerCase()=="expand" || iNextTag == document.all.length)
  654.                    break;
  655.        }
  656.        return oExpandable;
  657. }
  658.  
  659. //**  getImage ***********************************[used by callExpand, expandGoesHot, expandGoesCold]*******
  660. //  Find the first image in the children of the current srcElement.   
  661. // (allows the  image to be placed anywhere inside the <A HREF> tag)
  662.  
  663. function getImage(header) {
  664. var oImg = header;
  665.  
  666.        if(oImg.tagName != "IMG") oImg=oImg.children.tags("IMG")(0);
  667.        return oImg;
  668. }
  669.  
  670.  
  671. //****  expandAll *******************************************************************************************************
  672. //  Will expand or collapse all "expandable" nodes when clicked. [calls closeAll()]
  673. //  called by: <A HREF="#" onclick="expandAll();">expand all</A>
  674.  
  675. var stateExpand = false;    //applies to the page 
  676.  
  677. //**** ****************************************************************************************************************
  678.  
  679. function expandAll() {
  680. var oExpandToggle, oImg;
  681. var expandAllMsg = "expand all";                    //message returned when CloseAll() is invoked
  682. var closeAllMsg = "close all";                        //message returned when ExpandAll() is invoked
  683. var e= window.event.srcElement;
  684.        event.returnValue = false;
  685.  
  686.        for (var i=0; i< document.anchors.length; i++){
  687.                oExpandToggle = document.anchors[i];
  688.          
  689.                 if (oExpandToggle.id.toLowerCase() == "expand"){ 
  690.                      oExpandable = getExpandable(oExpandToggle);  
  691.                      oImg = getImage(oExpandToggle);
  692.              
  693.                      if (stateExpand == true) doCollapse(oExpandable, oImg);
  694.                      else                     doExpand(oExpandable, oImg);
  695.                 }
  696.        }
  697.        if (stateExpand == true) {
  698.             stateExpand = false;
  699.             e.innerText= expandAllMsg;
  700.        }
  701.        else {
  702.             stateExpand = true;
  703.             e.innerText= closeAllMsg;
  704.        }
  705. }
  706.  
  707.  
  708. //****  doExpand *******************************************************************************************************
  709. //  Expands expandable block & changes image
  710.     
  711. var redo = false;    
  712. function doExpand(oToExpand, oToChange) {
  713. var oExpandable= oToExpand;
  714. var oImg= oToChange;
  715.     
  716.     oImg.src = expand;
  717.     oExpandable.style.display = "block";
  718.     
  719.     if (!redo && !isIE5) {
  720.         redo = true;
  721.         focus(oToExpand);
  722.         doExpand(oToExpand, oToChange);
  723.         }
  724.     
  725. }
  726.  
  727.  
  728. //****  doCollapse *****************************************************************************************************
  729. //  Collapses expandable block & changes image
  730.     
  731. function doCollapse(oToCollapse, oToChange) {
  732. if (printing == "TRUE") return;
  733. var oExpandable= oToCollapse;
  734. var oImg= oToChange;
  735.  
  736.     oExpandable.style.display = "none";
  737.     oImg.src = closed;
  738. }
  739.  
  740. //*******************************************************************************************************
  741. //******* WEB  FUNCTIONS **************************************************************************
  742. //*******************************************************************************************************
  743.  
  744. //**** callThumbnailWeb **************************************************************************************
  745.  
  746. function callThumbnailWeb(eventSrc) {
  747. var e= eventSrc;
  748.        event.returnValue = false;
  749.                     
  750. 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");
  751.  
  752. thumbnailWin.document.write ("<html><head><title>Windows 2000</title></head><body><img src='"+e.href+"'></body></html>");
  753.  
  754. return;
  755. }
  756.  
  757. //*********************************************************************************************************
  758. //*********************************************************************************************************
  759.                                 
  760.                                 
  761. var popupOpen= false;                //state of popups
  762. var posX, posY;                        //coordinates of popups
  763. var oPopup;                            //object to be used as popup content
  764.  
  765. //**** callPopupWeb **************************************************************************************
  766. // the web popups have been converted from the object winHelp popup for the web.
  767. // called by: <A ID="wPopupWeb" HREF="#">@@Popup text@@</A>
  768. // followed by: <div class="popup">Popup content</div>
  769.  
  770.  
  771. function callPopupWeb(eventSrc) {
  772. var e= eventSrc;
  773.   
  774.   // find the popup <div> that follows <a id="wPopupWeb"></a>
  775.   findPopup(e);
  776.   positionPopup(e)
  777.  
  778.   oPopup.style.visibility = "visible";
  779.   popupOpen = true;
  780.  
  781.   return;
  782. }
  783.  
  784. //**** findPopup ****************************************************************************************
  785.  
  786. function findPopup(oX){
  787. var e= oX;
  788. var iNextTag;
  789.     
  790.     for (var i=1;i<4; i++){
  791.          iNextTag=    e.sourceIndex + i;
  792.          oPopup= document.all(iNextTag);
  793.          if (oPopup.className.toLowerCase()=="popup" || iNextTag == document.all.length)
  794.              break;
  795.     }
  796.     if (iNextTag != document.all.length) {
  797.         posX = window.event.clientX; 
  798.         posY = window.event.clientY + document.body.scrollTop+10;
  799.     }
  800.     else closePopup();
  801. }
  802.  
  803. //****  positionPopup ************************************************************************************
  804. // Set size and position of popup.
  805. // If it is off the page, move up, but not past the very top of the page.
  806.  
  807. function positionPopup(oX){
  808. var e= oX;    
  809. var popupOffsetWidth = oPopup.offsetWidth;
  810.  
  811. //determine if popup will be offscreen to right
  812. var rightlimit = posX + popupOffsetWidth;
  813.  
  814.   if (rightlimit >= document.body.clientWidth) 
  815.       posX -= (rightlimit - document.body.clientWidth);
  816.   if (posX < 0) posX = 0;
  817.     
  818. //position popup
  819.   oPopup.style.top = posY;
  820.   oPopup.style.left = posX;
  821.  
  822. var pageBottom = document.body.scrollTop + document.body.clientHeight;
  823. var popupHeight = oPopup.offsetHeight;
  824.   
  825.   if (popupHeight + posY >= pageBottom) {
  826.       if (popupHeight <= document.body.clientHeight)
  827.           oPopup.style.top = pageBottom - popupHeight;
  828.       else
  829.            oPopup.style.top = document.body.scrollTop;
  830.   }
  831. }
  832.  
  833. //**** closePopup ****************************************************************************************
  834. // Close Popup
  835. function closePopup() {
  836.  
  837.   oPopup.style.visibility = "hidden";
  838.   popupOpen = false;
  839.   return;
  840. }
  841.  
  842. //*********************************************  GENERAL FUNCTIONS ************************************************
  843. //**************************************************************************************************************************
  844.  
  845. //***ajustImg *************************************************************************************************************
  846. // expands an image to the with of the window or shrinks it to 90px
  847.  
  848. function ajustImg(eventSrc) {
  849. var e= eventSrc;
  850. var fullWidth= document.body.offsetWidth;
  851.  
  852.     fullWidth = fullWidth - 50;
  853.     if (e.style.pixelWidth==90)
  854.          e.style.pixelWidth=fullWidth;
  855.     else e.style.pixelWidth=90;
  856. }
  857.  
  858.  
  859. //**  getURL **************************************[used in callShortcut, popNewWindow& loadPage]********
  860. // extracts the file location (CHM::/HTM) URL 
  861.  
  862. function getURL(sHREF) {
  863. var spaces= /\s/g
  864. var eH = unescape(sHREF);
  865.     eH = eH.replace(spaces,""); 
  866.  
  867. var eH_= eH.toLowerCase();
  868. var sParamFILE= "";
  869. var sParamCHM= "";
  870.  
  871. var iFILE= eH_.lastIndexOf("file=");
  872.     if (iFILE!=-1){
  873.         iEND= iFILE +1;
  874.         sParamFILE = eH.substring(iFILE+5,eH.length);
  875.     }  
  876.  
  877. var iCHM  = eH_.lastIndexOf("chm=");
  878.     if (iCHM!=-1){
  879.         iEND  = iCHM +1;                             // iEND used by callShortcut
  880.  
  881.         sParamCHM = eH.substring(iCHM+4, iFILE);
  882.         sParamFILE= sParamCHM+"::/"+sParamFILE;
  883.     }    
  884.     return sParamFILE;
  885. }
  886.  
  887. //****************************************************************************************************************************
  888. //********************************************  IE5 PERSISTENCE  *************************************************************
  889. //****************************************************************************************************************************
  890.  
  891. var oTD,iTD;         // persistence
  892.  
  893. //****** Persistence for userData ********************************************************************************************* 
  894.  
  895. function getChecklistState(){ 
  896.  
  897.  var pageID= addID();
  898.  
  899.     if (checklist.all== "[object]") {
  900.     oTD=checklist.all.tags("INPUT");
  901.     iTD= oTD.length;
  902.         }
  903.     else
  904.         {
  905.         printing = "TRUE";
  906.         isPersistent = false;
  907.         return;
  908.         }
  909.  
  910.     if (iTD == 0){
  911.         printing = "TRUE";
  912.         isPersistent = false;
  913.         return;
  914.         }
  915.     
  916. // routine added to fix a bug in the ocx 06/14/99    
  917.      lct = document.location + ".";
  918.      xax = 10;
  919.      xax = lct.indexOf("mk:@MSITStore");
  920.      if (xax != -1) {
  921.          lct = "ms-its:" + lct.substring(14,lct.length-1);
  922.         // alert("before reload : " + document.location);
  923.         // alert("replace with : " + lct);
  924.         isPersistent = false;
  925.         document.location.replace(lct);
  926.         isPersistent = true;
  927.         // alert("after reload : " + document.location);
  928.         }     
  929.      else
  930.          {      
  931.          checklist.load("oXMLStore");
  932.         }
  933. // routine added to fix a bug in the ocx 06/14/99
  934.     if (checklist.getAttribute("sPersist"+pageID+"0"))    
  935.     for (i=0; i<iTD; i++){
  936.  
  937.          if (oTD[i].type =="checkbox" || oTD[i].type =="radio"){
  938.          checkboxValue= checklist.getAttribute("sPersist"+pageID+i);
  939.         
  940.          if (checkboxValue=="yes") oTD[i].checked=true;
  941.          else oTD[i].checked=false;
  942.          }// if
  943.          if (oTD[i].type =="text")              
  944.               oTD[i].value= checklist.getAttribute("sPersist"+pageID+i);
  945.      }// for
  946. } // end persistence
  947.  
  948. //**  saveChecklistState *************************************************************************************************************
  949. function saveChecklistState(){
  950. var pageID= addID(); 
  951.  
  952.         if (!isPersistent) return; 
  953.          //  you will need this           document.location
  954.         for (i=0; i<iTD; i++){
  955.  
  956.                 if (oTD[i].type =="checkbox" || oTD[i].type =="radio"){
  957.                  if (oTD[i].checked) checkboxValue="yes";
  958.                  else checkboxValue="no";
  959.                  
  960.                  checklist.setAttribute("sPersist"+pageID+i, checkboxValue);
  961.              }// if
  962.             
  963.               if (oTD[i].type =="text") 
  964.                  checklist.setAttribute("sPersist"+pageID+i, oTD[i].value);
  965.          }    // for
  966.  
  967.  // routine added to fix a bug in the ocx 06/14/99    
  968.      lct = document.location + ".";
  969.      xax = 10;
  970.      xax = lct.indexOf("mk:@MSITStore");
  971.      if (xax != -1) {
  972.          lct = "ms-its:" + lct.substring(14,lct.length-1);
  973.         // alert("before reload : " + document.location);
  974.         // alert("replace with : " + lct);
  975.         isPersistent = false;
  976.         document.location.replace(lct);
  977.         isPersistent = true;
  978.         // alert("after reload : " + document.location);
  979.         }     
  980.      else
  981.          {      
  982.          checklist.save("oXMLStore");
  983.         }
  984. // routine added to fix a bug in the ocx 06/14/99
  985.      
  986. }//end function
  987.  
  988. //**  resizeDiv *******************************[used with callPopupWeb, setPreviousNext}****************************************************
  989. //  resize the page when the <div class=nav></div> && <div class=text></div> are found
  990. function resizeDiv(){
  991. if (printing == "TRUE") return;
  992. var oNav = document.all.item("nav");
  993. var oText= document.all.item("text");
  994.  
  995.     if (popupOpen) closePopup();
  996.     if (oText == null) return;
  997.     if (oNav != null){
  998.         document.all.nav.style.width= document.body.offsetWidth;
  999.         document.all.text.style.width= document.body.offsetWidth-4;
  1000.         document.all.text.style.top= document.all.nav.offsetHeight;
  1001.         if (document.body.offsetHeight > document.all.nav.offsetHeight)
  1002.             document.all.text.style.height= document.body.offsetHeight - document.all.nav.offsetHeight;
  1003.          else document.all.text.style.height=0; 
  1004.   }
  1005. }
  1006.  
  1007. //**  addID *************************************************************************************************************
  1008. function addID(){
  1009.  
  1010. var locID = document.location.href; 
  1011. var iHTM = locID.lastIndexOf(".htm");
  1012. var iName=locID.lastIndexOf("/");
  1013.       locID = locID.substring(iName+1,iHTM);
  1014.     
  1015.     return locID;
  1016. }    
  1017. //** set_to_print ***************
  1018. function set_to_print(){
  1019.     var i;
  1020.     printing = "TRUE";
  1021.     
  1022.     if (window.text) {
  1023.         if (!window.text.style){
  1024.             scroller = "FALSE";
  1025.             }
  1026.         else
  1027.             {
  1028.             document.all.text.style.height = "auto";
  1029.             scroller = "TRUE";
  1030.             }
  1031.         }
  1032.         
  1033.     for (i=0; i < document.all.length; i++){
  1034.         if (document.all[i].id == "expand") {
  1035.             callExpand(document.all[i]);
  1036.             single = "TRUE";
  1037.             }
  1038.         if (document.all[i].tagName == "BODY") {
  1039.             document.all[i].scroll = "auto";
  1040.             }
  1041.         if (document.all[i].tagName == "A" && scroller != "TRUE") {
  1042.             document.all[i].outerHTML = "<A HREF=''>" + document.all[i].innerHTML + "</a>";
  1043.             }
  1044.         }
  1045.  
  1046. }
  1047. //** used to reset a page if needed ********************
  1048. function reset_form(){
  1049.  
  1050.     if (single == "TRUE") document.location.reload();
  1051.     if (scroller = "TRUE") document.location.reload();
  1052.     
  1053. }
  1054.  
  1055.     
  1056. //** on error routine *********************************
  1057. function errorHandler() {
  1058.   // alert("Error Handled");
  1059.   return true;
  1060. }