home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 Special / chip-cd_2001_spec_05.zip / spec_05 / document.cab / regentry.chm / glossary.js < prev    next >
Text File  |  1999-12-17  |  2KB  |  66 lines

  1. // Filename: glossary.js in NTShared.chm
  2. // Version post beta 3 (7)
  3. // version 05.27.99
  4.  
  5.  
  6. window.onload= resizeGloss;
  7. window.onresize= resizeGloss;
  8. document.mouseover= buttonMouseover;
  9. window.onbeforeprint= set_to_print;
  10. window.onafterprint= reset_form;
  11.  
  12.  
  13. function buttonMouseover(){
  14. var e= window.event.srcElement;
  15.  
  16.     if (e.className.toLowerCase()=="button") e.className= "buttonDown";
  17.     if (e.children.tags('span')(0)=="button") e.children.tags('span')(0).className= "buttonDown";
  18.  
  19.     if (e.className.toLowerCase()=="buttonDown") e.className= "button";
  20.     if (e.children.tags('span')(0)=="buttonDown") e.children.tags('span')(0).className= "button";
  21. }
  22.  
  23.  
  24.  
  25. function buttonUp() {
  26. var e= window.event.srcElement;
  27. }
  28.  
  29. function resizeGloss(){
  30.  
  31. var oButtonMenu= document.all.item("buttonMenu");
  32. var oText= document.all.item("text");
  33.  
  34.     if (oText ==null) return;
  35.     if (oButtonMenu != null){
  36.         document.all.text.style.overflow= "auto";
  37.           document.all.buttonMenu.style.width= document.body.offsetWidth;
  38.         document.all.text.style.width= document.body.offsetWidth-4;
  39.         document.all.text.style.top= document.all.buttonMenu.offsetHeight-10;
  40.         if (document.body.offsetHeight > document.all.buttonMenu.offsetHeight)
  41.             document.all.text.style.height= document.body.offsetHeight - document.all.buttonMenu.offsetHeight; 
  42.         else document.all.text.style.height=0;    
  43.     }    
  44. }  
  45.  
  46. //** set_to_print ***************
  47. function set_to_print(){
  48.     var i;
  49.  
  50.     if (window.text)document.all.text.style.height = "auto";
  51.             
  52.     for (i=0; i < document.all.length; i++){
  53.         if (document.all[i].tagName == "BODY") {
  54.             document.all[i].scroll = "auto";
  55.             }
  56.         if (document.all[i].tagName == "A") {
  57.             document.all[i].outerHTML = "<A HREF=''>" + document.all[i].innerHTML + "</a>";
  58.             }
  59.         }
  60. }
  61.  
  62. function reset_form(){
  63.  
  64.      document.location.reload();
  65.     
  66. }