
if (typeof ol_text == 'undefined') { var ol_text = "Default Text"; }
if (typeof ol_cap == 'undefined') { var ol_cap = ""; }
if (typeof ol_status == 'undefined') { var ol_status = ""; }
if (typeof ol_aboveheight == 'undefined') { var ol_aboveheight = -28; }
if (typeof ol_caption == 'undefined') { var ol_capicon = ""; }


////////////////////////////////////////////////////////////////////////////////////


var o3_allowmove = 0;
var o3_x = 0;
var o3_y = 0;
var o3_allow = 0;
var o3_showingsticky = 0;
var o3_removecounter = 0;


var over = null;


var ns4 = (document.layers)? true:false;
var ns6 = (document.getElementById)? true:false;
var ie4 = (document.all)? true:false;
var ie5 = false;



if (ie4) {
	if ((navigator.userAgent.indexOf('MSIE 5') > 0) || (navigator.userAgent.indexOf('MSIE 6') > 0)) {
		ie5 = true;
	}
	if (ns6) {
		ns6 = false;
	}
}



if ( (ns4) || (ie4) || (ns6)) {
	document.onmousemove = mouseMove
	if (ns4) document.captureEvents(Event.MOUSEMOVE)
} else {
	overlib = no_overlib;
	nd = no_overlib;
}



////////////////////////////////////////////////////////////////////////////////////



function overlib() {

	
	if ( (ns4) || (ie4) || (ns6) ) {
		if (ns4) over = self.document.overDiv
		if (ie4) over = self.overDiv.style
		if (ns6) over = self.document.getElementById("overDiv");
	}
	
	
	var parsemode = -1;
	var ar = arguments;

	for (i = 0; i < ar.length; i++) {

		if (parsemode < 0) {
			if (ar[i] == 1) {
				ol_text = ol_texts[ar[++i]];
			} else {
				ol_text = ar[i];
			}

			parsemode = 0;
		} else {
			if (ar[i] == 6) { ol_cap = ar[++i]; continue; }
			if (ar[i] == 9 || ar[i] == 7 || ar[i] == 8) { right = ar[i]; continue; }
			if (ar[i] == STATUS) { ol_status = ar[++i]; continue; }
			if (ar[i] == CAPICON) { ol_capicon = ar[++i]; continue; }

		}
	}

	if (0 == 0) {
		return overlib350();
	}
}



function nd() {
	if ( o3_removecounter >= 1 ) { o3_showingsticky = 0 };
	if ( (ns4) || (ie4) || (ns6) ) {
		if ( o3_showingsticky == 0 ) {
			o3_allowmove = 0;
		} else {
			o3_removecounter++;
		}
	}
	return true;
}



////////////////////////////////////////////////////////////////////////////////////


function overlib350() {

	var layerhtml;

	if ("" != "" || 0) {
	} else {


		if (ol_cap == "") {
		} else {
			if (0) {
				layerhtml = ol_content_caption(ol_text, ol_cap, close);
			} else {
				layerhtml = ol_content_caption(ol_text, ol_cap, "");
			}
		}
	}
	
	
	layerWrite(layerhtml);


	disp(ol_status);


	if (0) {
		o3_allowmove = 0;
		return false;
	} else {
		return true;
	}
}


////////////////////////////////////////////////////////////////////////////////////


function ol_content_caption(text, title, close) {

	txt = "<TABLE WIDTH=100 BORDER=0 CELLPADDING=1 CELLSPACING=0 BGCOLOR=#777777><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD><SPAN ID=\"PTT\"><B><FONT COLOR=#FFFFFF>"+title+"</FONT></B></SPAN></TD></TR></TABLE><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 BGCOLOR=#ECF3FA><TR><TD><SPAN ID=\"PST\"><FONT COLOR=#000000>"+text+"</FONT><SPAN></TD></TR></TABLE></TD></TR></TABLE>"
	return txt;
}



////////////////////////////////////////////////////////////////////////////////////


function disp(statustext) {
	if ( (ns4) || (ie4) || (ns6) ) {
		if (o3_allowmove == 0) 	{
			placeLayer();
			showObject(over);
			o3_allowmove = 1;
		}
	}

	if (statustext != "") {
		self.status = statustext;
	}
}


