var tempX = 0;
var tempY = 0;
var pozadovanaVrstva = '';
var aktualniCast = '';
var winW = 630;
var IE = false; 

if ( navigator.appName.substr(0,9) ==  'Microsoft' ) {
	IE = true;
}
if ( !IE ){
	document.captureEvents(Event.MOUSEMOVE); 	
	winW = window.innerWidth - 200;	
}else{
	winW = winW -200;
}
function zobrazeni(vrstva,akce){ 
	if ( akce == 'v') {
		//document.onmousemove=getMouseXY;
		pozadovanaVrstva = vrstva;
		string="ukaz(\""+vrstva+"\");";
		setTimeout(string,100);
	}
	if ( akce == 'h' ){
		document.onmousemove = '';
		pozadovanaVrstva = vrstva;
		string = "schovej(\""+vrstva+"\");";
		setTimeout(string,100);
	}
}
function ukaz(vrstva){
		//document.getElementById(vrstva).style.visibility="visible";
		document.getElementById(vrstva).style.display="block";
}
function schovej(vrstva){
		//document.getElementById(vrstva).style.visibility="hidden";
		document.getElementById(vrstva).style.display="none";
}
function getMouseXY(e) {
		if (IE) {
				tempX = event.clientX + document.body.scrollLeft;
				tempY = event.clientY + document.body.scrollTop;
		} else {
				tempX = e.pageX;
				tempY = e.pageY;
		}  
		if (tempX < 0 ) {tempX = 0;}
		if (tempY < 0 ) {tempY = 0;}  
		if (tempX > winW ) { tempX = winW; }
		document.getElementById(pozadovanaVrstva).style.top=tempY + 10;
		document.getElementById(pozadovanaVrstva).style.left=tempX + 10;
		document.onmousemove = '';
		return true;
}

