home *** CD-ROM | disk | FTP | other *** search
/ ftp6.securdisc.net / ftp6.securdisc.net.tar / ftp6.securdisc.net / NeroSecurDiscViewer_it-IT.chm / scripts / production.js < prev   
Text File  |  2013-09-20  |  2KB  |  62 lines

  1. // ----------------------------------------------------------------------------
  2. // LEXICON SCRIPT
  3. // ----------------------------------------------------------------------------
  4.  
  5. Schema.Tooltips = function ( ) { }
  6. Schema.Tooltips.last = null;
  7.  
  8. Schema.Tooltips.Hide = function ( toolTipId, elemId )
  9. {
  10.     var toolTip = document.getElementById ( toolTipId );
  11.     toolTip.style.display = "none";
  12.     toolTip = null;
  13. }
  14.  
  15. Schema.Tooltips.Show = function ( toolTipId, elemId )
  16. {
  17.     // Clear tooltip, if one is already active...
  18.     if ( Schema.Tooltips.last )
  19.     {
  20.         Schema.Tooltips.last.style.display = "none";
  21.         Schema.Tooltips.last = null;
  22.     }
  23.     
  24.     var toolTip = document.getElementById ( toolTipId );
  25.     var elem = document.getElementById ( elemId );
  26.     var page = document.getElementsByTagName("body")[0];
  27.     if ( toolTip.parentNode != page )
  28.     {
  29.         Schema.DOM.RemoveElement ( toolTip );
  30.         Schema.DOM.PrependChild ( toolTip, page );
  31.     }
  32.     toolTip.style.position = "absolute";
  33.     toolTip.style.zIndex = 100;
  34.     toolTip.style.display = "block";
  35.     
  36.     // Set tooltip position...
  37.     var size = Schema.Utils.GetClientSize();
  38.  
  39.     var pos = Schema.Utils.GetPosition(elem);
  40.     var pageY = Schema.Utils.GetPosition(page).y;
  41.     var top = pos.y - pageY + 10 + elem.offsetHeight;
  42.     
  43.         
  44.     var left = pos.x;
  45.     if ( (pos.x + toolTip.offsetWidth) > (size.Width - 25) )
  46.         left = size.Width - 25 - toolTip.offsetWidth;
  47.     if ( left < 0 )
  48.         left = 0;
  49.     
  50.     toolTip.style.top = top + "px";
  51.     toolTip.style.left = left + "px";
  52. }
  53.  
  54.  
  55. function selectOption ( x ) 
  56. {
  57.     if(x == "nothing")
  58.         return;
  59.     else
  60.         document.location.href = x;
  61. }
  62.