home *** CD-ROM | disk | FTP | other *** search
/ Essentials of Interactive Physiology / Essentials of Interactive Physiology.iso / pc / files / glossary / shared / code / glossary.js next >
Encoding:
Text File  |  2000-09-08  |  1.8 KB  |  46 lines

  1. var gGlossaryWindow = null
  2.  
  3. //puts up a new window with the glossary entry
  4. function ShowHotTextDef(whichLetter, whichWordNdx) {
  5.   gGlossaryWindow = null
  6.  
  7.   if(gGlossaryWindow == null) {
  8.        gGlossaryWindow = open("../../../hottext/" + whichLetter + "words/" + whichLetter + whichWordNdx + ".htm",
  9.    "definition", "width=300,height=200,directories=no,location=no,menubar=yes,toolbar=no,status=no,scrollbars=auto,resizable=yes");
  10.         gGlossaryWindow.focus()
  11.    } else {  // this should never happen
  12.           gGlossaryWindow.open("../../../hottext/" + whichLetter + "words/" + whichLetter + whichWordNdx + ".htm",
  13.              "definition", "width=300,height=200,directories=no,location=no,menubar=yes,toolbar=no,status=no,scrollbars=auto,resizable=yes");
  14.         gGlossaryWindow.focus()
  15.      }
  16. }
  17.  
  18. function OLDShowHotTextDef(whichLetter, whichWordNdx) {
  19.   gGlossaryWindow = null
  20.  
  21.   if(gGlossaryWindow == null) {
  22.        gGlossaryWindow = open("../../../../glossary/words/" + whichLetter + "words/" + whichLetter + whichWordNdx + ".htm",
  23.    "definition", "width=300,height=200,directories=no,location=no,menubar=yes,toolbar=no,status=no,scrollbars=auto,resizable=yes");
  24.         gGlossaryWindow.focus()
  25.    } else {  // this should never happen
  26.           gGlossaryWindow.open("../../../../glossary/words/" + whichLetter + "words/" + whichLetter + whichWordNdx + ".htm",
  27.              "definition", "width=300,height=200,directories=no,location=no,menubar=yes,toolbar=no,status=no,scrollbars=auto,resizable=yes");
  28.         gGlossaryWindow.focus()
  29.      }
  30. }
  31.  
  32.  
  33. // sets gGlossary window = null, called onclose of glossarywindow
  34. function glossaryCleanUp() {
  35.     // this is because netscape windows did not allow you to click on a "mouth" and play sound
  36.     if(navigator.appName != "Netscape") {
  37.            close()
  38.            gGlossaryWindow = null
  39.      }
  40. }
  41.  
  42. // replays the sound
  43. function replaySound() {
  44.    document.location = document.location
  45. }
  46.