var tabela
var celija
var ie=document.all
var ns6=document.getElementById&&!document.all

function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat" && !window.opera)? document.documentElement : document.body
}


function enlargehr(which, e, position, imgwidth, imgheight, text, kako, park, startp, endp, opis){
tabela=imgwidth-20
celija=tabela-345
if (ie||ns6){
crossobj=document.getElementById? document.getElementById("showimage") : document.all.showimage
if (position=="center"){
pgyoffset=ns6? parseInt(pageYOffset) : parseInt(ietruebody().scrollTop)
horzpos=ns6? pageXOffset+window.innerWidth/2-imgwidth/2 : ietruebody().scrollLeft+ietruebody().clientWidth/2-imgwidth/2
vertpos=ns6? pgyoffset+window.innerHeight/2-imgheight/2 : pgyoffset+ietruebody().clientHeight/2-imgheight/2
if (window.opera && window.innerHeight) //compensate for Opera toolbar
vertpos=pgyoffset+window.innerHeight/2-imgheight/2
vertpos=Math.max(pgyoffset, vertpos)
}
else{
var horzpos=ns6? pageXOffset+e.clientX : ietruebody().scrollLeft+event.clientX
var vertpos=ns6? pageYOffset+e.clientY : ietruebody().scrollTop+event.clientY
}
crossobj.style.left=horzpos+"px"
crossobj.style.top=vertpos+"px"

crossobj.innerHTML='<div align="right" id="dragbar"><span id="closetext" onClick="closepreview()">'+text+'&nbsp;&nbsp;&nbsp;<img src="close.gif"></span> </div><img src="'+which+'" onClick="closepreview()"><br><center><table border="1" cellpadding="0" style="border-collapse: collapse" width="'+imgwidth+'" id="table1" background="images/papir.gif"><tr>      <td valign="top" align="justify">    <p style="text-indent: -12px; margin-left: 24px; margin-top: 3px; margin-bottom: 3px; margin-right:6px"><font face="Verdana" style="font-size: 9pt"  color="#3399FF"><i>Kako doći: </i></font>  <span align="left">  <font face="Verdana" style="font-size: 9pt" color="#333333">'+kako+'</font></span><p style="text-indent: -12px; margin-left: 24px; margin-top: 3px; margin-bottom: 3px; margin-right:6px"><font face="Verdana" style="font-size: 9pt"  color="#3399FF"><i>Gdje parkirati: </i></font>        <font face="Verdana" style="font-size: 9pt" color="#333333">'+park+'</font></td>            <td valign="top" align="justify">    <p style="text-indent: -12px; margin-left: 24px; margin-top: 3px; margin-bottom: 3px; margin-right:6px"><font face="Verdana" style="font-size: 9pt"  color="#3399FF"><i>Polazna točka: </i></font>        <font face="Verdana" style="font-size: 9pt" color="#333333">'+startp+'</font><p style="text-indent: -12px; margin-left: 24px; margin-top: 3px; margin-bottom: 3px; margin-right:6px"><font face="Verdana" style="font-size: 9pt"  color="#3399FF"><i>Krajnja točka: </i></font>        <font face="Verdana" style="font-size: 9pt" color="#333333">'+endp+'</font></td></tr><tr>            <td colspan="2" valign="top">                <p style="text-indent: -12px; margin-left: 24px; margin-top: 3px; margin-bottom: 3px; margin-right:6px" align="justify"><font face="Verdana" style="font-size: 9pt"  color="#FF9933"><i>OPIS: </i></font>        <font face="Verdana" style="font-size: 9pt" color="#333333">'+opis+'</font></td></tr></table></center></div>'
crossobj.style.visibility="visible"
return false
}
else //if NOT IE 4+ or NS 6+, simply display image in full browser window
return true
}


