// Popup 1.0.0
// by Scott Yenor, July 2003
// Copyright (c) iolo technologies, LLC
var ns6 = ((navigator.appName == "Netscape") && document.getElementById)?1:0;
var ie4 = ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4) && (navigator.userAgent.indexOf('Opera') == -1))?1:0;
var op6 = (navigator.userAgent.indexOf('Opera') != -1)?1:0;
// opera is compatible with the Netscape 6 version of this menu
if (op6 == 1) ns6 = 1;
window.MouseMoveX = 0;
window.MouseMoveY = 0;
function Popup()
{
if (!window.Popups)
window.Popups = new Array();
this.ID = window.Popups.length;
this.Type = "Popup";
this.Width = 300;
this.BodyColor = 'EEEEEE';
this.HeadingColor = '000000';
this.BodyFontFace = 'MS Sans Serif';
this.BodyFontSize = 1;
this.BodyFontColor = '000000';
this.HeadingFontFace = 'MS Sans Serif';
this.HeadingFontSize = 1;
this.HeadingFontColor = 'FFFFFF';
this.Body = '';
this.Title = '';
// variables to hold the painted area of the popup
this.topX = 0;
this.topY = 0;
this.botX = 0;
this.botY = 0;
// procedures for Popup object
this.Show = fShowPopup;
this.Hide = fHidePopup;
this.Write = fWritePopup;
// handles usage of popup
this.Written = 0;
window.Popups[window.Popups.length] = this;
}
function fShowPopup()
{
if (ie4 == 1)
objPopup = document.all('syPopup' + this.ID);
else if (ns6 == 1)
objPopup = document.getElementById('syPopup' + this.ID);
else
return;
xPos = window.MouseMoveX;
yPos = window.MouseMoveY;
// add a small amount to get away from the mouse
xPos += 10;
yPos += 10;
// adjust to fit popup within the screen
if ((xPos + this.Width) > document.body.clientWidth)
{
diff = (xPos + this.Width) - document.body.clientWidth;
xPos = xPos - (diff + 5); // add 5 for padding
}
if (ie4 == 1)
{
objPopup.style.pixelTop = yPos;
objPopup.style.pixelLeft = xPos;
objPopup.style.visibility = 'visible';
}
else if (ns6 == 1)
{
objPopup.style.top = yPos;
objPopup.style.left = xPos;
objPopup.style.visibility = 'visible';
}
}
function fWritePopup()
{
strPopup = "";
if (ie4 == 1)
{
strPopup += "";
}
else if (ns6 == 1)
{
strPopup += "
";
}
else
return;
strPopup = strPopup.replace('{ID}', this.ID);
strPopup = strPopup.replace('{ID}', this.ID);
strPopup = strPopup.replace('{BODY}', this.Body);
strPopup = strPopup.replace('{TITLE}', this.Title);
strPopup = strPopup.replace('{WIDTH}', this.Width);
strPopup = strPopup.replace('{WIDTH}', this.Width);
strPopup = strPopup.replace('{BODYCOLOR}', this.BodyColor);
strPopup = strPopup.replace('{BODYCOLOR}', this.BodyColor);
strPopup = strPopup.replace('{BODYFONTFACE}', this.BodyFontFace);
strPopup = strPopup.replace('{BODYFONTSIZE}', this.BodyFontSize);
strPopup = strPopup.replace('{BODYFONTCOLOR}', this.BodyFontColor);
strPopup = strPopup.replace('{HEADINGCOLOR}', this.HeadingColor);
strPopup = strPopup.replace('{HEADINGCOLOR}', this.HeadingColor);
strPopup = strPopup.replace('{HEADINGCOLOR}', this.HeadingColor);
strPopup = strPopup.replace('{HEADINGFONTFACE}', this.HeadingFontFace);
strPopup = strPopup.replace('{HEADINGFONTSIZE}', this.HeadingFontSize);
strPopup = strPopup.replace('{HEADINGFONTCOLOR}', this.HeadingFontColor);
this.Written = 1;
document.writeln(strPopup);
}
function fHidePopup()
{
if (ie4 == 1)
{
objPopup = document.all('syPopup' + this.ID);
objPopup.style.visibility = 'hidden';
objPopup.style.pixelTop = 0;
objPopup.style.pixelLeft = 0;
}
else if (ns6 == 1)
{
objPopup = document.getElementById('syPopup' + this.ID);
objPopup.style.visibility = 'hidden';
objPopup.style.top = 0;
objPopup.style.left = 0;
}
}
function eMouseMove(e)
{
if (e) evt = e;
if (window.event) evt = event;
if (ie4 == 1 || ns6 == 1)
{
window.MouseMoveX = evt.clientX;
window.MouseMoveY = evt.clientY;
// get vertical scroll offset
if (ie4 == 1)
yScroll = document.body.scrollTop;
else if (ns6 == 1)
yScroll = window.pageYOffset;
window.MouseMoveY = window.MouseMoveY + yScroll;
}
}
if (ie4 == 1 || ns6 == 1)
if (!document.onmousemove)
document.onmousemove=eMouseMove;