function Popup()
{
} // Popup
Popup._tooltipClasses = {
'bg'           : 'popupTooltipBg',
'caption_font' : 'popupTooltipCaption',
'fg'           : 'popupTooltipFg',
'text_font'    : 'popupTooltipText'
};
Popup._windowClasses = {
'bg'           : 'popupSimpleBg',
'caption_font' : 'popupSimpleCaption',
'close_font'   : 'popupSimpleClose',
'fg'           : 'popupSimpleFg',
'text_font'    : 'popupSimpleText'
};
Popup._windowCloseText = 'X';
Popup.hide = function(id)
{
var popup = document.getElementById(id);
if (popup)
{
popup.style.display = 'none';
} // if
} // hide
Popup.hideSimple = function(delay)
{
nd(delay);
return (nd(delay));
} // hideSimple
Popup.show = function(id,
vpos,
hpos)
{
var popup = document.getElementById(id);
if ((popup) &&
(popup.style.display != 'block'))
{
var info = Utils.getBrowserInfo();
if (info['0'] == 'ie')
{
var elem = document.getElementById('popupParent');
if (elem)
{
elem.appendChild(popup);
} // if
} // if
popup.style.visibility = 'hidden';
popup.style.display = 'block';
Utils.positionElem(popup,
vpos,
hpos);
popup.style.visibility = '';
} // if
} // show
Popup.showAlert = function(text)
{
alert(text);
} // showAlert
Popup.showConfirm = function(text)
{
return (confirm(text));
} // showConfirm
Popup.showImage = function(src,
title,
width,
height,
alt,
extra,
caption,
vpos,
hpos,
timeout)
{
if ((title == undefined) ||
(title == null))
{
title = 'Image';
} // if
var html = '<div style="text-align:center;" onclick="Popup.hideSimple();">';
html += '<img src="' + src + '"';
if (width)
{
html += ' width="' + width + '"';
} // if
if (height)
{
html += ' height="' + height + '"';
} // if
html += ' vspace="10" hspace="10" alt="' + alt + '" ' + extra + ' />';
if ((caption != undefined) &&
(caption != null))
{
html += '<div>' + caption + '</div>';
} // if
html += '</div>';
return (Popup.showSimple(html, title, vpos, hpos, width, height, timeout));
} // showImage
Popup.showTooltip = function(text,
width,
height,
delay,
caption)
{
if ((width == undefined) || (width == null) || (width <= 0))
{
width = 200;
} // if
if ((height == undefined) || (height == null) || (height < 0))
{
height = -1;
} // if
if ((delay == undefined) || (delay != null))
{
delay = 800;
} // if
if ((caption != undefined) && (caption != null))
{
var cap = CAPTION;
var cap_data = caption;
} // if
else
{
var cap = DONOTHING;
var cap_data = DONOTHING;
} // else
return (overlib(text,
WIDTH, width,
HEIGHT, height,
DELAY, delay,
cap, cap_data,
MOUSEOFF,
CSSCLASS,
BGCLASS, Popup._tooltipClasses.bg,
FGCLASS, Popup._tooltipClasses.fg,
CAPTIONFONTCLASS, Popup._tooltipClasses.caption_font,
CLOSEFONTCLASS, Popup._tooltipClasses.close_font,
TEXTFONTCLASS, Popup._tooltipClasses.text));
} // showToolTip
Popup.showSimple = function(html,
title,
vpos,
hpos,
width,
height,
timeout)
{
if ((title == undefined) || (title == null))
{
var cap = DONOTHING;
var cap_data = DONOTHING;
} // if
else
{
var cap = CAPTION;
var cap_data = title;
} // else
if ((width == undefined) || (width == null) || (width <= 0))
{
width = 200;
} // if
if ((height == undefined) || (height == null) || (height < 0))
{
height = -1;
} // if
var v = VAUTO;
var vdata = DONOTHING;
if ((vpos != null) &&
(vpos != undefined) &&
(vpos != ''))
{
if (isNaN(vpos))
{
if (typeof(vpos) == 'string')
{
switch (vpos)
{
case Utils.V_POSITION_ABOVE_MOUSE:
v = ABOVE;
break;
case Utils.V_POSITION_BELOW_MOUSE:
v = BELOW;
break;
case Utils.V_POSITION_CENTER:
v = RELY;
vdata = (Utils.getWindowHeight() - height) / 2;
break;
case Utils.V_POSITION_CENTER_MOUSE:
v = OFFSETY;
vdata = -1 * (height / 2);
break;
default:
if (vpos.substr(vpos.length - 2) == 'ab')
{
var temp = vpos.substr(0,
vpos.length - 2);
if (!isNaN(temp))
{
v = RELY;
vdata = parseInt(temp);
} // if
} // if
break;
} // switch
} // if
} // else if
else
{
v = OFFSETY;
vdata = parseInt(vpos);
} // else
} // if
var h = HAUTO;
var hdata = DONOTHING;
if ((hpos != null) &&
(hpos != undefined) &&
(hpos != ''))
{
if (isNaN(hpos))
{
if (typeof(hpos) == 'string')
{
switch (hpos)
{
case Utils.H_POSITION_CENTER:
h = RELX;
hdata = (Utils.getWindowWidth() - width) / 2;
if (hdata < 0)
{
hdata = 0;
} // if
break;
case Utils.H_POSITION_CENTER_MOUSE:
h = CENTER;
break;
case Utils.H_POSITION_LEFT_MOUSE:
h = LEFT;
break;
case Utils.H_POSITION_RIGHT_MOUSE:
h = RIGHT;
break;
default:
var temp = hpos.substr(0,
hpos.length - 2);
if ((hpos.substr(hpos.length - 2) == 'ab') &&
(!isNaN(temp)))
{
h = RELX;
hdata = parseInt(temp);
} // if
break;
} // switch
} // if
} // else if
else
{
h = OFFSETX;
hdata = parseInt(hpos);
} // else
} // else
if ((timeout != undefined) &&
(timeout != null))
{
var tout = TIMEOUT;
var tout_data = timeout;
} // if
else
{
var tout = DONOTHING;
var tout_data = DONOTHING;
} // else
return (overlib(html,
cap, cap_data,
WIDTH, width,
HEIGHT, height,
OFFSETX, 0,
OFFSETY, 0,
v, vdata,
h, hdata,
tout, tout_data,
STICKY,
CLOSECLICK,
CLOSETEXT, Popup._windowCloseText,
CSSCLASS,
BGCLASS, Popup._windowClasses.bg,
FGCLASS, Popup._windowClasses.fg,
CAPTIONFONTCLASS, Popup._windowClasses.caption_font,
CLOSEFONTCLASS, Popup._windowClasses.close_font,
TEXTFONTCLASS, Popup._windowClasses.text));
} // showSimple
Popup._init = function()
{
document.write('<script type="text/javascript" src="/scripts/libjs/3rdParty/overlib/Mini/overlib_mini.js"></script>');
} // _init
Popup._init();
