
function Alto(tipo)
{
if (document.layers)
	HeightPagina=window.innerHeight; 
else if (document.all)
	HeightPagina=document.body.clientHeight;
else if(document.getElementById)
	HeightPagina=window.innerHeight; 
if (document.layers)
	WidthPagina=window.innerWidth; 
else if (document.all)
	WidthPagina=document.body.clientWidth;
else if(document.getElementById)
	WidthPagina=window.innerWidth; 
//Prova di impostazione
WidthSp = ((WidthPagina * 5) / 100);
HeightSp = ((HeightPagina * 8) / 100);
//WidthSp = HeightSp;

//alert("Altezza = " +HeightPagina);
//alert("Larghezza = " +WidthPagina);

HeightPagina = HeightPagina - (HeightSp * 2); 
WidthPagina = WidthPagina - (WidthSp * 2);
HeightPagina = HeightPagina - 55; 

LatoImg = HeightPagina / 6;
LatoImg = LatoImg + 2;
WidthMenu = 145;
WidthDiv = WidthPagina - WidthMenu - (LatoImg * 3);
//WidthDiv = LatoImg * 5.5;
//Fine prova


//Calcolo larghezza e altezza immagine per home page
WidthImage=HeightPagina / 6;
HeightImage=HeightPagina / 6;


//HeightPagina = HeightPagina - 32;
//WidthPagina = WidthPagina - 100;
/*HeightSp=((HeightPagina * 6) / 100);
WidthSp=((WidthPagina * 5) / 100);
HeightPagina = HeightPagina - ((HeightPagina * 20) / 100); 
WidthPagina = WidthPagina - ((WidthPagina * 10) / 100); 
WidthMenu=(WidthPagina / 9) * 2;
WidthDiv=(WidthPagina / 9) * 5;
WidthImg=(WidthPagina / 9) * 2;
WidthImg=WidthImg - 10;
HeightImg=(WidthImg / 3) * 6;
WidthImgSingola=(WidthImg / 3);
HeightPagina=HeightPagina - 10;
HeightImgSingola=(HeightPagina / 6);
LatoImg=HeightImgSingola;
if (WidthImgSingola > HeightImgSingola)  {
	LatoImg=HeightImgSingola;	
}
if (HeightImgSingola > WidthImgSingola)  {
	LatoImg=WidthImgSingola;	
}
*/

LeftDiv=WidthSp + WidthMenu - 40;
TopDiv=HeightSp;
	if (tipo == "img_singola")  {
		document.write('<table valign="top" border="0" cellpadding="0" cellspacing="0"><tr><td>')
		document.write('<img name="img100" src="/img/barra.gif" width="'+LatoImg+'" height="'+LatoImg+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img101" src="/img/img1.jpg" width="'+LatoImg+'" height="'+LatoImg+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img102" src="/img/img2.jpg" width="'+LatoImg+'" height="'+LatoImg+'" alt="" >');
		document.write('</td></tr>');
		document.write('<tr><td>');
		document.write('<img name="img200" src="/img/barra.gif" width="'+LatoImg+'" height="'+LatoImg+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img201" src="/img/img3.jpg" width="'+LatoImg+'" height="'+LatoImg+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img202" src="/img/img4.jpg" width="'+LatoImg+'" height="'+LatoImg+'" alt="" >');
		document.write('</td></tr>');
		document.write('<tr><td>');
		document.write('<img name="img300" src="/img/barra.gif" width="'+LatoImg+'" height="'+LatoImg+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img301" src="/img/img5.jpg" width="'+LatoImg+'" height="'+LatoImg+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img302" src="/img/img6.jpg" width="'+LatoImg+'" height="'+LatoImg+'" alt="" >');
		document.write('</td></tr>');
		document.write('<tr><td>');
		document.write('<img name="img400" src="/img/barra.gif" width="'+LatoImg+'" height="'+LatoImg+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img401" src="/img/img7.jpg" width="'+LatoImg+'" height="'+LatoImg+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img402" src="/img/img8.jpg" width="'+LatoImg+'" height="'+LatoImg+'" alt="" >');
		document.write('</td></tr>');
		document.write('<tr><td>');
		document.write('<img name="img500" src="/img/barra.gif" width="'+LatoImg+'" height="'+LatoImg+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img501" src="/img/img9.jpg" width="'+LatoImg+'" height="'+LatoImg+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img502" src="/img/img10.jpg" width="'+LatoImg+'" height="'+LatoImg+'" alt="" >');
		document.write('</td></tr>');
		document.write('<tr><td>');
		document.write('<img name="img600" src="/img/barra.gif" width="'+LatoImg+'" height="'+LatoImg+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img601" src="/img/img11.jpg" width="'+LatoImg+'" height="'+LatoImg+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img602" src="/img/img12.jpg" width="'+LatoImg+'" height="'+LatoImg+'" alt="" >');
		document.write('</td></tr></table>');
		}
	if (tipo == "main")   {
		document.write('<div id="scrolldiv" style="top:'+TopDiv+'; left:'+LeftDiv+'; width:'+WidthDiv+'; height:'+HeightPagina+'; background:#FFFFFF " >');
		}
	if (tipo == "td")  {
		document.write('<td width="'+WidthMenu+'" height="'+HeightPagina+'" valign="top">');
		}
	if (tipo == "sph")  {
		document.write('<img src="/img/sp.gif" height="'+HeightSp+'" alt="" >');
		}
	if (tipo == "spw")  {
		document.write('<img src="/img/sp.gif" width="'+WidthSp+'" alt="" >');
		}
	if (tipo == "wiDiv")  {
		document.write('<img src="/img/sp.gif" width="'+(WidthPagina - 10)+'" height="1" alt="" >');
		}
	if (tipo=="parziale")  {
		document.write('<table border="0" cellpadding="0" cellspacing="0">');	
		document.write('<tr><td>');
		document.write('<img name="img100" src="/img/barra.gif" width="'+WidthImage+'" height="'+HeightImage+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img101" src="/img/img2.jpg" width="'+WidthImage+'" height="'+HeightImage+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img102" src="/img/img3.jpg" width="'+WidthImage+'" height="'+HeightImage+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img103" src="/img/img4.jpg" width="'+WidthImage+'" height="'+HeightImage+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img104" src="/img/img5.jpg" width="'+WidthImage+'" height="'+HeightImage+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img105" src="/img/img1.jpg" width="'+WidthImage+'" height="'+HeightImage+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img106" src="/img/img6.jpg" width="'+WidthImage+'" height="'+HeightImage+'" alt="" >');
		document.write('</td></tr>');	
		document.write('<tr><td>');
		document.write('<img name="img200" src="/img/barra.gif" width="'+WidthImage+'" height="'+HeightImage+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img201" src="/img/img7.jpg" width="'+WidthImage+'" height="'+HeightImage+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img202" src="/img/img8.jpg" width="'+WidthImage+'" height="'+HeightImage+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img203" src="/img/img9.jpg" width="'+WidthImage+'" height="'+HeightImage+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img204" src="/img/img10.jpg" width="'+WidthImage+'" height="'+HeightImage+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img205" src="/img/img11.jpg" width="'+WidthImage+'" height="'+HeightImage+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img206" src="/img/img12.jpg" width="'+WidthImage+'" height="'+HeightImage+'" alt="" >');
		document.write('</td></tr>');	
		document.write('<tr><td>');
		document.write('<img name="img300" src="/img/barra.gif" width="'+WidthImage+'" height="'+HeightImage+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img301" src="/img/img13.jpg" width="'+WidthImage+'" height="'+HeightImage+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img302" src="/img/img14.jpg" width="'+WidthImage+'" height="'+HeightImage+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img303" src="/img/img15.jpg" width="'+WidthImage+'" height="'+HeightImage+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img304" src="/img/img16.jpg" width="'+WidthImage+'" height="'+HeightImage+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img305" src="/img/img17.jpg" width="'+WidthImage+'" height="'+HeightImage+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img306" src="/img/img18.jpg" width="'+WidthImage+'" height="'+HeightImage+'" alt="" >');
		document.write('</td></tr>');	
		document.write('<tr><td>');
		document.write('<img name="img400" src="/img/barra.gif" width="'+WidthImage+'" height="'+HeightImage+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img401" src="/img/img19.jpg" width="'+WidthImage+'" height="'+HeightImage+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img402" src="/img/img20.jpg" width="'+WidthImage+'" height="'+HeightImage+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img403" src="/img/img21.jpg" width="'+WidthImage+'" height="'+HeightImage+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img404" src="/img/img22.jpg" width="'+WidthImage+'" height="'+HeightImage+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img405" src="/img/img23.jpg" width="'+WidthImage+'" height="'+HeightImage+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img406" src="/img/img24.jpg" width="'+WidthImage+'" height="'+HeightImage+'" alt="" >');
		document.write('</td></tr>');	
		document.write('<tr><td>');
		document.write('<img name="img500" src="/img/barra.gif" width="'+WidthImage+'" height="'+HeightImage+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img501" src="/img/img25.jpg" width="'+WidthImage+'" height="'+HeightImage+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img502" src="/img/img26.jpg" width="'+WidthImage+'" height="'+HeightImage+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img503" src="/img/img27.jpg" width="'+WidthImage+'" height="'+HeightImage+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img504" src="/img/img28.jpg" width="'+WidthImage+'" height="'+HeightImage+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img505" src="/img/img29.jpg" width="'+WidthImage+'" height="'+HeightImage+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img506" src="/img/img30.jpg" width="'+WidthImage+'" height="'+HeightImage+'" alt="" >');
		document.write('</td></tr>');	
		document.write('<tr><td>');
		document.write('<img name="img600" src="/img/barra.gif" width="'+WidthImage+'" height="'+HeightImage+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img601" src="/img/img31.jpg" width="'+WidthImage+'" height="'+HeightImage+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img602" src="/img/img32.jpg" width="'+WidthImage+'" height="'+HeightImage+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img603" src="/img/img33.jpg" width="'+WidthImage+'" height="'+HeightImage+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img604" src="/img/img34.jpg" width="'+WidthImage+'" height="'+HeightImage+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img605" src="/img/img35.jpg" width="'+WidthImage+'" height="'+HeightImage+'" alt="" >');
		document.write('</td><td>');
		document.write('<img name="img606" src="/img/img11.jpg" width="'+WidthImage+'" height="'+HeightImage+'" alt="" >');
		document.write('</td></tr>');	
		document.write('</table>');
		}
}