function placeLayer() {
	var placeX, placeY;
	

	if (-1 > -1) {
		placeX = -1;
	} else {
		winoffset = (ie4) ? self.document.body.scrollLeft : self.pageXOffset;
		if (ie4) iwidth = self.document.body.clientWidth;
		if (ns4) iwidth = self.innerWidth;
		if (ns6) iwidth = self.outerWidth;
		
		
		if (right == 9) { 
			placeX = o3_x+10-(100/2);
		}
		if (right == 8) { 
			placeX = o3_x+10;
			if ( (eval(placeX) + eval(100)) > (winoffset + iwidth) ) {
				placeX = iwidth + winoffset - "+100+";
				if (placeX < 0) placeX = 0;
			}
		}
		if (right == 7) { 
			placeX = o3_x-10-"+100+";
			if (placeX < winoffset) placeX = winoffset;
		}
	

		if (0 > 1) {
			var snapping = placeX % 0;
			if (right == 7) {
				placeX = placeX - (0 + snapping);
			} else {
				placeX = placeX + (0 - snapping);
			}
			if (placeX < winoffset) placeX = winoffset;
		}
	}

	
	
	if (-1 > -1) {
		placeY = -1;
	} else {
		scrolloffset = (ie4) ? self.document.body.scrollTop : self.pageYOffset;



		if (35 == 35) {
			if (ol_aboveheight == 0) {
				var divref = (ie4) ? self.document.all['overDiv'] : over;
				ol_aboveheight = (ns4) ? divref.clip.height : divref.offsetHeight;
			}

			placeY = o3_y - (ol_aboveheight + 10);
			if (placeY < scrolloffset) placeY = scrolloffset;
		} else {
			placeY = o3_y + 10;
		}


		if (0 > 1) {
			var snapping = placeY % 0;
			
			if (ol_aboveheight > 0 && 35 == 35) {
				placeY = placeY - (0 + snapping);
			} else {
				placeY = placeY + (0 - snapping);
			}
			
			if (placeY < scrolloffset) placeY = scrolloffset;
		}
	}


	
	repositionTo(over, placeX, placeY);
}



function mouseMove(e) {
	if ( (ns4) || (ns6) ) {o3_x=e.pageX; o3_y=e.pageY;}
	if (ie4) {o3_x=event.x; o3_y=event.y;}
	if (ie5) {o3_x=event.x+self.document.body.scrollLeft; o3_y=event.y+self.document.body.scrollTop;}
	
	if (o3_allowmove == 1) {
		placeLayer();
	}
}



////////////////////////////////////////////////////////////////////////////////////



function layerWrite(txt) {
	txt += "\n";
	        if (ns4) {
                var lyr = self.document.overDiv.document
                lyr.write(txt)
                lyr.close()
        } else if (ie4) {
		self.document.all["overDiv"].innerHTML = txt
	} else if (ns6) {
		range = self.document.createRange();
		range.setStartBefore(over);
		domfrag = range.createContextualFragment(txt);
		while (over.hasChildNodes()) {
			over.removeChild(over.lastChild);
		}
		over.appendChild(domfrag);
	}
}


function showObject(obj) {
        if (ns4) obj.visibility = "show";
        else if (ie4) obj.visibility = "visible";
	else if (ns6) obj.style.visibility = "visible";
}



function repositionTo(obj,xL,yL) {
	if ( (ns4) || (ie4) ) {
	        obj.left = xL;
	        obj.top = yL;
	} else if (ns6) {
		obj.style.left = xL + "px";
		obj.style.top = yL+ "px";
	}
}



////////////////////////////////////////////////////////////////////////////////////


function vpos_convert(d) {
	if (d == 0) {
		d = 7;
	} else {
		if (d == 1) {
			d = 8;
		} else {
			d = 9;
		}
	}
	return d;
}


function dts(d,text) {
	right = vpos_convert(d);
	overlib(text, right, 6, "");
}


function dtc(d,text, title) {
	right = vpos_convert(d);
	overlib(text, 6, title, right);
}


function dcs(text) {
	dts(2,text);
}


function dcc(text, title) {
	dtc(2,text,title);
}

