home *** CD-ROM | disk | FTP | other *** search
/ PC World 2002 September / PCWorld_2002-09_cd.bin / Software / Vyzkuste / visioview / vwc10.exe / vwc10.msi / Vis_VWC.chm / external.js < prev    next >
Encoding:
Text File  |  2001-10-26  |  7.2 KB  |  322 lines

  1. var L_ShowAll_message, L_HideAll_message, L_ShowAlt_message, L_HideAlt_message
  2. L_ShowAll_message = "Show All" ;
  3. L_HideAll_message = "Hide All" ;
  4. L_ShowAlt_message = "Show all contracted text" ;
  5. L_HideAlt_message = "Hide all expanded text" ;
  6.  
  7. var sections;
  8. sections = 0 ;
  9. for (var i=0; i< document.all.tags("DIV").length; i++) {
  10.     if (document.all.tags("DIV").style.display=="none") {
  11.         sections = sections + 1 ;
  12.     }
  13. }
  14.  
  15.  
  16. if(document.images) {
  17. var right = new Image();
  18. right.src = "media/images/right.gif";
  19. var down = new Image();
  20. down.src = "media/images/down.gif";
  21.  
  22. function doColor() {
  23.     var i;
  24.     var posend ;
  25.     posend = document.all.tags("A").length ;
  26.     for (i = 0; i< posend; i++) {
  27.         if (document.all.tags("A")[i].className == "anchorclass") {
  28.             document.all.tags("A")[i].style.color = "#990099" ;
  29.         }
  30.     }
  31.     var divcount = document.all.tags("DIV").length ;
  32.     var allshown = 1 ;
  33.     for(var i = 0; i < divcount; i++) {
  34.         if(document.all.tags("DIV")[i].className == "divclass") {
  35.             if(document.all.tags("DIV")[i].style.display=="none") {
  36.                 allshown = 0;
  37.             }
  38.             if(document.all.tags("DIV")[i].style.display=="") {
  39.                 var divvy = document.all.tags("DIV")[i].id ;
  40.                 var pos = divvy.lastIndexOf("_") + 1 ;
  41.                 var thenum = divvy.slice(pos) ;
  42.                 var thebutton = "Button" + thenum ;
  43.                 document.all.tags("IMG")(thebutton).src = "Media/Images/down.gif" ;
  44.             }
  45.             
  46.         }
  47.     }
  48.     
  49.     var acount = document.all.tags("A").length ;
  50.     for (var i = 0; i < acount; i++) {
  51.         if (document.all.tags("A")[i].id == "clickshowall") {
  52.             if (allshown == 1) {
  53.                 clickshowall.innerHTML = L_HideAll_message ;
  54.                 expcon.alt = L_HideAlt_message ;
  55.                 expcon.src = "Media/Images/hideallright.gif" ;
  56.             }
  57.         }
  58.         
  59.     }
  60.         
  61.  
  62. }
  63.  
  64.  
  65.  
  66.  
  67. function doSection (secNum, button){
  68.     var count = 0
  69.     var divcount = document.all.tags("DIV").length ;
  70.     if (secNum.style.display=="none"){
  71.         secNum.style.display = ""
  72.         button.src = down.src;
  73.     }else{
  74.         secNum.style.display = "none"
  75.         button.src = right.src;
  76.     }
  77.     for (var i=0; i< divcount; i++) {
  78.         if (document.all.tags("DIV")[i].style.display=="none") {
  79.             count = count + 1 ;
  80.         }
  81.     }
  82.     
  83.     if (count > 0) {
  84.         clickshowall.innerHTML = L_ShowAll_message ;
  85.         expcon.alt = L_ShowAlt_message ;
  86.         expcon.src = "Media/Images/showalldown.gif" ; 
  87.     } else {
  88.         clickshowall.innerHTML = L_HideAll_message ;
  89.         expcon.alt = L_HideAlt_message ;
  90.         expcon.src = "Media/Images/hideallright.gif"    
  91.     }
  92.     
  93. }
  94.  
  95. function noSection (secNum, button){
  96.     if (secNum.style.display==""){
  97.         secNum.style.display = "none"
  98.         button.src = right.src;
  99.     }
  100. }
  101. }
  102.  
  103. function roll(ID, NewImage) {
  104.     ID.src = NewImage;
  105. }
  106.  
  107. function MoveIt(ID, source) {
  108. ID.src = source;
  109. }
  110.  
  111. function Redirect(chmname,htmname){
  112. holding.innerHTML="<" + "OBJECT ID=" +
  113. '"DirSearch"' +
  114. " WIDTH=1" +
  115. " HEIGHT=1" +
  116. " CLASSID=" + '"CLSID:A55A00C1-FD6C-11D2-A922-00C04F69D235"' +
  117. "></OBJECT>" ;
  118.  
  119. if(DirSearch.FileFound(chmname)==true){
  120.         location.href="ms-its:" + chmname + "::/" + htmname ;
  121.     }
  122.     else {
  123.         location.href="ms-its:Vis_VM.chm::/VM_Solutions and eVisio2.htm" ;
  124.     }
  125.     
  126.  
  127. }
  128.  
  129.  
  130. function winJump(term, help) {
  131. holding.innerHTML="<" + "OBJECT id=" +
  132. '"hhctrl"' + " type=" +
  133. '"application/x-oleobject"' +
  134. " classid = " +
  135. '"clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"' +
  136. "><PARAM name=" +
  137. '"Command"' + 
  138.  " value=" +
  139.  '"WinHelp, Popup"'+
  140.  ">" + "<PARAM name=" +
  141.  '"Item1"' +
  142.  " value="+
  143.  help +
  144.  ">" +
  145.  "<PARAM name="+
  146.  '"Item2"'+
  147.  " value="+
  148.  term + ">"+
  149.  "</OBJECT>";
  150.  
  151. hhctrl.Click();
  152.  
  153. }
  154.  
  155. function secwin(wintype,chmname,htmname) {
  156.  
  157. holding.innerHTML="<" + "OBJECT id=" +
  158. '"hhctrl3"' + " type=" +
  159. '"application/x-oleobject"' +
  160. " classid = " +
  161. '"clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"' +
  162. ">" +
  163. "<PARAM name=" +
  164. '"Command"' + 
  165.  " value=" +
  166.  '"Related Topics"'+
  167.  ">" + "<PARAM name=" +
  168.  '"Window"' +
  169.  " value="+
  170. '"' + wintype + '"' + ">" +
  171. "<PARAM name=" + 
  172. '"Item1"' +
  173.  " value="+
  174. '"' + "Title;" + chmname + "::/" + htmname + '"' + ">" +
  175. "</OBJECT>";
  176.  
  177.  hhctrl3.Click() ;
  178. }
  179.  
  180.  
  181.  
  182. function closewin() {
  183.  
  184. holding.innerHTML="<" + "OBJECT id=" +
  185. '"hhctrlclose"' + " type=" +
  186. '"application/x-oleobject"' +
  187. " classid = " +
  188. '"clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"' +
  189. "><PARAM name=" +
  190. '"Command"' + 
  191.  " value=" +
  192.  '"Close"' + ">" +
  193.  "</OBJECT>";
  194.  
  195.  
  196.  hhctrlclose.Click() ;
  197.  
  198.  
  199. }
  200.  
  201.  
  202.  
  203.  
  204. function RelTopics(winname,target) {
  205.  
  206.  
  207. holding.innerHTML="<" + "OBJECT id=" +
  208. '"hhctrl3"' + " type=" +
  209. '"application/x-oleobject"' +
  210. " classid = " +
  211. '"clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"' +
  212. ">" +
  213. "<PARAM name=" +
  214. '"Command"' + 
  215.  " value=" +
  216.  '"Related Topics"'+
  217.  ">" + "<PARAM name=" +
  218.  '"Window"' +
  219.  " value="+
  220. '"' + winname + '"' + ">" +
  221. "<PARAM name=" + 
  222. '"Item1"' +
  223.  " value="+
  224. '"' + "Title;" + target + '"' + ">" +
  225. "</OBJECT>";
  226.  
  227.  hhctrl3.Click() ;
  228. }
  229.  
  230.  
  231. function BrowserWin(site,alternative) {
  232.  
  233. holding.innerHTML="<" + "OBJECT id=" +
  234. '"ShtCt"' + " type=" +
  235. '"application/x-oleobject"' +
  236. " classid = " +
  237. '"clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"' +
  238. ">" +
  239. "<PARAM name=" +
  240. '"Command"' + 
  241.  " value=" +
  242.  '"ShortCut"'+
  243.  ">" + 
  244. "<PARAM name=" + 
  245. '"Item1"' +
  246.  " value="+
  247. '"' + "," + site + "," + '"' + ">" +
  248. "<PARAM name=" + '"' + "Window" + '"' +
  249. " value=" + alternative + '"' + ">" +
  250. "</OBJECT>";
  251.  
  252. ShtCt.Click() ;
  253. }
  254.  
  255. function showall() {
  256.     
  257.  
  258.     clickshowall.style.cursor = "wait" ;
  259.     expcon.style.cursor = "wait" ;
  260.     if (clickshowall.innerHTML==L_ShowAll_message) {
  261.     clickshowall.innerHTML = L_HideAll_message ;
  262.     expcon.alt = L_HideAlt_message ;
  263.     expcon.src = "Media/Images/hideallright.gif"
  264.     var divcount = document.all.tags("DIV").length ;
  265.     for(var i = 0; i < divcount; i++) 
  266.         if(document.all.tags("DIV")[i].className == "divclass") {
  267.         document.all.tags("DIV")[i].style.display="" ;
  268.         }
  269.     var imgcount = document.all.tags("IMG").length ;
  270.     for(var i = 0; i < imgcount; i++)
  271.         if(document.all.tags("IMG")[i].className == "Btn") {
  272.         document.all.tags("IMG")[i].src = "Media/Images/down.gif" ;
  273.         }
  274.  
  275.     }
  276.     else {
  277.     clickshowall.innerHTML = L_ShowAll_message ;
  278.     expcon.alt = L_ShowAlt_message ;
  279.     expcon.src = "Media/Images/showalldown.gif" ;
  280.     var divcount = document.all.tags("DIV").length ;
  281.     for(var i = 0; i < divcount; i++) 
  282.         if(document.all.tags("DIV")[i].className == "divclass") {
  283.         document.all.tags("DIV")[i].style.display="none" ;
  284.         }
  285.     var imgcount = document.all.tags("IMG").length ;
  286.     for(var i = 0; i < imgcount; i++)
  287.         if(document.all.tags("IMG")[i].className == "Btn") {
  288.         document.all.tags("IMG")[i].src = "Media/Images/right.gif" ;
  289.         }
  290.  
  291.     }
  292.     clickshowall.style.cursor = "auto" ;
  293.     expcon.style.cursor = "auto" ;
  294.  
  295. }
  296.  
  297. function ShowSharedText() {
  298.     var TheText ;
  299.     var framenum = self.frames.length ;
  300.     for( var i=0; i< framenum; i++) {
  301.         TheText = document.frames[0].document.body.innerHTML ;
  302.         var StartHere = TheText.indexOf("</H1>",0) ;
  303.         if (StartHere < 0 ) {
  304.             Starthere = TheText.indexOf("</h1>",0) ;
  305.         }
  306.         var EndHere = TheText.length ;
  307.         var LessHeading = TheText.slice(StartHere,EndHere) ;
  308.         
  309.         var divname = "<DIV id=holding>" ;
  310.         EndHere = LessHeading.search(divname) ;
  311.         
  312.         var LessDiv = LessHeading.slice(0,EndHere) ;
  313.         var divtext= document.all.tags("IFRAME")[0].parentElement ;
  314.         divtext.innerHTML = LessDiv ;
  315.     }
  316.     
  317.     
  318. }
  319.  
  320.  
  321.  
  322.