
var itemWidth=220;var offsetfrommouse=[15,15];var displayduration=0;var currentimageheight=100;
function gettrailobj(){if(document.getElementById)
return document.getElementById("boxik").style
else if(document.all)
return document.all.trailimagid.style}

function gettrailobjnostyle(){ if(document.getElementById) return document.getElementById("boxik")
else if(document.all) return document.all.trailimagid }

function truebody()
{
return(!window.opera&&document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body
}



function showtrail(imagename,textname)
{
if(!imagename&&!textname)return;

if(textname&&!imagename)
{
newimagename='<img src="zaslepki/min_brak.gif" border="0" align="left">';width=220;
}else if(imagename&&!textname)
        {
		newimagename='<table width="100" height="100" align="left" border="0" cellspacing="0" cellpadding="0"><tr><td background="gfx/loading.gif"><img src="'+imagename+'" border="0"></td></tr></table>';width=100;
		}else
		    {
            //newimagename='<table width="100" height="100" align="left" border="0" cellspacing="0" cellpadding="0"><tr><td background="gfx/loading.gif"><img src="'+imagename+'" border="0"></td></tr></table>';width=220;
            newimagename='<img src="'+imagename+'" border="0" align="left">';width=220;
            }

itemWidth=width;currentimageheight=100;

document.onmousemove=followmouse;
newHTML='<div style="position:relative; overflow:hidden; border: 1px solid #000000; background-color: #ffffff; width: '+width+'px; height: 105px" align="center" class="offerinfo">'+newimagename+textname+'</div>';
gettrailobjnostyle().innerHTML=newHTML;
gettrailobj().visibility="visible";
}





function hidetrail(){
gettrailobj().visibility="hidden"
document.onmousemove=""
gettrailobj().left="-700px"}





function followmouse(e){
var xcoord=offsetfrommouse[0]
var ycoord=offsetfrommouse[1]

var docwidth=document.all?truebody().scrollLeft+truebody().clientWidth-25:pageXOffset+window.innerWidth-25
var docheight=document.all?Math.min(truebody().scrollHeight,truebody().clientHeight):Math.min(document.body.offsetHeight,window.innerHeight)

if(typeof e!="undefined")
{
xcoord+=e.pageX-350;
if((docheight-e.pageY)<(currentimageheight+20))ycoord+=e.pageY-Math.max(0,(20+currentimageheight+e.pageY-docheight-truebody().scrollTop));else ycoord+=e.pageY;
} else if(typeof window.event!="undefined")
  {
  xcoord+=truebody().scrollLeft+event.clientX-350
  if(docheight-event.clientY<(currentimageheight+20)) ycoord+=event.clientY+truebody().scrollTop-Math.max(0,(20+currentimageheight+event.clientY-docheight)); else ycoord+=truebody().scrollTop+event.clientY;
  }



//if(xcoord+220>docwidth) xcoord=xcoord-itemWidth-25;

gettrailobj().left=xcoord+"px"
gettrailobj().top=ycoord+"px"

}
