<!-- //

var offsetx = 10
var offsety = 10

var x = 0;
var y = 0;
var snow = 0;
var sw = 0;
var cnt = 0;
var dir = 1;
var tr = 1;
var popDiv = document.getElementById("popDiv");
var ms = false;

document.onmousemove = mouseMove;
//document.captureEvents(Event.MOUSEMOVE);
if (
  (navigator.userAgent.indexOf('MSIE 5')>0) ||
  (navigator.userAgent.indexOf('MSIE 6')>0) ||
  (navigator.userAgent.indexOf('MSIE 7')>0) ||
  (navigator.userAgent.indexOf('MSIE 8')>0)
) {
  ms = true;
} else {
  addEventListener('mousemove',function(e) {mouseMove(e) },false);
}

function popup(text,width_web) {
	if (typeof width_web != 'undefined') { width=width_web;}
	dts(0,text);
}

function clean() {
	if ( cnt >= 1 ) { sw = 0 };
	if ( sw == 0 ) {
		snow = 0;
		hideObject();
	} else {
		cnt++;
	}
}

function dts(d,text) {
	txt = "<TABLE WIDTH="+width+" BORDER=0 CELLPADDING=1 CELLSPACING=0 BGCOLOR=\"#C0902F\"><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 BGCOLOR=\"#FFFFC0\"><TR><TD><FONT FACE=\"Verdana,Arial,Helvetica\" COLOR=\"#000000\" SIZE=\"1\">&nbsp;"+text+"&nbsp;</TD></TR></TABLE></TD></TR></TABLE>"
	layerWrite(txt);
	dir = d;
	disp();
}

function disp() {
	if (snow == 0) 	{
		if (dir == 2) {
			moveTo(x+offsetx-(width/2),y+offsety);
		}
		if (dir == 1) {
			moveTo(x+offsetx,y+offsety);
		}
		if (dir == 0) {
			moveTo(x-offsetx-width,y+offsety);
		}
    popDiv.style.visibility = "visible"
		snow = 1;
	}
}

function mouseMove(e) {
  if (ms) {
    x=event.x; y=event.y;
  } else {
    x=e.pageX; y=e.pageY;
  }
	if (snow > 0) {
		if (dir == 2) {
			moveTo(x+offsetx-(width/2),y+offsety);
		}
		if (dir == 1) {
			moveTo(x+offsetx,y+offsety);
		}
		if (dir == 0) {
			moveTo(x-offsetx-width,y+offsety);
		}
	}
}

function layerWrite(txt) {
  popDiv.innerHTML = txt;
}

function hideObject() {
  popDiv.style.visibility = "hidden"
}

function moveTo(xL,yL) {
  popDiv.style.left = xL
  popDiv.style.top = yL
}

// -->

