/* (C) Daniel FAIVRE 2001 - www.geomaticien.com - freeware, no warranty - please kindly keep my url here ;-) */

var statMsg;

var nava = (document.layers);
var iex = (document.all);
var skn = (nava) ? document.popMsg : popMsg.style;

if (nava) document.captureEvents(Event.MOUSEMOVE);
document.onmousemove = get_mouse;
document.onmouseover = get_mouse;

window.defaultStatus = document.title;

function popU(msg, stat)
	{
	if (msg)
		{
		Mep ="<TABLE class='Bulle'><TR VALIGN=TOP><TD BORDER=0><B><FONT COLOR=#000000>"+msg+"</FONT></B>";
		if (stat) Mep = Mep + "</TD></TR><TR><TD ALIGN=RIGHT BORDER=0 class=Bulle>"+stat;
		Mep = Mep + "</TD></TR></TABLE>";
		if (nava)
			{
		    	skn.document.write(Mep);
			skn.document.close();
			}
		else
			{
			get_mouse(event);
			iex("popMsg").innerHTML = Mep;
			}
		skn.visibility = "visible";
		}
	skn.zIndex = 999;
	statMsg = msg;
	}

function get_mouse(e)
	{
	if ((skn.visibility == "visible") || (nava))
		{
		x = (nava) ? e.pageX : event.x + document.body.scrollLeft;
		y = (nava) ? e.pageY : event.y + document.body.scrollTop; 
		skn.left = x  - 10;
		skn.top = y + (nava ? 14 : 17);

		w = (nava) ? document.popMsg.clientHeight : popMsg.clientWidth;
		h = (nava) ? document.popMsg.clientHeight : popMsg.clientHeight;
		dw = (nava) ? document.popMsg.offsetWidth : document.body.offsetWidth;
		dh =  (nava) ? document.popMsg.offsetHeight : document.body.offsetHeight;
		if ((y+h) >= dh) skn.top = (y - h > 10) ? y - h - 10: 0;
		if ((x+w) >= (dw-10)) skn.left = (dw > 3*w/2) ? dw - 3*w/2 : 0;
		window.status = statMsg.replace(/<.*>/g, "");
		}
	}

function popD()
	{
	skn.visibility = "hidden";
	window.status = window.defaultStatus;
	}

skn.left = ((nava) ?  window.innerWidth : document.body.clientWidth) / 3;
skn.top = 10;
skn.width=skn.width;
