<!--

//Set global browser boolean flags, grabbed from http://www.projectit.com/articles/yamf/yamfwoes03.html#_Toc518748726
var isIE	= document.all;
var isIE6	= isIE && document.implementation;
var isIE5	= isIE && window.print && !isIE6;
var isIEDOM2	= isIE5 || isIE6;
var isIE4	= isIE && !isIEDOM2 &&
         	  navigator.cookieEnabled;
var isIE3	= isIE && !isIE4 && !isIEDOM2;
var isNS	= navigator.mimeTypes && !isIE;
var isNS3	= isNS && !navigator.language;
var isNS4	= document.layers;
var isNS6	= document.getElementById && !isIE;
var isNSDOM2	= isNS6;
var isDOM2	= isIEDOM2 || isNSDOM2;

var old = !isIE && !isNS;

//look for first, if any, parm on URL line, i.e.; www.website.com?mode=P
function GetMode()
{
	var strURL = window.location.href;
	var nPos = strURL.indexOf('=');        
	var nMode = '?';
	
	if (-1 != nPos)
	{
		nMode = strURL.substr(nPos + 1, 1);
	}
	
	return nMode.toUpperCase();
}

var g_nMode = GetMode();

//   ######################################################
//   # JAVASCRIPT POPUPS ROUTINE VERSION #7 07-Feb-2001   #        
//   # Written by Mike McGrath [mike_mcgrath@lineone.net] # 
//   # PC-Tested for Netscape 3.04, 4.61, 6.0, & IE5.5    #
//   # Note: Popups may not cover all form field inputs.  #
//   # PLEASE RETAIN THIS NOTICE WHEN COPYING MY SCRIPT.  #
//   # THIS SCRIPT IS COPYRIGHT OF MIKE MCGRATH 1998-2001 #
//   ######################################################
//
//   Original: Mike McGrath  (mike_mcgrath@lineone.net)
//   Web Site: http://website.lineone.net/~mike_mcgrath

var Xoffset = 30;        // modify these values to ...
var Yoffset = -30;        // change the popup position.
var popwidth = 160;       // popup width
var bcolor="darkgray";  // popup border color
var fcolor="black";     // popup font color
var fface="georgia";    // popup font face

// create content box
document.write("<DIV ID='pup'></DIV>");

var skin;

if (isNS) skin = document.pup;
if (isIE) skin = pup.style;
if (isNS6) skin = document.getElementById("pup").style;

// park modifier
var yyy = -1000;

// capture pointer
if (isNS) document.captureEvents(Event.MOUSEMOVE);
if (isNS6) document.addEventListener("mousemove", newPos, true);
if (isNS || isIE) document.onmousemove = newPos;

// avoid edge overflow
function nudge(x)
{
  var extreme, overflow, temp;

  // right
  if (isIE) extreme=(document.body.clientWidth-popwidth);
  if (isNS) extreme=(window.innerWidth-popwidth);

  if (parseInt(skin.left) > extreme)
  {
    overflow = parseInt(skin.left) - extreme;
    temp = parseInt(skin.left);
    temp -= overflow;
    if (isNS || isIE) skin.left=temp;
    if (isNS6) skin.left = temp + "px";
  }

  // left
  if (parseInt(skin.left) < 1)
  {
    overflow=parseInt(skin.left) - 1;
    temp=parseInt(skin.left);
    temp -= overflow;
    if (isNS || isIE) skin.left = temp;
    if (isNS6) skin.left = temp + "px";
  }
}

// write content & display
function popup(msg,bak)
{
  var content="<TABLE WIDTH='"+popwidth+"' BORDER='1' BORDERCOLOR="+bcolor+" CELLPADDING=2 CELLSPACING=0 "+"BGCOLOR="+bak+"><TD ALIGN='center'><FONT COLOR="+fcolor+" FACE="+fface+" SIZE='2'>"+msg+"</FONT></TD></TABLE>";

  if (old)
  {
    alert(msg);
    return;
  } 
   
  yyy = Yoffset; 
  skin.width = popwidth;

  if (isNS)
  { 
    skin.document.open();
    skin.document.write(content);
    skin.document.close();
    skin.visibility =" visible";
  }

  if (isIE)
  {        
    pup.innerHTML = content;
    skin.visibility = "visible";
  }  

  if (isNS6)
  {   
    document.getElementById("pup").innerHTML = content;
    skin.visibility = "visible";
  }
}


// park content box
function kill()
{
  if (!old)
  {
    yyy = -1000;
    skin.visibility = "hidden";
    skin.width = 0;
  }
}

//mouse location handler, grabbed from http://www.projectit.com/articles/yamf/yamfwoes07.html
function newPos(E)
{
  mouseX = (isNS4) ? E.pageX :
           (isIE6) ? event.clientX +
                     document.documentElement.scrollLeft +
                     document.body.scrollLeft :
           (isIE)  ? event.clientX + window.scrollX :
                     E.clientX + window.pageXOffset;
  mouseY = (isNS4) ? E.pageY :
           (isIE6) ? event.clientY +
                     document.documentElement.scrollTop +
                     document.body.scrollTop :
           (isIE)  ? event.clientY + window.scrollY :
                     E.clientY + window.pageYOffset;

  skin.left = mouseX + Xoffset;
	skin.top = mouseY + yyy;
	
	nudge(mouseX);
}

