/***********************************************
* Image Thumbnail viewer- &copy; Dynamic Drive (www.dynamicdrive.com)
* Last updated Sept 26th, 03'. This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for full source code
* New version 2006: Izabela Kurkiewicz (iza@adres.pl)
***********************************************/

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 foto(which, position, imgwidth, imgheight){
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 : ietruebody().scrollLeft+event.clientX
var vertpos=ns6? pageYOffset : ietruebody().scrollTop
}
crossobj.style.left="10px"
crossobj.style.top=(vertpos+10)+"px"

crossobj.innerHTML='<table border="0" cellspacing="0" cellpadding="0" onClick="closepreview()" ><tr><td class="SdwTL"></td><td colspan="2" class="SdwT"></td><td class="SdwTR"></td></tr><tr><td rowspan="2" class="SdwL"></td><td colspan="2" class="whitebg01"><img id="image" src="'+which+'"></td><td rowspan="2" class="SdwR"></td></tr><tr><td class="whitebg02">&copy; E\'Xodja*PL</td><td class="whitebg03">Kliknij aby zamkn&#261;&#263; okno <b>×</b></td></tr><tr><td class="SdwBL"></td><td colspan="2" class="SdwB"></td><td class="SdwBR"></td></tr></table>'
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"
}

