running=0;
current=-1;
isW3C=document.getElementById?1:0;
isOpera=navigator.userAgent.indexOf('Opera')!=-1?1:0;
isNN4=document.layers?1:0;
isIE=document.all?1:0;

	
function mouseHandler(evt) {
	if (isNN4) {
		mouseX=evt.pageX;
		mouseY=evt.pageY;
	} 
	else if (isIE) {
		mouseX=window.event.clientX;
		mouseY=window.event.clientY;
	}	
	else if (isOpera) {
		mouseX=window.event.clientX;
		mouseY=window.event.clientY;
	}
	else if (isW3C) {
		mouseX=evt.clientX;	
		mouseY=evt.clientY;
	}
	
	if (! isNN4) offy=getscrollY();
	else offy=0;
	
	if ((running==1) && (current!=-1)) moveLayer('info'+current,mouseX+8,mouseY+8+offy);
	return true;
}

function getscrollY() {
	if (top.pageYOffset) {
		return top.pageYOffset;
	} else if (top.document.body.scrollTop) {
		return top.document.body.scrollTop;
	} else {
		return 0;
	}
}
	
function showLayer(which,how) {
	if (isIE) {
		document.all[which].style.visibility=how;
	} else if (isNN4) {
		document.layers[which].visibility=how;
	} else if (isW3C) {
		obj=document.getElementById(which);
		obj.style.visibility=how;
	}
}
	
function moveLayer(which,x,y) {
	if (isIE)	{
		document.all[which].style.pixelLeft=x;
		document.all[which].style.pixelTop=y;
	}
	else if (isNN4) {
		document.layers[which].moveTo(x,y);
	}
	else if (isOpera) {
		obj=document.getElementById(which);
		obj.style.left=x;
		obj.style.top=y;	
	}
	else if (isW3C) {
		obj=document.getElementById(which);
		obj.style.left=x+'px';
		obj.style.top=y+'px';	
	}
}

function getWinWidth() {
	if (isIE) {
		return document.body.clientWidth;
	}
	else if (isNN4 || isW3C || isOpera) {
		return window.innerWidth;
	}
}
	
function infoOn(which) {
	if (running==0) return;
	showLayer('info'+which,'visible');
	current=which;
}
	
function infoOut(which) {
	if (running==0) return;
	showLayer('info'+which,'hidden');
}
	

function init() {
	running=1;
	if (isNN4) document.captureEvents(Event.MOUSEMOVE);
	document.onmousemove=mouseHandler;
//	offset=(getWinWidth()-740)/2;
}


