// JavaScript Document
function getWindowSize()
{
if (window.innerWidth)
	theWidth=window.innerWidth;
else if (document.documentElement && document.documentElement.clientWidth)
	theWidth=document.documentElement.clientWidth;
else if (document.body)
	theWidth=document.body.clientWidth;

if (window.innerHeight)
	theHeight=window.innerHeight;
else if (document.documentElement && document.documentElement.clientHeight)
	theHeight=document.documentElement.clientHeight;
else if (document.body)
	theHeight=document.body.clientHeight;

//alert (theWidth+" "+theHeight );
	body= document.getElementById('corpo');
	grandezza = Math.round((theWidth+800)/20);
	if (grandezza>100) grandezza=100;
//	grandezza='cial';
	body.style.fontSize= grandezza+"%";
	index30=document.getElementById('index1');
	index20=document.getElementById('index2');
	scorre=document.getElementById('scorre');
	altezza1= Math.round((theHeight-550)/4);
	if (altezza1<10) altezza1=10;
	altezza2= altezza1;
	altezzaprod=Math.round((theHeight-750)/4);
		if (altezzaprod<0) altezzaprod=0;

	prodotti=document.getElementById('prodotti');
	if (prodotti!=null){ prodotti.style.top=(240+altezzaprod*2)+'px';}
	//altezza1= altezza1*5;	
	if (index30!=null)
	{
		index30.style.paddingTop=altezza2+'px';
		index30.style.marginBottom=altezza1+'px';
		index20.style.paddingTop=altezza1+'px';
		index20.style.marginBottom=altezza2+'px';

		larghezza1= Math.round((theWidth-1224)/2);
		if (larghezza1<0) larghezza1=0;
		if (larghezza1>30) larghezza1=30;
		index30.style.marginLeft=larghezza1+'px';
		index30.style.marginRight=larghezza1+'px';
		index20.style.marginLeft=larghezza1+'px';
		index20.style.marginRight=larghezza1+'px';
		scorre.style.marginLeft=larghezza1+'px';
		scorre.style.marginRight=larghezza1+'px';
	}
	
//	body.style.fontSize= grandezza+"%";

return grandezza;
}

