
if (typeof fcolor == 'undefined') { var fcolor = "DARKSLATEGRAY";}
if (typeof bordercolor == 'undefined') { var bordercolor = "#3C33A6";}
if (typeof textcolor == 'undefined') { var textcolor = "#ffffff";}
if (typeof textsize == 'undefined') { var textsize = "1";}
if (typeof titletextcolor == 'undefined') { var titletextcolor = "Black";}
if (typeof titletextsize == 'undefined') { var titletextsize = "2";}
if (typeof width == 'undefined') { var width = "250";}
if (typeof borderthickness == 'undefined') { var borderthickness = "2";}
if (typeof offsetx == 'undefined') { var offsetx = 10;}
if (typeof offsety == 'undefined') { var offsety = 10;}
ns6 = (document.layers)? true:false
ie8 = (document.all)? true:false
var sw = 0;
var center = 0;
var lalala = 0;
var direction = 1;
var x = 0;
var y = 0;
if (ie8) {
	if (navigator.userAgent.indexOf('MSIE 8')>0) {
		ie8 = true;
	} else {
		ie8 = false; }
} else {
	ie8 = false;
}
if ( (ns6) || (ie8) ) {
	if (ns6) overlayer = document.PopupDiv
	if (ie8) overlayer = PopupDiv.style
	document.onmousemove = mouseMove
	if (ns6) document.captureEvents(Event.MOUSEMOVE)
}
function right(text, title) {
	grrr(1,text,title);
}
function left(text, title) {
	grrr(0,text,title);
}
function center(text, title) {
	grrr(2,text,title);
}
function grrr(d,text, title) {
	txt = "<TABLE WIDTH="+width+" BORDER=0 CELLPADDING="+borderthickness+" CELLSPACING=0 BGCOLOR=\""+bordercolor+"\"><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD><SPAN ID=\"PTT\"><B><FONT COLOR=\""+titletextcolor+"\"SIZE="+titletextsize+">"+title+"</FONT></B></SPAN></TD></TR></TABLE><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 BGCOLOR=\""+fcolor+"\"><TR><TD><SPAN ID=\"PST\"><FONT COLOR=\""+textcolor+"\" size="+textsize+">"+text+"</FONT><SPAN></TD></TR></TABLE></TD></TR></TABLE>"
	MakeThePopup(txt);
	direction = d;
	displayThePopup();
}
function displayThePopup() {
	if ( (ns6) || (ie8) ) {
		if (lalala == 0) 	{
			if (direction == 0) {
				moveThePopup(overlayer,x-offsetx-width,y+offsety);
			}
			if (direction == 1) {
				moveThePopup(overlayer,x+offsetx,y+offsety);
			}
			if (direction == 2) {
				moveThePopup(overlayer,x+offsetx-(width/2),y+offsety);
			}

			showThePopup(overlayer);
			lalala = 1;
		}
	}
}
function mouseMove(m) {
	if (ns6) {x=m.pageX; y=m.pageY;}
	if (ie8) {x=event.x; y=event.y;}
	if (ie6) {x=event.x+document.body.scrollLeft; y=event.y+document.body.scrollTop;}
	if (lalala) {
		if (direction == 2) {
			moveThePopup(overlayer,x+offsetx-(width/2),y+offsety);
		}
		if (direction == 1) {
			moveThePopup(overlayer,x+offsetx,y+offsety);
		}
		if (direction == 0) {
			moveThePopup(overlayer,x-offsetx-width,y+offsety);
		}
	}
}
function MakeThePopup(txt) {
        if (ns6) {
                var laya = document.PopupDiv.document
                laya.write(txt)
                laya.close()
        }
        else if (ie8) document.all["PopupDiv"].innerHTML = txt
}
function moveThePopup(obj,xL,yL) {
        obj.left = xL
        obj.top = yL
}
function hideThePopup(obj) {
        if (ns6) obj.visibility = "hide"
        else if (ie8) obj.visibility = "hidden"
}
function showThePopup(obj) {
        if (ns6) obj.visibility = "show"
        else if (ie8) obj.visibility = "visible"
}
function closethePopup() {
	if ( center >= 1 ) { sw = 0 };
	if ( (ns6) || (ie8) ) {
		if ( sw == 0 ) {
			lalala = 0;
			hideThePopup(overlayer);
		} else {
			center++;
		}
	}
}