//	ATTENTION NETSCAPE NAVIGATOR 3.0 USERS!!!
//	If you see this text while using the site and you did NOT click on
//	View -> Source, you're using a buggy browser.
//
//	FOLLOW THESE STEPS
//	1. Press your BACK BUTTON.
//	2. Click on REFRESH or RELOAD.
//	You should now be able to use the site without seeing this message.
//	This problem can however return if your browser does not cache this
//	document correctly.
//	Upgrade your browser to Netscape's latest and you will not have this
//	problem any more: http://home.netscape.com/
//
////////////////
//	overLIB 2.22
//	Originally by Erik Bosrup (erik@bosrup.com)
//	Last modified 1999-03-31
//	Portions by Dan Steinman, Landon Bradshaw and Gnowknayme.
//	Get the latest version at http://www.bosrup.com/web/overlib/
//	Some minor changings regarding readability and inventing the popupSwitch:
//	Peter@Enzenberger.de, 2000-02-11.
//	Since this is free please don't try to sell
//	this solution to a company claiming it is yours. Give me credit where
//	credit is due and I'll be happy. And I'd love to see any changes you've
//	done to the code. Free to use - don't abuse.
/////////////////
//	CONFIGURATION

//	Main popup display switch. Set to 0, where you do not want popups
//	Set to 1, in pages where you want popups
	if (typeof popupSwitch == 'undefined') { var popupSwitch = 1}

//	Main background color (the large area). Usually a bright color (white, yellow etc)
	if (typeof fcolor == 'undefined') { var fcolor = "#FFFF00";}
//	if (typeof fcolor == 'undefined') { var fcolor = "#FFFF00";}
	
//	Border color and color of caption. Usually a dark color
	if (typeof backcolor == 'undefined') { var backcolor = "#FFFF00";}
//	if (typeof backcolor == 'undefined') { var backcolor = "#2525AA";}
	
//	Text color. Usually a dark color
	if (typeof textcolor == 'undefined') { var textcolor = "#404040";}
	
//	Color of the caption text. Usually a bright color
	if (typeof capcolor == 'undefined') { var capcolor = "#000000";}
	
//	Color of "Close" when using Sticky, Usually a semi-bright color
	if (typeof closecolor == 'undefined') { var closecolor = "#999999";}
	
//	Width of the popups in pixels, 100-300 pixels is typical
	if (typeof width == 'undefined') { var width = "250";}
	
//	How thick the border should be in pixels. 1-3 pixels is typical
	if (typeof border == 'undefined') { var border = "5";}
	
//	How many pixels right/left from cursor to show the popup, best between 3 and 12 are best
	if (typeof offsetx == 'undefined') { var offsetx = 10;}
	
//	How many pixels down from cursor, best between 3 and 12 are best
	if (typeof offsety == 'undefined') { var offsety = 10;}

/////////////////////

ns4 = (document.layers)? true:false
ie4 = (document.all)? true:false

// Microsoft Stupidity Check.
if (ie4) {
	if (navigator.userAgent.indexOf('MSIE 5')>0) {
		ie5 = true}
	else {ie5 = false }}
else {ie5 = false}

var x = 0; var y = 0; var snow = 0; var sw = 0; var cnt = 0; var dir = 1;

if ( (ns4) || (ie4) ) {
	if (ns4) {popupObject = document.overDiv};
	if (ie4) {popupObject = overDiv.style};
	document.onmousemove = mouseMove;
	if (ns4) {document.captureEvents(Event.MOUSEMOVE)};
}

// Public functions to be used on pages.
// Umleitungen vereinfachen: 
function popUp(title, text) {
	if ( text == 'undefined' ) {text = title; title = ' '};
	popupRightCaption(title,text);
}

function popupRight(text) {popupRightCaption(1,title,text)}
function popupRightCaption(title, text) {popupCaption(1,text,title)}
function stickRightCaption(text,title) {popupSticky(1,text,title)}

function popupLeft(text) {popupSimple(0,text)}
function popupLeftCaption(text, title) {popupCaption(0,text,title)}
function stickLeftCaption(text,title) {popupSticky(0,text,title)}

function popupCenter(text) {popupSimple(2,text)}
function popupCenterCaption(text, title) {popupCaption(2,text,title)}
function stickCenterCaption(text,title) {popupSticky(2,text,title)}

