function rH(){
	return (window.innerHeight)?window.innerHeight:
		(document.documentElement.clientHeight)?document.documentElement.clientHeight:
		(document.body.clientHeight)?document.body.clientHeight:0;	
}

function rW(){
	return (window.innerWidth)?window.innerWidth:
		(document.documentElement.clientWidth)?document.documentElement.clientWidth:
		(document.body.clientWidth)?document.body.clientWidth:0;
}


function riposiziona(arg){
		var bro=navigator.userAgent;
		var hCl, hei;
		var minH=600;
		if(bro.indexOf("MSIE")>=0){
			hCl = document.documentElement.clientHeight;
		}
		//if(bro.indexOf("Mozilla")>=0 || bro.indexOf("Opera")>=0){
		else{
			hCl=window.innerHeight;
		}
		
		if(hCl<minH){
			hei=minH;
		}
		else{
			hei=hCl;
		}

		document.getElementById("corpo").style.height=""+minH+"px";
		var el=document.getElementById(arg);
		el.style.top=Math.round((hei - 600)/2)+'px';
		el.style.left=Math.round((rW() - 800)/2)+'px';
}


function ApriMenu(i)
{
	document.getElementById('SM'+i).style.display="";
}
function ChiudiMenu(i)
{
    document.getElementById("SM" + i).style.display = "none";
}