// JavaScript Document
//////////////////
//////colora le celle
///////////////////
function colora(){
	this.style.color= "#04018A";
	this.style.backgroundColor="#FFFFFF"
	this.style.borderTop="solid #EEEEEE 1px";
	this.style.borderLeft="solid #EEEEEE 1px";
	this.style.borderBottom="solid #0D0D0D 1px";
	this.style.borderRight="solid #0D0D0D 1px";
	}
/////////////////////
function torna(){
	this.style.color= "#202020";
	this.style.backgroundColor="#FFFFFF"
	this.style.borderTop="solid #FFFFFF 1px";
	this.style.borderLeft="solid #FFFFFF 1px";
	this.style.borderBottom="solid #FFFFFF 1px";
	this.style.borderRight="solid #FFFFFF 1px";
	}
///////////////////////////
function clic(pag,pippo){
	location.href=pag;
	pippo.style.color= "#04018A";
	pippo.style.backgroundColor="#F8F8F8"
	pippo.style.borderBottom="solid #FFFFFF 1px";
	pippo.style.borderRight="solid #FFFFFF 1px";
	pippo.style.borderTop="solid #0D0D0D 1px";
	pippo.style.borderLeft="solid #0D0D0D 1px";
	//pippo.onmouseover=null;
	//pippo.onmouseout=null;
		p_prima = tutti.slice(0,indice);
		for (a=0; a<p_prima.length; a++) {
			p_prima[a].style.backgroundColor="#FFFFFF";
			p_prima[a].style.borderBottom="solid #FFFFFF 1px";
			p_prima[a].style.borderRight="solid #FFFFFF 1px";
			p_prima[a].style.borderTop="solid #FFFFFF 1px";
			p_prima[a].style.borderLeft="solid #FFFFFF 1px";
			p_prima[a].onmouseover=colora;
			p_prima[a].onmouseout=torna;
				}
		d_dopo = tutti.slice(indice+1, tutti.length);
		for (b=0; b<d_dopo.length; b++) {
		d_dopo[b].style.backgroundColor="#FFFFFF";
		d_dopo[b].style.borderBottom="solid #FFFFFF 1px";
		d_dopo[b].style.borderRight="solid #FFFFFF 1px";
		d_dopo[b].style.borderTop="solid #FFFFFF 1px";
		d_dopo[b].style.borderLeft="solid #FFFFFF 1px";		
			d_dopo[b].onmouseover=colora;
			d_dopo[b].onmouseout=torna;
				}
	}
/////////////////////////

//////////////////////////////
/*window.onload=function(){
	T1 = document.getElementById('TB01');
	T2 = document.getElementById('TB02');
	T3 = document.getElementById('TB03');
	T4 = document.getElementById('TB04');
	T5 = document.getElementById('TB05');
	T6 = document.getElementById('TB06');
	T7 = document.getElementById('TB07');
	T8 = document.getElementById('TB08');
	T9 = document.getElementById('TB09');
	T10 = document.getElementById('TB10');
	tutti = new Array(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10);
	for (f=0; f<tutti.length; f++) {
	tutti[f].onmouseover = colora;
	tutti[f].onmouseout = torna;
	tutti[f].style.cursor = "pointer";
	}
}*/
//////////////////
//////funzioni per i link
///////////////////
function apri(pag,pippo){
	location.href=pag;
}
//////////////////
function aprifinestra(nuovo){
if(document.all){
	window.open(nuovo,'','left=50,top=50,height=550,width=700,resizable,scrollbars');
	}else{
	window.open(nuovo, '','screenX=50,screenY=50,height=550,width=700,resizable,scrollbars');
	}	
}
///////////
function nuova_finestra(nuovo){
if(document.all){
	window.open(nuovo,'','left=50,top=50,height=550,width=700,resizable,scrollbars,titlebar,toolbar,status,location,directories');
	}else{
	window.open(nuovo, '','screenX=50,screenY=50,height=550,width=700,resizable,scrollbars,titlebar,toolbar,status,location,directories');
	}	
}
//////////////////
function hide(){
 for(m=0;m<tabelle.length;m++){
 tabelle[m].style.display = 'none';
 	}
 }
 ///////////////////
 //window.onload=function(){
 men01=document.getElementById('menu01');
 //}
function aprichiudi(pippo){
	if(pippo.style.display ==  'none'){
	for(i=0; i<pippo.lenght; i++){
	pippo.style.display='block';
	}
		}else{
		for(i=0; i<pippo.length; i++){
			pippo.style.display='none';
			}
		}
}

