home *** CD-ROM | disk | FTP | other *** search
/ Enter 2005 March / EnterCD 03_2005.iso / Internet / Total Cleaner 1.0 / TotalCleaner.exe / $PROGRAMFILES / Total Cleaner / $totalcleaner_content.js < prev    next >
Encoding:
Text File  |  2005-01-17  |  8.9 KB  |  143 lines

  1. var tocTab = new Array();var ir=0;
  2. tocTab[ir++] = new Array ("1", "Introduction", "", "", "cicon3.gif", "cicon4.gif");
  3. tocTab[ir++] = new Array ("1.1", "Features", "features.htm", "", "cicon17.gif", "cicon17.gif");
  4. tocTab[ir++] = new Array ("1.2", "System Requirements", "systemrequirements2.htm", "", "cicon17.gif", "cicon17.gif");
  5. tocTab[ir++] = new Array ("1.3", "Using the Help System", "usingthehelpsystem.htm", "", "cicon17.gif", "cicon17.gif");
  6. tocTab[ir++] = new Array ("2", "Getting Started", "", "", "cicon3.gif", "cicon4.gif");
  7. tocTab[ir++] = new Array ("2.1", "Starting Total Cleaner", "startingtotalcleaner.htm", "", "cicon17.gif", "cicon17.gif");
  8. tocTab[ir++] = new Array ("2.2", "Options of Total Cleaner", "optionsoftotalcleaner.htm", "", "cicon17.gif", "cicon17.gif");
  9. tocTab[ir++] = new Array ("2.3", "Test the Total Cleaner", "testthetotalcleaner.htm", "", "cicon17.gif", "cicon17.gif");
  10. tocTab[ir++] = new Array ("2.4", "Exiting Total Cleaner", "exitingtotalcleaner.htm", "", "cicon17.gif", "cicon17.gif");
  11. tocTab[ir++] = new Array ("3", "Using of Total Cleaner", "", "", "cicon3.gif", "cicon4.gif");
  12. tocTab[ir++] = new Array ("3.1", "Shedule Total Cleaner", "sheduletotalcleaner.htm", "", "cicon17.gif", "cicon17.gif");
  13. tocTab[ir++] = new Array ("3.2", "Setting the Options", "settingtheoptions.htm", "", "cicon17.gif", "cicon17.gif");
  14. tocTab[ir++] = new Array ("3.3", "Wipe Files", "wipefiles.htm", "", "cicon17.gif", "cicon17.gif");
  15. tocTab[ir++] = new Array ("3.4", "Erase Folders", "erasefolders.htm", "", "cicon17.gif", "cicon17.gif");
  16. tocTab[ir++] = new Array ("4", "Techinal Support", "", "", "cicon3.gif", "cicon4.gif");
  17. tocTab[ir++] = new Array ("4.1", "Support Contacts", "systemrequirements.htm", "", "cicon25.gif", "cicon25.gif");
  18. isContent = true,
  19. isIndex = false,
  20. showNumbers = false,
  21. tocBehaviour = new Array(1,1),
  22. tocScroll=false,
  23. tocLinks = new Array(0,0);
  24. var oldOnError = null;
  25. var isDyn = navigator.userAgent.toLowerCase().indexOf("opera") == -1;
  26. var isIE = navigator.appName.toLowerCase().indexOf("explorer") > -1;
  27. var oldCurrentNumber = "", oldLastVisitNumber = "";
  28. var toDisplay = new Array();
  29. for (ir=0; ir<tocTab.length; ir++) {
  30. toDisplay[ir] = tocTab[ir][0].split(".").length==1;
  31. }
  32. function windowErr() {
  33. isDyn = false;
  34. $hmtoc.location.href = "$totalcleaner_content.htm";
  35. window.onerror = oldOnError;
  36. }
  37. function reDisplay(currentNumber,tocChange,noLink,e) {
  38. if (isIndex && ($hmtoc.location.href.substring($hmtoc.location.href.lastIndexOf("/")+1,$hmtoc.location.href.length) != "$totalcleaner_kwindex.htm")) { isIndex=false; isContent=true; }
  39. if (currentNumber == "navIndex") { isContent=false; }
  40. if (currentNumber == "navContent") { isIndex=false; isContent=true; }
  41. if (e) {
  42. ctrlKeyDown = (isIE) ? e.ctrlKey : (e.modifiers==2);
  43. if (tocChange && ctrlKeyDown) tocChange = 2;
  44. }
  45. var currentNumArray = currentNumber.split(".");
  46. var currentLevel = currentNumArray.length-1;
  47. var currentIndex = 1;
  48. if (currentNumber == "") currentNumber = top.location.href.substring(top.location.href.lastIndexOf("?")+1,top.location.href.length);
  49. for (i=0; i<tocTab.length; i++) {
  50. if ((tocTab[i][0] == currentNumber) || (tocTab[i][2] == currentNumber && tocTab[i][2] != "")) {
  51. currentIndex = i;
  52. currentNumber = tocTab[i][0];
  53. currentNumArray = currentNumber.split(".");
  54. currentLevel = currentNumArray.length-1;
  55. break;
  56. }
  57. }
  58. if (currentIndex < tocTab.length-1) {
  59. nextLevel = tocTab[currentIndex+1][0].split(".").length-1;
  60. currentIsExpanded = nextLevel > currentLevel && toDisplay[currentIndex+1];
  61. }
  62. else currentIsExpanded = false;
  63. theHref = (noLink) ? "" : tocTab[currentIndex][2];
  64. theTarget = tocTab[currentIndex][3];
  65. for (i=1; i<tocTab.length; i++) {
  66. if (tocChange) {
  67. thisNumber = tocTab[i][0];
  68. thisNumArray = thisNumber.split(".");
  69. thisLevel = thisNumArray.length-1;
  70. isOnPath = true;
  71. if (thisLevel > 0) {
  72. for (j=0; j<thisLevel; j++) {
  73. isOnPath = (j>currentLevel) ? false : isOnPath && (thisNumArray[j] == currentNumArray[j]);
  74. }
  75. }
  76. toDisplay[i] = (tocChange == 1) ? isOnPath : (isOnPath || toDisplay[i]);
  77. if (thisNumber.indexOf(currentNumber+".")==0 && thisLevel > currentLevel) {
  78. if (currentIsExpanded) toDisplay[i] = false;
  79. else toDisplay[i] = (thisLevel == currentLevel+1);
  80. }
  81. }
  82. }
  83. if (!isContent && !isIndex) {
  84. $hmtoc.location.href = "$totalcleaner_kwindex.htm";
  85. isIndex = true;
  86. }
  87. if (isContent) {
  88. if (!isDyn) {
  89. if ($hmtoc.location.href.substring($hmtoc.location.href.lastIndexOf("/")+1,$hmtoc.location.href.length) != "$totalcleaner_content.htm") $hmtoc.location.href = "$totalcleaner_content.htm";
  90. }
  91. else {
  92. oldOnError = window.onerror;
  93. window.onerror = windowErr;
  94. $hmtoc.document.clear();
  95. $hmtoc.document.write("<html>\n\r<head></head>\n\r<style type=\"text/css\">\n\r       SPAN.heading1 { font-family: Arial,Helvetica; font-weight: normal; font-size: 10pt; color: #000000; text-decoration: none }\n\r       SPAN.heading2 { font-family: Arial,Helvetica; font-weight: normal; font-size: 9pt; color: #000000; text-decoration: none }\n\r       SPAN.heading3 { font-family: Arial,Helvetica; font-weight: normal; font-size: 8pt; color: #000000; text-decoration: none }\n\r       SPAN.heading4 { font-family: Arial,Helvetica; font-weight: normal; font-size: 8pt; color: #000000; text-decoration: none }\n\r       SPAN.heading5 { font-family: Arial,Helvetica; font-weight: normal; font-size: 8pt; color: #000000; text-decoration: none }\n\r       SPAN.heading6 { font-family: Arial,Helvetica; font-weight: normal; font-size: 8pt; color: #000000; text-decoration: none }\n\r\n\r       SPAN.hilight1 { font-family: Arial,Helvetica; font-weight: normal; font-size: 10pt; color: #FFFFFF; background: #002682; text-decoration: none }\n\r       SPAN.hilight2 { font-family: Arial,Helvetica; font-weight: normal; font-size: 9pt; color: #FFFFFF; background: #002682; text-decoration: none }\n\r       SPAN.hilight3 { font-family: Arial,Helvetica; font-weight: normal; font-size: 8pt; color: #FFFFFF; background: #002682; text-decoration: none }\n\r       SPAN.hilight4 { font-family: Arial,Helvetica; font-weight: normal; font-size: 8pt; color: #FFFFFF; background: #002682; text-decoration: none }\n\r       SPAN.hilight5 { font-family: Arial,Helvetica; font-weight: normal; font-size: 8pt; color: #FFFFFF; background: #002682; text-decoration: none }\n\r       SPAN.hilight6 { font-family: Arial,Helvetica; font-weight: normal; font-size: 8pt; color: #FFFFFF; background: #002682; text-decoration: none }\n\r</style>\n\r<body bgcolor=\"#FFFFFF\">\n\r<font face=\"Arial,Helvetica\" size=\"4\"><b>Total Cleaner Help Menu</b></font><br>\n\r<font face=\"Arial,Helvetica\" size=\"2\">\n\r<a href=\"javaScript:parent.reDisplay(\'navIndex\',0,0);\">Keyword Index</a>\n\r</font><br><br><br>\n\r\n\r  <!-- Place holder for the TOC, do not delete the line below -->\n\r  ");
  96. for (i=0; i<tocTab.length; i++) {
  97. if (toDisplay[i]) {
  98. thisNumber = tocTab[i][0];
  99. thisNumArray = thisNumber.split(".");
  100. thisLevel = thisNumArray.length-1;
  101. isCurrent = (i == currentIndex);
  102. if (i < tocTab.length-1) {
  103. nextLevel = tocTab[i+1][0].split(".").length-1;
  104. img = (thisLevel >= nextLevel) ? tocTab[i][4] : ((toDisplay[i+1]) ? tocTab[i][5] : tocTab[i][4]);
  105. }
  106. else img = tocTab[i][4];
  107. thisTextClass = ((thisNumber==currentNumber)?("hilight"):("heading"));
  108. thisNode = ((thisNumber==currentNumber)?("<div id=currentNode></div>"):(""));
  109. $hmtoc.document.write(thisNode);
  110. $hmtoc.document.write("<table border=0 cellspacing=0 cellpadding=2>");
  111. if (img!="") {
  112. $hmtoc.document.write("<tr><td width=" + ((thisLevel+1) * 20) + " align=right valign=top>");
  113. $hmtoc.document.write("<a href=\"javaScript:history.go(0)\" onMouseDown=\"parent.reDisplay('" + thisNumber + "'," + tocBehaviour[0] + "," + tocLinks[0] + ",event)\">");
  114. $hmtoc.document.write("<img src=\"" + img + "\" border=0></a>");
  115. }
  116. else $hmtoc.document.write("<tr><td width=" + (thisLevel * 20) + " align=right valign=top>");
  117. $hmtoc.document.write("</td><td align=left>");
  118. $hmtoc.document.write("<a href=\"javaScript:history.go(0)\" onMouseDown=\"parent.reDisplay('" + thisNumber + "'," + tocBehaviour[1] + "," + tocLinks[1] + ",event)\">");
  119. $hmtoc.document.write("<span class=\""  + thisTextClass + ((thisLevel>5) ? 6 : thisLevel+1) + "\">");
  120. $hmtoc.document.write( ((showNumbers)?(thisNumber+" "):"") + tocTab[i][1]);
  121. $hmtoc.document.write("</span></a>");
  122. $hmtoc.document.writeln("</td></tr></table>");
  123. window.onerror = oldOnError;
  124. } //isDyn
  125. } //isContent
  126. }
  127. }
  128. if (!noLink) {
  129. oldLastVisitNumber = oldCurrentNumber;
  130. oldCurrentNumber = currentNumber;
  131. }
  132. if (isContent && isDyn) {
  133. $hmtoc.document.write("\n\r\n\r<hr><font face=\"Arial,Helvetica\" size=\"1\">© 2003 ... TotalGuard Software Group</font>\n\r</body>\n\r</html>\n\r");
  134. $hmtoc.document.close();
  135. if ((tocScroll) && (thisNode)) $hmtoc.document.all["currentNode"].scrollIntoView();
  136. }
  137. if (theHref)
  138. if (theTarget=="top") top.location.href = theHref;
  139. else if (theTarget=="parent") parent.location.href = theHref;
  140. else if (theTarget=="blank") open(theHref,"");
  141. else $hmcontent.location.href = theHref;
  142. }
  143.