document.write('');
// JavaScript Document
isIE=false;
var tempX = 0;
var tempY = 0;

var myWidth = 0, myHeight = 0;
window.onresize=resize
function bSize(){
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
	isIE=false;
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
	isIE=true;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth-20;
    myHeight = document.body.clientHeight;-20
	isIE=true;
  }
}
function setTableWH(tavola1,tavola2,tavola3){
	bSize();
	idi1=document.getElementById(tavola1);
	idi2=document.getElementById(tavola2);
	idi3=document.getElementById(tavola3);
	
	idit1=document.getElementById("tleft");
	idit2=document.getElementById("tcenter");
	idit3=document.getElementById("tright");
	
	idic1=document.getElementById("cleft");
	idic2=document.getElementById("ccenter");
	idic3=document.getElementById("cright");
	
	idib1=document.getElementById("bleft");
	idib2=document.getElementById("bcenter");
	idib3=document.getElementById("bright");
	
	h1=Math.round((myHeight-38)/2);
	h2=38;
	h3=myHeight-h1-h2;
	
	w1=Math.round((myWidth-760)/2);
	w2=760;
	w3=myWidth-w1-w2;
	
	idi1.height=h1;
	idi2.height=h2;
	idi3.height=h3;
	
	idit1.width=w1;
	idit2.width=w2;
	idit3.width=w3;
	
	idic1.width=w1;
	idic2.width=w2;
	idic3.width=w3;
	
	idib1.width=w1;
	idib2.width=w2;
	idib3.width=w3;
}

function resize(){
	setTableWH("alto","medio","basso")
}

function placeMouseLayer(layer){
	bSize();
	if (!isIE) document.captureEvents(Event.MOUSEMOVE)
	document.onmousemove = getMouseXY;
	idi=document.getElementById(layer);
	hideLayer(layer)
	idi.style.top=tempY-12;
	idi.style.left=tempX+5;
	showLayer(layer)
}

function hideLayer(layer){
	idi=document.getElementById(layer);
	idi.style.visibility="hidden"
}

function showLayer(layer){
	idi=document.getElementById(layer);
	idi.style.visibility="visible"
}

function getMouseXY(e) {
	if (isIE) { // grab the x-y pos.s if browser is IE
	tempX = event.clientX + document.body.scrollLeft;
	tempY = event.clientY + document.body.scrollTop;
	}
	else {  // grab the x-y pos.s if browser is NS
	tempX = e.pageX;
	tempY = e.pageY;
	}  
	if (tempX < 0){tempX = 0;}
	if (tempY < 0){tempY = 0;}  
	return true;
	}
