var IE = document.all?true:false

if (!IE) {
   document.captureEvents(Event.MOUSEMOVE);
   document.onmousemove = mousePos;
   var netX, netY;
}

function posX() {
	if (IE) {
	   tempX = document.body.scrollLeft + event.clientX;
	}
	if (tempX<0) {
	   tempX=0;
	}
	return tempX;
}

function posY(e) {
	if (IE) {
	    tempY = document.body.scrollTop+event.clientY;
	}
	if (tempY < 0) {
	   tempY = 0;
	}
	return tempY;
}

function mousePos(e) {
	netX=e.pageX;
	netY=e.pageY;
}

function iPokaz(pX, pY, src) {
	if (IE) {
	   document.all.info.style.visibility = 'visible';
	   document.all.info.innerHTML = src;
	   document.all.info.style.left = posX()+pX+"px";
	   document.all.info.style.top = posY()+100+pY+"px";
	} else {
		 document.getElementById("info").style.visibility = 'visible';
		 document.getElementById("info").style.left = netX+pX+"px";
		 document.getElementById("info").style.top = netY+pY+"px";
		 document.getElementById("info").innerHTML = src;
	}
	iPrzesun(pX, pY);
}

function iPrzesun(pX, pY) {
	if (IE) {
	   document.all.info.style.left = posX()+pX+"px";
	   document.all.info.style.top = posY()+pY+"px";
	} else {
		 document.getElementById("info").style.left = netX+pX+"px";
		 document.getElementById("info").style.top = netY+pY+"px";
	}
}

function iZamknij() {
	if (IE) {
	   document.all.info.innerHTML = '';
	   document.all.info.style.visibility = 'hidden';
	} else {
		 document.getElementById("info").style.visibility = 'hidden';
		 document.getElementById("info").innerHTML = '';
	}
}

function iObraz(tytul) {
	text='<table cellspacing="0" cellpadding="3" border="0" style="font-family: Garamond; background-color: #dfdbaf; border: 1px solid #8e795f;"><tbody><tr><td style="padding: 4px; color: #663366; font-size: 14px; font-style: italic;">'+tytul+'</td></tr></tbody></table>';
	iPokaz(10,25,text);
}

function iRuch() {
	iPrzesun(10,25);
}