var wid, hei;
function getDim(){
	wid=document.body.clientWidth;
	hei=document.body.clientHeight;
	//alert(wid+" "+hei);
}
function riposiziona(id, w, h){
	getDim();
	document.getElementById(id).style.left=""+((wid - w)/2)+"px";
	document.getElementById(id).style.top=""+((hei - h)/2)+"px";
}