function enlargeen(which, e, position, imgwidth, imgheight, text, kako, park, startp, endp, opis){
tabela=imgwidth-20
celija=tabela-345
if (ie||ns6){
crossobj=document.getElementById? document.getElementById("showimage") : document.all.showimage
if (position=="center"){
pgyoffset=ns6? parseInt(pageYOffset) : parseInt(ietruebody().scrollTop)
horzpos=ns6? pageXOffset+window.innerWidth/2-imgwidth/2 : ietruebody().scrollLeft+ietruebody().clientWidth/2-imgwidth/2
vertpos=ns6? pgyoffset+window.innerHeight/2-imgheight/2 : pgyoffset+ietruebody().clientHeight/2-imgheight/2
if (window.opera && window.innerHeight) //compensate for Opera toolbar
vertpos=pgyoffset+window.innerHeight/2-imgheight/2
vertpos=Math.max(pgyoffset, vertpos)
}
else{
var horzpos=ns6? pageXOffset+e.clientX : ietruebody().scrollLeft+event.clientX
var vertpos=ns6? pageYOffset+e.clientY : ietruebody().scrollTop+event.clientY
}
crossobj.style.left=horzpos+"px"
crossobj.style.top=vertpos+"px"

crossobj.innerHTML='<div align="right" id="dragbar"><span id="closetext" onClick="closepreview()">'+text+'&nbsp;&nbsp;&nbsp;<img src="close.gif"></span> </div><img src="'+which+'" onClick="closepreview()"><br><center><table border="1" cellpadding="0" style="border-collapse: collapse" width="'+imgwidth+'" id="table1" background="images/papir.gif"><tr>      <td valign="top" align="justify">    <p style="text-indent: -12px; margin-left: 24px; margin-top: 3px; margin-bottom: 3px; margin-right:6px"><font face="Verdana" style="font-size: 9pt"  color="#3399FF"><i>How to get there: </i></font>  <span align="left">  <font face="Verdana" style="font-size: 9pt" color="#333333">'+kako+'</font></span><p style="text-indent: -12px; margin-left: 24px; margin-top: 3px; margin-bottom: 3px; margin-right:6px"><font face="Verdana" style="font-size: 9pt"  color="#3399FF"><i>Where to park: </i></font>        <font face="Verdana" style="font-size: 9pt" color="#333333">'+park+'</font></td>            <td valign="top" align="justify">    <p style="text-indent: -12px; margin-left: 24px; margin-top: 3px; margin-bottom: 3px; margin-right:6px"><font face="Verdana" style="font-size: 9pt"  color="#3399FF"><i>Start Point: </i></font>        <font face="Verdana" style="font-size: 9pt" color="#333333">'+startp+'</font><p style="text-indent: -12px; margin-left: 24px; margin-top: 3px; margin-bottom: 3px; margin-right:6px"><font face="Verdana" style="font-size: 9pt"  color="#3399FF"><i>End point: </i></font>        <font face="Verdana" style="font-size: 9pt" color="#333333">'+endp+'</font></td></tr><tr>            <td colspan="2" valign="top">                <p style="text-indent: -12px; margin-left: 24px; margin-top: 3px; margin-bottom: 3px; margin-right:6px" align="justify"><font face="Verdana" style="font-size: 9pt"  color="#FF9933"><i> DESCRIPTION: </i></font>        <font face="Verdana" style="font-size: 9pt" color="#333333">'+opis+'</font></td></tr></table></center></div>'
crossobj.style.visibility="visible"
return false
}
else //if NOT IE 4+ or NS 6+, simply display image in full browser window
return true
}



function enlarge(which, e, position, imgwidth, imgheight, text){
if (ie||ns6){
crossobj=document.getElementById? document.getElementById("showimage") : document.all.showimage
if (position=="center"){
pgyoffset=ns6? parseInt(pageYOffset) : parseInt(ietruebody().scrollTop)
horzpos=ns6? pageXOffset+window.innerWidth/2-imgwidth/2 : ietruebody().scrollLeft+ietruebody().clientWidth/2-imgwidth/2
vertpos=ns6? pgyoffset+window.innerHeight/2-imgheight/2 : pgyoffset+ietruebody().clientHeight/2-imgheight/2
if (window.opera && window.innerHeight) //compensate for Opera toolbar
vertpos=pgyoffset+window.innerHeight/2-imgheight/2
vertpos=Math.max(pgyoffset, vertpos)
}
else{
var horzpos=ns6? pageXOffset+e.clientX : ietruebody().scrollLeft+event.clientX
var vertpos=ns6? pageYOffset+e.clientY : ietruebody().scrollTop+event.clientY
}
crossobj.style.left=horzpos+"px"
crossobj.style.top=vertpos+"px"

crossobj.innerHTML='<div align="right" id="dragbar"><span id="closetext" onClick="closepreview()">'+text+'&nbsp;&nbsp;&nbsp;<img src="close.gif"></span> </div><img src="'+which+'" onClick="closepreview()"></div>'
crossobj.style.visibility="visible"
return false
}
else //if NOT IE 4+ or NS 6+, simply display image in full browser window
return true
}


