/*
Simple Image Trail script- By JavaScriptKit.com
Visit http://www.javascriptkit.com for this script and more
This notice must stay intact
*/ 
/*
Modyfikacja: kompaz.pl - www.kompaz.pl - IX.2008
*/

var w=1
var h=1

//if (document.getElementById || document.all)
document.write('<div id="infobox_txt"><h1 style="font-size:10pt; margin:3px;padding:0;" id="infobox_title"></h1><p id="infobox_opis" style="margin:3px;color:#025080;font-weight:bold;"></p></div>')

function getinfobox()
{
	if (document.getElementById) return document.getElementById("infobox_txt").style
	else if (document.all) return document.all.trailimagid.style
}
function bodyinfobox()
{
	return (!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}
function hideinfobox()
{
	document.onmousemove=""
	getinfobox().visibility="hidden"
	getinfobox().left=-1000
	getinfobox().top=0
}
function showinfobox(width,height,file,infobox_desc,infobox_title,pr,widthimg)
{
	if(navigator.userAgent.toLowerCase().indexOf('opera') == -1)
	{
		w=width
		wimg=widthimg
		h=height
						
		if(pr==1)
			document.getElementById('press').className='pressroomtrail'
			
		document.getElementById('infobox_opis').innerHTML=infobox_desc
		document.getElementById('infobox_title').innerHTML=infobox_title
		document.onmousemove=za_mysza_infobox
		getinfobox().visibility="visible"
//		getinfobox().width=w+"px"
		getinfobox().background="white"
//		getinfobox().height=h+"px"
	}
}
function za_mysza_infobox(e)
{
	if(navigator.userAgent.toLowerCase().indexOf('opera') == -1)
	{
		var xcoord=20
		var ycoord=20

		if (typeof e != "undefined")
		{
			xcoord+=e.pageX
			ycoord+=e.pageY
		}
		else if (typeof window.event !="undefined")
		{
			xcoord+=bodyinfobox().scrollLeft+event.clientX
			ycoord+=bodyinfobox().scrollTop+event.clientY
		}

		var docwidth=document.all? bodyinfobox().scrollLeft+bodyinfobox().clientWidth : pageXOffset+window.innerWidth-15
		var docheight=document.all? Math.max(bodyinfobox().scrollHeight, bodyinfobox().clientHeight) : Math.max(document.body.offsetHeight, window.innerHeight)

		if (xcoord+w+3>docwidth)
		xcoord=xcoord-w-(20*2)

		if (ycoord-bodyinfobox().scrollTop+h>bodyinfobox().clientHeight)
		ycoord=ycoord-h-20;

		getinfobox().left=xcoord+"px"
		getinfobox().top=ycoord+"px"
	}
}

