
function popImage(imageURL,imageTitle){
	var ie=document.all;
	var ns6=document.getElementById && !document.all;
	if (ns6) { var opt='scrollbars=no,width=500,height=400,left=200,top=140';}
	else if (ie) {var opt='scrollbars=no,width=150,height=100,left=200,top=140';}
	imgWin=window.open('about:blank','',opt);
	with (imgWin.document){
		//  alert ('ci siamo url:'+imageURL+" su:"+imageTitle);
		writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');
		writeln('<sc'+'ript>');
		writeln('var ie=document.all;var ns6=document.getElementById && !document.all;');
		writeln('function reSizeToImage(){');
		writeln('if (ie) {window.resizeTo(100,100);w=document.images[0].width;h=document.images[0].height;width=100-(document.body.clientWidth-w);height=100-(document.body.clientHeight-h);window.resizeTo(width,height);}');
		writeln('else if (ns6) {w=document.images["George"].width;h=document.images["George"].height;window.innerWidth=w;window.innerHeight=h;}');
		writeln('w=Math.min(w,screen.width-60);h=Math.min(h,screen.height-60);window.moveTo((screen.width-w)/2,(screen.height-h)/2);}');
		writeln('function doTitle(){document.title="'+imageTitle+'";}');
		writeln('</sc'+'ript>');
		writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
		writeln('<img name="George" src="'+imageURL+'" style="display:block"></body></html>');
		close();
	}
}

function linguetta(NomeOggetto,Nome,Max,Min)
{
	this.Max=Max;
	this.NomeOggetto=NomeOggetto;
	this.Min=Min;
	this.Nome=Nome;
	this.Obj=null;
	this.OLDOnMouse=document.onmousemove;
	this.OLDTimer=null;
	this.posizione=0;
	this.MouY = function func_MouY(event)
	{
		this.test=null;
		if (document.all) this.test=window.event.clientY + document.documentElement.scrollTop + document.body.scrollTop;
		else this.test=event.clientY + window.scrollY;
		return this.test;
	}
	this.MouX = function func_MouX(event)
	{
		this.test=null;
		if (document.all) this.test=window.event.clientX + document.documentElement.scrollLeft + document.body.scrollLeft;
		else this.test=event.clientX + window.scrollX;
		return this.test;
	}
	this.ClearTime = function func_Clear() { if (this.OLDTimer) clearTimeout(this.OLDTimer); this.OLDTimer=null; }
	this.spot = function func_spot(event)
	{

		if (this.NomeOggetto) LinguettaAttiva=this; //verifica se chiamato in suboggetto allora ridefinisce LinguettaAttiva
		LAtt=LinguettaAttiva;//LinguettaAttiva;
		LAtt.ClearTime();
		Obj=document.getElementById(LAtt.Nome);
		Obj.style.width=LAtt.Max+'px';
		Obj.style.right='0px';
		LAtt.test=false;
		LAtt.test=((document.body.clientWidth-LAtt.MouX(event))>Obj.offsetWidth+5)|(LAtt.MouY(event)>Obj.offsetHeight+5);
		if (document.onmousemove!=spot) { LAtt.OLDOnMouse=document.onmousemove; document.onmousemove=spot; }
		if (LAtt.test==true) // uscita
		{
			document.onmousemove=LAtt.OLDOnMouse;
			LAtt.Posizione=LAtt.Max;
			LAtt.riponi ();
		}
	}
	this.riponi = function func_riponi()
	{
		Obj=document.getElementById(this.Nome).style;
		this.test=(this.Posizione-this.Min)/4;
		this.Posizione=this.Posizione-(this.test>2?this.test:2);
		if (this.Posizione>this.Min) this.OLDTimer=setTimeout(this.NomeOggetto+".riponi()",10);
		else {this.Posizione=this.Min; this.ClearTime();}
		Obj.width=this.Posizione+'px'; Obj.right='0px';
	}
	function spot(e) {LAtt.spot(e);}
	var LinguettaAttiva=null;
}