function mediaplayer(which, e, position, imgwidth, imgheight, text){


if (ie||ns6){
crossobj=document.getElementById? document.getElementById("showimage") : document.all.showimage
if (position=="center"){
pgyoffset=ns6? parseInt(pageYOffset) : parseInt(ietruebody().scrollTop)
horzpos=ns6? pageXOffset+window.innerWidth/2-imgwidth/2 : ietruebody().scrollLeft+ietruebody().clientWidth/2-imgwidth/2
vertpos=ns6? pgyoffset+window.innerHeight/2-imgheight/2 : pgyoffset+ietruebody().clientHeight/2-imgheight/2
if (window.opera && window.innerHeight) //compensate for Opera toolbar
vertpos=pgyoffset+window.innerHeight/2-imgheight/2
vertpos=Math.max(pgyoffset, vertpos)
}
else{
var horzpos=ns6? pageXOffset+e.clientX : ietruebody().scrollLeft+event.clientX
var vertpos=ns6? pageYOffset+e.clientY : ietruebody().scrollTop+event.clientY
}
crossobj.style.left=horzpos+"px"
crossobj.style.top=vertpos+"px"

crossobj.innerHTML='<div align="right" style="width:'+imgwidth+'px" id="dragbar"><table background="title.gif" border="0" cellpadding="0" style="border-collapse: collapse"><tr><td><p id="closetext">&nbsp;&nbsp;'+text+'&nbsp;&nbsp;</p></td><td width="38px"><img alt="close" align="right" border="0" src="close.gif" width="14" height="14" onClick="closepreview()"></td>  </tr></table><div style="border: 2px inset #00BB33; padding: 0"><object classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" id="WindowsMediaPlayer1" width="320" height="304" id="movie" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"><param name="URL" value="'+which+'"><param name="rate" value="1"><param name="balance" value="0"><param name="currentPosition" value="0"><param name="defaultFrame" value> <param name="playCount" value="1"><param name="autoStart" value="-1"> <param name="currentMarker" value="0"><param name="invokeURLs" value="-1"><param name="baseURL" value><param name="volume" value="50"><param name="mute" value="0"><param name="uiMode" value="full"><param name="stretchToFit" value="-1"> <param name="windowlessVideo" value="0"> <param name="enabled" value="-1"> <param name="enableContextMenu" value="0"> <param name="fullScreen" value="0"> <param name="SAMIStyle" value> <param name="SAMILang" value> <param name="SAMIFilename" value> <param name="captioningID" value> <param name="enableErrorDialogs" value="0"> <embed type="application/x-mplayer2" width="320" height="304"pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" filename="'+which+'" autostart="true" showcontrols="false" autosize="false" displaysize="0" src="'+which+'" name="video"> </embed></object></div><script type="text/javascript" src="fixit.js"></script></div>'
crossobj.style.visibility="visible"
return false
}
else //if NOT IE 4+ or NS 6+, simply display image in full browser window
return true
}





function closepreview(){
crossobj.style.visibility="hidden"
}

function drag_drop(e){
if (ie&&dragapproved){
crossobj.style.left=tempx+event.clientX-offsetx+"px"
crossobj.style.top=tempy+event.clientY-offsety+"px"
}
else if (ns6&&dragapproved){
crossobj.style.left=tempx+e.clientX-offsetx+"px"
crossobj.style.top=tempy+e.clientY-offsety+"px"
}
return false
}

function initializedrag(e){
if (ie&&event.srcElement.id=="dragbar"||ns6&&e.target.id=="dragbar"){
offsetx=ie? event.clientX : e.clientX
offsety=ie? event.clientY : e.clientY

tempx=parseInt(crossobj.style.left)
tempy=parseInt(crossobj.style.top)

dragapproved=true
document.onmousemove=drag_drop
}
}

document.onmousedown=initializedrag
document.onmouseup=new Function("dragapproved=false")


