home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2003 November
/
Chip_2003-11_cd2.bin
/
nav2004
/
download
/
NAV
/
External
/
NORTON
/
APP
/
NAVComUI.dll
/
HTML
/
COMMONUISHARED.JS
< prev
next >
Wrap
Text File
|
2003-08-17
|
3KB
|
105 lines
// Disable Drag-and-drop support
document.ondragstart = function(){return false;}
// MessageBox() Flags
var MB_OK = 0x00000000;
var MB_OKCANCEL = 0x00000001;
var MB_ABORTRETRYIGNORE = 0x00000002;
var MB_YESNOCANCEL = 0x00000003;
var MB_YESNO = 0x00000004;
var MB_RETRYCANCEL = 0x00000005;
var MB_ICONHAND = 0x00000010;
var MB_ICONQUESTION = 0x00000020;
var MB_ICONEXCLAMATION = 0x00000030;
var MB_ICONASTERISK = 0x00000040;
var MB_USERICON = 0x00000080;
var MB_ICONWARNING = MB_ICONEXCLAMATION;
var MB_ICONERROR = MB_ICONHAND;
var MB_ICONINFORMATION = MB_ICONASTERISK;
var MB_ICONSTOP = MB_ICONHAND;
var IDOK = 1;
var IDCANCEL = 2;
var IDABORT = 3;
var IDRETRY = 4;
var IDIGNORE = 5;
var IDYES = 6;
var IDNO = 7;
var ENTER_KEY = 13;
var ESC_KEY = 27;
var SPACEBAR_KEY = 32;
function Tooltip(line1, line2, line3, line4)
{
paddingX = 10;
paddingY = 10;
font_size = 8;
if (line1)
{
tooltipWidth = document.body.clientWidth - (paddingX * 2);
tooltipX = paddingX;
tooltipY = paddingY;
beginTable = "<table width="+tooltipWidth+" border=0 bgcolor='white' cellspacing=0 cellpadding=0 style='Border: black 1px solid'>"
endTable = "</table>";
row1 = "<tr><td><table width='100%' height=17 border=0 cellspacing=0 cellpadding=0 style='background-image: url(tooltip_titlebar_430x17.gif); background-repeat: no-repeat'><tr><td width="+(tooltipWidth)+" style='color: #5B5B5B'><b>" + " " + line1 + "</b></td><td width='10' align='right' style='color: #5B5B5B' OnClick='CloseTooltip()'><a style='text-decoration: none; cursor: hand'><b>X</b></a></td></tr></table></td></tr>";
if (line3 && line4)
row2 = "<tr><td colspan=2><textarea readonly class=cutooltip TABINDEX=-1 style='background-color: #ffffff; width:"+(tooltipWidth)+"; height: 60'>" + line2 + "\n" + line3 + "\n" + line4 + "</textarea></td></tr>";
else
row2 = "<tr><td colspan=2><textarea readonly class=cutooltip TABINDEX=-1 style='background-color: #ffffff; width:"+(tooltipWidth)+"; height: 60'>" + line2 + "</textarea></td></tr>";
document.all("tooltiptext").innerHTML = beginTable + row1 + row2 + endTable;
document.all("tooltiptext").style.display = "";
document.all("tooltiptext").style.left = tooltipX;
document.all("tooltiptext").style.top = tooltipY;
}
}
function CloseTooltip()
{
document.all("tooltiptext").style.display = "none";
}
function KeyboardCloseTooltip(objTR)
{
// Close the Tooltip from the keyboard.
// Launch help for repair wizard from keyboard
// The "ENTER" and "ESC" keys are used.
if ( (event.keyCode == ENTER_KEY) || (event.keyCode == ESC_KEY) )
{
document.all("tooltiptext").style.display = "none";
}
}
function SetProgress(nPct)
{
// We must special case 0 otherwise we get "invalid property"... arrrgggg!
var nRemain = 100 - nPct;
if(nPct > 0)
{
ProgDone.style.display = "";
ProgDone.width = nPct + "%";
}
else
{
ProgDone.style.display = "none";
}
if(nRemain > 0)
{
ProgRemain.style.display = "";
ProgRemain.width = nRemain + "%";
}
else
{
ProgRemain.style.display = "none";
}
}