home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 August / Chip_2004-08_cd2.bin / avid_dvfree / info / XpressFree.chm / forpages.js < prev    next >
Text File  |  2003-09-29  |  2KB  |  72 lines

  1. //showhide() carries out the actions associated with the show more info and show less info buttons
  2. //called onMouseUp from any instance of those buttons
  3. //when button is in more info state:
  4. //runs through all div tags, checks whether their ids include "more"
  5. //if they do, displays them, switches the button status stuff to the less info state,
  6.  
  7. function showhide() {
  8.  
  9.    var alldivs = document.getElementsByTagName("div");
  10.    
  11.    if (document.images.moreintopic) {
  12.  
  13.      for (i=0; i<alldivs.length; i++) {
  14.        var obj = alldivs[i];
  15.        if (obj.id.indexOf("more")!= -1) {
  16.          obj = obj.style;
  17.          obj["display"] = "block";
  18.        }
  19.      }
  20.  
  21.      document.images.moreintopic.src = hide["nm"];
  22.      document.images.moreintopic.title = "Hide additional information in the topic.";
  23.      document.images.moreintopic.id = "lessintopic";
  24.   }
  25.   else  {
  26.     for (i=0; i<alldivs.length; i++) {
  27.       var obj = alldivs[i];
  28.       if (obj.id.indexOf("more")!= -1) {
  29.         obj = obj.style;
  30.         obj["display"] = "none";
  31.       }
  32.     }
  33.  
  34.      document.images.lessintopic.src = show["nm"];
  35.      document.images.lessintopic.title = "Display additional information in the topic.";
  36.      document.images.lessintopic.id = "moreintopic";
  37.  
  38.   }
  39. }
  40.  
  41. function morebuttondown() {
  42.  
  43.    if (document.images.moreintopic) {
  44.       document.images.moreintopic.src=show["dn"];
  45.    }
  46.    else {
  47.       document.images.lessintopic.src=hide["dn"];
  48.    }
  49. }
  50.  
  51. function morebuttonroll() {
  52.  
  53.    if (document.images.moreintopic) {
  54.       document.images.moreintopic.src=show["rl"];
  55.    }
  56.    else {
  57.       document.images.lessintopic.src=hide["rl"];
  58.    }
  59. }
  60.  
  61. function morebuttonorig() {
  62.  
  63.    if (document.images.moreintopic) {
  64.       document.images.moreintopic.src=show["nm"];
  65.    }
  66.    else {
  67.       document.images.lessintopic.src=hide["nm"];
  68.    }
  69. }
  70.  
  71.  
  72.