var ie=document.all
var ns=document.layers
var ns6=document.getElementById&&!document.all

function enlarge(which,e){

	if (ie||ns6){
		crossobj=document.getElementById? document.getElementById("showimage") : document.all.showimage
		textobj=document.getElementById? document.getElementById("showtext") : document.all.showtext
		if (crossobj.style.display=="block"){
			crossobj.style.display="none"
			textobj.style.display="block"
		}
		else {
//			crossobj.style.left=ns6? pageXOffset+e.clientX : document.body.scrollLeft+event.clientX
//			crossobj.style.top=ns6? pageYOffset+e.clientY : document.body.scrollTop+event.clientY
			crossobj.innerHTML='<div align=right id=close><span style="cursor: pointer"><a href="" onClick="closepreview(); return false;">Chiudi</span></div><img src="'+which+'"></a>'
			crossobj.style.display="block"
			textobj.style.display="none"
		}
		scroll(0,0)
		/*footerobj=document.getElementById? document.getElementById("footer") : document.all.footer
		footerobj.style.bottom=0
		*/
		
		return false
	}
	
/*
	else if (document.layers){
		if (document.showimage.display=="none"){
			document.showimage.document.write('<a href="#" onMouseover="drag_dropns(showimage)"><img src="'+which+'" border=0></a>')
			document.showimage.document.close()
			document.showimage.left=e.x
			document.showimage.top=e.y
			document.showimage.display="block"
		}
		else
			document.showimage.display="none"
		return false
	}
	*/
	
	else
		return true
}

function closepreview(){
	crossobj.style.display="none"
	textobj.style.display="block"
}