// JavaScript Document
function increase_id(id,width,height,new_width,new_height)
{
theObj = document.getElementById(id);	
	if(theObj.style.width==width && theObj.style.height==height)
	{
	theObj.style.width=new_width + 'px';
	theObj.style.height=new_height + 'px';
	}
	else 
	{
	theObj.style.width=width + 'px';
	theObj.style.height=height + 'px';	
	}
}
function openFoto(img) {
	foto1= new Image();
	foto1.src=(img);
	Controlla(img);
}

function Controlla(img) {
	if ((foto1.width!=0)&&(foto1.height!=0)) {
		ViewFoto(img);
	} else {
		funzione="Controlla('"+img+"')";
		intervallo=setTimeout(funzione,20);
	}
}

function ViewFoto(img) {
	largh=foto1.width+20;
	altez=foto1.height+20;
	yPos = ((screen.height / 2) - (parseInt(altez) / 2));
	xPos = ((screen.width / 2) - (parseInt(largh) / 2));
	stringa="width="+largh+",height="+altez+",top="+yPos+",left="+ xPos;
	finestra=window.open(img,"",stringa);
}

function show(obj) {
var theObj = document.getElementById(obj);
if (theObj.style.display =='none')
theObj.style.display ='block';
else 
theObj.style.display ='none';
}