/***********************************************
* Image Thumbnail viewer- © 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
***********************************************/

var ie=document.all
var dom=document.getElementById&&!document.all

function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat" && !window.opera)? document.documentElement : document.body
}

function enlarge(which, e, position, imgwidth, imgheight){
if (ie||dom)
{
	crossobj=document.getElementById? document.getElementById("showimage") : document.all.showimage

	var horzpos=dom? pageXOffset+e.clientX-100 : ietruebody().scrollLeft+event.clientX-100
	var vertpos=dom? pageYOffset+e.clientY : ietruebody().scrollTop+event.clientY
	
	
	//var horzpos=90
	//var vertpos=50

	if (horzpos<0) {horzpos=100; vertpos=100;}
	
	
	crossobj.style.left=horzpos+"px"
	crossobj.style.top=vertpos+"px"

	crossobj.innerHTML='<div onClick="closepreview()" title="Ebene schliessen" tabindex="1"><img src="'+which+'" /></div>'
	crossobj.style.visibility="visible"
	return false
}else return true //if NOT IE 4+ or NS 6+, simply display image in full browser window
}

function closepreview(){
crossobj.style.visibility="hidden"
}
