home *** CD-ROM | disk | FTP | other *** search
/ PC World 2002 February / PCWorld_2002-02_cd.bin / Software / TemaCD / proxomitron / prx4fcz.exe / Help / help.js < prev    next >
Text File  |  2001-08-18  |  2KB  |  70 lines

  1. /* Proxomitron HTML Help ToolTip */
  2. var d=document;
  3.  
  4. var mode;
  5. if(document.getElementById){mode="DOM";}
  6. else{mode==(eval(document.all))? "IE":"NS";}
  7.  
  8. var hwWid;
  9. if(!hwWid) hwWid = 350;
  10. var pXoff= -(hwWid/2);
  11. var pYoff= 15;
  12.  
  13. var hdr="<table width='"+hwWid+"px' border=0 cellspacing=0 cellpadding=0><tr>"+
  14. "<td colspan=3 class=tbd><img src='images/clear.gif' height=4 width=4></td>"+
  15. "<td><img src='images/clear.gif' height=4 width=4></td></tr><tr>"+
  16. "<td class=tbd><img src='images/clear.gif' height=4 width=4></td>"+
  17. "<td class=tip><table><tr><td>";
  18. var ftr="</td></tr></table></td>"+
  19. "<td class=tbd><img src='images/clear.gif' height=4 width=4></td>"+
  20. "<td class=tsh><img src='images/clear.gif' height=4 width=4></td>"+
  21. "</tr><tr><td colspan=3 class=tbd><img src='images/clear.gif' height=4 width=4></td>"+
  22. "<td class=tsh><img src='images/clear.gif' height=4 width=4></td>"+
  23. "</tr><tr><td align=left><img src='images/clear.gif' height=6 width=4></td>"+
  24. "<td colspan=2 class=tsh><img src='images/clear.gif' height=6 width=4></td>"+
  25. "<td class=tsh><img src='images/clear.gif' height=6 width=4></td>"+
  26. "</tr></table>";
  27.  
  28.  
  29.  
  30. function nop(){}
  31. function pophelp(current,e,txt){
  32.  var x;
  33.  
  34.  if (mode=="DOM"){
  35.   var winX=(document.all)? document.body.scrollLeft:window.pageXOffset;
  36.   var winY=(document.all)? document.body.scrollTop:window.pageYOffset;
  37.  
  38.   document.getElementById("help").innerHTML= hdr+txt+ftr;
  39.   x=e.clientX+winX+pXoff;
  40.   x=(x<0)? 0:x;
  41.   document.getElementById("help").style.left=x;
  42.   document.getElementById("help").style.top=e.clientY+winY+pYoff;
  43.   document.getElementById("help").style.visibility="visible";
  44.  }else if (mode=="IE"){
  45.   document.all.help.innerHTML= hdr+txt+ftr;
  46.   x=event.clientX+document.body.scrollLeft+pXoff;
  47.   x=(x<0)? 0:x;
  48.   document.all.help.style.pixelLeft=x;
  49.   document.all.help.style.pixelTop=event.clientY+document.body.scrollTop+pYoff;
  50.   document.all.help.style.visibility="visible";
  51.  }else{
  52.   document.help.document.write(hdr+txt+ftr);
  53.   document.help.document.close();
  54.   x=e.pageX+pXoff;
  55.   x=(x<0)? 0:x;
  56.   document.help.left=x;
  57.   document.help.top=e.pageY+pYoff;
  58.   document.help.visibility="show";
  59.   document.captureEvents(Event.MOUSEUP);
  60.  }
  61.  document.onmouseup = popstop;
  62. }
  63.  
  64. function popstop(){
  65.  document.onmouseup = null;
  66.  if (mode=="DOM") document.getElementById("help").style.visibility="hidden";
  67.  else if (mode=="IE") document.all.help.style.visibility="hidden";
  68.  else document.help.visibility="hidden";
  69. }
  70.