function popOut() {
	if ( cnt >= 1 ) { sw = 0 };
	if ( (ns4) || (ie4) ) {
		if ( sw == 0 ) {snow = 0;hideObject(popupObject);}
		else {cnt++}
	}
}

// private procedures

function popupSimple(d,text) {
	txt = "<TABLE WIDTH="+width+" BORDER=0 CELLPADDING="+border+" CELLSPACING=0 BGCOLOR=\""+backcolor+"\"><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 BGCOLOR=\""+fcolor+"\"><TR><TD><FONT FACE=\"Arial,Helvetica\" COLOR=\""+textcolor+"\" SIZE=\"-2\">"+text+"</FONT></TD></TR></TABLE></TD></TR></TABLE>"
	layerWrite(txt); dir = d; popupDisplay();
}
function popupCaption(d,text, title) {
	txt = "<TABLE WIDTH="+width+" BORDER=0 CELLPADDING="+border+" CELLSPACING=0 BGCOLOR=\""+backcolor+"\"><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD><SPAN ID=\"PTT\"><FONT COLOR=\""+capcolor+"\">"+title+"</FONT></SPAN></TD></TR></TABLE><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 BGCOLOR=\""+fcolor+"\"><TR><TD><SPAN ID=\"PST\"><FONT COLOR=\""+textcolor+"\">"+text+"</FONT><SPAN></TD></TR></TABLE></TD></TR></TABLE>"
	layerWrite(txt); dir = d; popupDisplay();
}
function popupSticky(d, text, title) {
	sw = 1; cnt = 0;
	txt = "<TABLE WIDTH="+width+" BORDER=0 CELLPADDING="+border+" CELLSPACING=0 BGCOLOR=\""+backcolor+"\"><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD><SPAN ID=\"PTT\"><FONT COLOR=\""+capcolor+"\">"+title+"</FONT></SPAN></TD><TD ALIGN=RIGHT><A HREF=\"/\" onMouseOver=\"closeStickyClick();\" ID=\"PCL\"><FONT COLOR=\""+closecolor+"\">Close</FONT></A></TD></TR></TABLE><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 BGCOLOR=\""+fcolor+"\"><TR><TD><SPAN ID=\"PST\"><FONT COLOR=\""+textcolor+"\">"+text+"</FONT><SPAN></TD></TR></TABLE></TD></TR></TABLE>"
	layerWrite(txt); dir = d; popupDisplay(); snow = 0;
}
function popupDisplay() {
 if (popupSwitch == 1) {
	if ( (ns4) || (ie4) ) {
		if (snow == 0) {
			if (dir == 2) { // Center
				moveTo(popupObject,x+offsetx-(width/2),y+offsety)}
			if (dir == 1) { // Right
				moveTo(popupObject,x+offsetx,y+offsety) }
			if (dir == 0) { // Left
				moveTo(popupObject,x-offsetx-width,y+offsety)}
			showObject(popupObject);
			snow = 1;
		}
	}
 }
// Here you can make the text goto the statusbar.
}

// Moves the layer
function mouseMove(e) {
	if (ns4) {x=e.pageX; y=e.pageY;}
	if (ie4) {x=event.x; y=event.y;}
	if (ie5) {x=event.x+document.body.scrollLeft; y=event.y+document.body.scrollTop;}
	if (snow) {
		if (dir == 2) { // Center
			moveTo(popupObject,x+offsetx-(width/2),y+offsety);
		}
		if (dir == 1) { // Right
			moveTo(popupObject,x+offsetx,y+offsety);
		}
		if (dir == 0) { // Left
			moveTo(popupObject,x-offsetx-width,y+offsety);
		}
	}
}

function closeStickyClick() {hideObject(popupObject); sw=0}

function layerWrite(txt) {
	if (ns4) {
		var lyr = document.overDiv.document
		lyr.write(txt)
		lyr.close()}
	else if (ie4) document.all["overDiv"].innerHTML = txt
}
function showObject(obj) {
	if (ns4) obj.visibility = "show"
	else if (ie4) obj.visibility = "visible"
}
function hideObject(obj) {
	if (ns4) obj.visibility = "hide";
	else if (ie4) obj.visibility = "hidden"
}
function moveTo(obj,xL,yL) {obj.left = xL; obj.top = yL}
