home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp6.securdisc.net
/
ftp6.securdisc.net.tar
/
ftp6.securdisc.net
/
SecurDiscViewer_Csy.chm
/
scripts
/
production.js
< prev
Wrap
Text File
|
2010-08-08
|
2KB
|
62 lines
// ----------------------------------------------------------------------------
// LEXICON SCRIPT
// ----------------------------------------------------------------------------
Schema.Tooltips = function ( ) { }
Schema.Tooltips.last = null;
Schema.Tooltips.Hide = function ( toolTipId, elemId )
{
var toolTip = document.getElementById ( toolTipId );
toolTip.style.display = "none";
toolTip = null;
}
Schema.Tooltips.Show = function ( toolTipId, elemId )
{
// Clear tooltip, if one is already active...
if ( Schema.Tooltips.last )
{
Schema.Tooltips.last.style.display = "none";
Schema.Tooltips.last = null;
}
var toolTip = document.getElementById ( toolTipId );
var elem = document.getElementById ( elemId );
var page = document.getElementsByTagName("body")[0];
if ( toolTip.parentNode != page )
{
Schema.DOM.RemoveElement ( toolTip );
Schema.DOM.PrependChild ( toolTip, page );
}
toolTip.style.position = "absolute";
toolTip.style.zIndex = 100;
toolTip.style.display = "block";
// Set tooltip position...
var size = Schema.Utils.GetClientSize();
var pos = Schema.Utils.GetPosition(elem);
var pageY = Schema.Utils.GetPosition(page).y;
var top = pos.y - pageY + 10 + elem.offsetHeight;
var left = pos.x;
if ( (pos.x + toolTip.offsetWidth) > (size.Width - 25) )
left = size.Width - 25 - toolTip.offsetWidth;
if ( left < 0 )
left = 0;
toolTip.style.top = top + "px";
toolTip.style.left = left + "px";
}
function selectOption ( x )
{
if(x == "nothing")
return;
else
document.location.href = x;
}