// Layout e modifica Script CSS

// Script di modifica del margine sinistro


	function sinistro()
	{
		var foglio_margine;
		var schermo;
		var mar_sx;
		schermo = cookie_read("risoluzione_largh");
		mar_sx=cookie_read("margine_sx");
		
		if(document.styleSheets[0].cssRules)
			foglio_margine=document.styleSheets[0].cssRules;
			else if(document.styleSheets[0].rules)
			foglio_margine=document.styleSheets[0].rules;		
		
		switch(schermo)
		{
			case "1920":
			foglio_margine[0].style.left=mar_sx;
			foglio_margine[3].style.visibility="visible";
			foglio_margine[4].style.visibility="visible";
			break;
			case "1600":
			foglio_margine[0].style.left=mar_sx;
			foglio_margine[3].style.visibility="visible";
			foglio_margine[4].style.visibility="visible";
			break;
			case "1280":
			foglio_margine[0].style.left=mar_sx;
			foglio_margine[3].style.visibility="visible";
			foglio_margine[4].style.visibility="visible";
			break;
			case "1024":
			foglio_margine[0].style.left=mar_sx;
			break;
			case "800":
			foglio_margine[0].style.left=mar_sx;
			break;
			default:
			foglio_margine[0].style.left=mar_sx;
			break;
		}
		return;
	}
	
	function risoluzione()
	{
		var larghezza;
		var lunghezza;
		var marg_sx;
		
		
		larghezza=screen.width;
		lunghezza=screen.height;
		marg_sx=Math.round((larghezza-950)/2);
		
		cookie_write("risoluzione_largh",larghezza,0);
		cookie_write("risoluzione_lungh",lunghezza,0);
		cookie_write("margine_sx",marg_sx,0);
		return;
	}
