home *** CD-ROM | disk | FTP | other *** search
/ ftp.ac-grenoble.fr / 2015.02.ftp.ac-grenoble.fr.tar / ftp.ac-grenoble.fr / assistance.logicielle / XP_ServicePack-3.iso / support / tools / deploy.cab / ref.chm / glossary.js < prev    next >
Text File  |  2006-12-29  |  4KB  |  124 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-4;
  40.         if (document.body.offsetHeight > document.all.buttonMenu.offsetHeight)
  41.             document.all.text.style.height= document.body.offsetHeight - (document.all.buttonMenu.offsetHeight + 4)
  42.         else document.all.text.style.height=0;    
  43.     }    
  44. }  
  45.  
  46.  
  47. //*** callPopup ***************************************************************************************
  48. // creates an object from an <A> tag HREF, the object inserts a winhelp popup
  49. // called by: <A ID="wPopup" HREF="HELP=@@file_name.hlp@@ TOPIC=@@topic#@@">@@Popup text@@</A>
  50.  
  51. function document.onclick() {
  52.  
  53. var e= window.event.srcElement;
  54.  
  55. var sParamCHM,sParamFILE, sParamEXEC, sParamMETA,iEND;
  56. var sActX_HH= " type='application/x-oleobject' classid='clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11' ";
  57.  
  58. if (e.tagName == "FONT"){
  59.     e = e.parentElement;
  60. }
  61.  
  62. if (e.id.toLowerCase()!="wpopup") return;
  63.      
  64. var eH= unescape(e.href);
  65. var eH_= eH.toLowerCase();
  66.        event.returnValue = false;
  67.                                                                
  68.   var iTOPIC = eH_.lastIndexOf("topic=");
  69.         if (iTOPIC==-1) return;
  70.         sParamTOPIC = eH.substring((iTOPIC+6),eH.length);          // extracts the topic for item2
  71.     
  72.   var iHELP = eH_.lastIndexOf("help=");
  73.         if (iHELP==-1) return;
  74.         sParamHELP = eH.substring(iHELP+5,iTOPIC);            // extracts the help file for item1
  75.  
  76.         if (document.hhPopup) document.hhPopup.outerHTML = "";    // if hhPopup object exists, clears it
  77.  
  78.  
  79.  var  h= "<object id='hhPopup'"+ sActX_HH + "STYLE='display:none'><param name='Command' value='WinHelp, Popup'>";
  80.       h= h + "<param name='Item1' value='" + sParamHELP + "'><param name='Item2' value='" + sParamTOPIC + "'></object>";
  81.         
  82.         document.body.insertAdjacentHTML("beforeEnd", h);     
  83.         document.hhPopup.hhclick();
  84. }
  85. function list_them(){
  86.     return;
  87.     var i;
  88.  
  89.     for (i=0; i < document.all.length; i++){
  90.         alert (document.all[i].outerHTML);
  91.         }
  92. }
  93.  
  94. //** set_to_print ***************
  95. function set_to_print(){
  96.     var i;
  97.  
  98.     if (window.text)document.all.text.style.height = "auto";
  99.             
  100.     for (i=0; i < document.all.length; i++){
  101.         if (document.all[i].tagName == "BODY") {
  102.             document.all[i].scroll = "auto";
  103.             }
  104.         if (document.all[i].tagName == "A") {
  105.             joe = " " + document.all[i].outerHTML
  106.             joe = joe.toLowerCase();
  107.             joe = joe.indexOf("href=")
  108.             if(joe == -1){
  109.                 document.all[i].outerHTML = "<A NAME=''>" + document.all[i].innerHTML + "</a>";
  110.                 }
  111.             else
  112.                 {
  113.                 document.all[i].outerHTML = "<A HREF=''>" + document.all[i].innerHTML + "</a>";
  114.                 }
  115.             reset_form();
  116.             }
  117.         }
  118. }
  119.  
  120. function reset_form(){
  121.  
  122.      document.location.reload();
  123.     
  124. }