if (nt40)
	{largFinestra=window.innerWidth-16;
	altFinestra=window.innerHeight;}			
if (ie40)
	{largFinestra=document.body.offsetWidth-20;
	altFinestra= document.body.offsetHeight;}
largPannello=107;
alternaIti=false;
alternaGal=false;
largPagina=649;

if (largFinestra>=largPagina)	
	{
	posSinPannello1 =((largFinestra-largPannello)/2)-239;
	posSinPannello2 =((largFinestra-largPannello)/2)+235;
	}
	else
	{
	posSinPannello1 =((largPagina-largPannello)/2)-239;
	posSinPannello2 =((largPagina-largPannello)/2)+235;
	}
function scorreBlocco()
{								
if (nt40) {	puntatore=document.layers["bloccoDiv"];
		puntatore.left=posSinPannello;
		puntatore.top+=val;
		divtop-=val;	
		puntatore.clip.top=divtop;							puntatore.visibility="show";
		if (sw==1) 
		{eval('document.divtab.document.images["ingSIN"].src =ingS1.src');
		eval('document.divtab.document.images["ingDES"].src =ingD1.src');
		sw=0;
		}
		else	 
		{eval('document.divtab.document.images["ingSIN"].src =ingS.src');
		eval('document.divtab.document.images["ingDES"].src =ingD.src');
		sw=1;
		}
		if (ctr<=15)	
		{ctr+=1;
		setTimeout("scorreBlocco()",50);
		}					
		else
		{eval('document.divtab.document.images["ingSIN"].src = ingS.src');
		eval('document.divtab.document.images["ingDES"].src = ingD.src');
		ctr=0;
			if (val<=0) val+=10;
			else	    val-=10; 
		}
	  }
if (ie40) {	puntatore=document.all["bloccoDiv"].style;
	   	puntatore.posLeft=posSinPannello;
		puntatore.posHeight-=val;	
		puntatore.posTop+=val;
		divtop-=val;			
		puntatore.clip= 'rect ('+divtop+'px 105px 98px 0px)';	
		puntatore.visibility="visible";
		if (sw==1) 
		{document.images['ingSIN'].src = eval('ingS1'+'.src');
		document.images['ingDES'].src = eval('ingD1'+'.src');	
		sw=0;
		}
		else	 
		{document.images['ingSIN'].src = eval('ingS'+'.src');
		document.images['ingDES'].src = eval('ingD'+'.src');
		sw=1;
		}
		if (ctr<=15)	
			{ctr+=1;
			setTimeout("scorreBlocco()",50);
			}						
		else
			{document.images['ingSIN'].src = eval('ingS'+'.src');
			document.images['ingDES'].src = eval('ingD'+'.src');
			ctr=0;
			if (val<=0) val+=10;
			else	    val-=10; 
			}
	}
}

function cambiaIti(div, nomeImg, oggImg)
{
if (alternaIti == true)
nascondiIti(div, nomeImg, oggImg)
else
visualizzaIti(div, nomeImg, oggImg)
}

function visualizzaIti(div, nomeImg, oggImg)
{
if (alternaGal==true)
	{alternaGal=false;
	 if (ie40)
	 {puntatore=document.all["bloccoDiv2"].style;
	 puntatore.visibility="hidden";
	 }
	 if (nt40)
	 {puntatore=document.layers["bloccoDiv2"];
	 puntatore.visibility="hide";
	 }
	}

alternaIti=true;
if (nt40 && div!=null) 
	{eval('document.'+div+'.document.images["'+nomeImg+'"].src ='+oggImg+'.src');
	 puntatore=document.layers["bloccoDiv1"];
	 puntatore.left=posSinPannello1;
	 puntatore.visibility="show";

	}
   else
	{
	 document.images[nomeImg].src = eval(oggImg+'.src');
	 puntatore=document.all["bloccoDiv1"].style;
	 puntatore.posLeft=posSinPannello1;
	 puntatore.visibility="visible";
	}

}
function nascondiIti(div, nomeImg, oggImg)
{	
alternaIti = false;
if (nt40 && div!=null) 
	 {eval('document.'+div+'.document.images["'+nomeImg+'"].src ='+oggImg+'.src');
	 puntatore=document.layers["bloccoDiv1"];
 	 puntatore.posLeft=posSinPannello1;
	 puntatore.visibility="hide";
	 }
	else
 	 {document.images[nomeImg].src = eval(oggImg+'.src');
	 puntatore=document.all["bloccoDiv1"].style;
 	 puntatore.posLeft=posSinPannello1;
	 puntatore.visibility="hidden";
	 }
		
}

function cambiaGal(div, nomeImg, oggImg)
{	
if (alternaGal == true)
nascondiGal(div, nomeImg, oggImg)
else
visualizzaGal(div, nomeImg, oggImg)
}

function visualizzaGal(div, nomeImg, oggImg)
{
if (alternaIti==true)
	{alternaIti=false;
	 if (ie40)
	 {
	 puntatore=document.all["bloccoDiv1"].style;
	 puntatore.visibility="hidden";
	 }
	 if (nt40)
	 {puntatore=document.layers["bloccoDiv1"];
	 puntatore.visibility="hide";
	 }
	}
alternaGal=true;
if (nt40 && div!=null) 
	{eval('document.'+div+'.document.images["'+nomeImg+'"].src ='+oggImg+'.src');
	 puntatore=document.layers["bloccoDiv2"];
	 puntatore.left=posSinPannello2;
	 puntatore.visibility="show";
	}
if (ie40)
	{document.images[nomeImg].src = eval(oggImg+'.src');
	 puntatore=document.all["bloccoDiv2"].style;
	 puntatore.posLeft=posSinPannello2;
	 puntatore.visibility="visible";
	}
	
}
function nascondiGal(div, nomeImg, oggImg)
{	
alternaGal = false;
if (nt40 && div!=null) 
	{eval('document.'+div+'.document.images["'+nomeImg+'"].src ='+oggImg+'.src');
	 puntatore=document.layers["bloccoDiv2"];
 	 puntatore.left=posSinPannello2;
	 puntatore.visibility="hide";
	}
if(ie40)
 	{document.images[nomeImg].src = eval(oggImg+'.src');
	 puntatore=document.all["bloccoDiv2"].style;
 	 puntatore.posLeft=posSinPannello2;
	 puntatore.visibility="hidden";
	}
} 

