//-------------------------------------------- POPUP    
function Apri(URL,nome,w,h,sta,scr,rsz){
	var l=((screen.availWidth-w)/2)-3
	var t=((screen.availHeight-h)/2)+8
	if(nome=='')nome='pop'
     		popUp=open(URL,nome,'left='+l+',top='+t+',width='+w+',height='+h+',menubar=0,toolbar=0,status='+sta+',scrollbars='+scr+',resizable='+rsz)
 		}
	
var colorSel='#ffaa00', colorLink='#99bbdd'

function Formatta(){
	var menu=parent.frames[1].document.getElementsByTagName('td')
	for(var i=0; i<menu.length-1; i++){
		menu[i].style.visibility='visible'
				}
	for(var i=0; i<parent.frames[1].document.links.length; i++)
		parent.frames[1].document.links[i].style.color=colorLink
	parent.frames[1].document.getElementById(area).style.color=colorSel
	parent.parent.frames[0].location='../sx2.htm'     
	FormattaArea(0)
	
	for(var i=0; i<document.getElementsByTagName('area').length; i++){
		document.getElementsByTagName('area')[i].id='cartel'+i
		document.getElementsByTagName('area')[i].onmouseover=function(){
			parent.parent.frames[0].document.getElementById('dida').innerHTML=eval(sezione+'.titolo['+this.id.substring(6)+']')==null?"":eval(sezione+'.titolo['+this.id.substring(6)+']')
				}
		document.getElementsByTagName('area')[i].onmouseout=function(){
			parent.parent.frames[0].document.getElementById('dida').innerHTML=''
				}
		document.getElementsByTagName('area')[i].onclick=function(){cartella=this.id; Apri('../pop.htm','',640,469,0,0,1); return false}
			}
		}    
function FormattaArea(n){
	for(var i=0; i<document.links.length; i++)
		document.links[i].style.color=colorLink; 
	document.links[n].style.color=colorSel
	document.links[n].blur()
	sezione='sezione'+n
      	if(n>0)
		document.getElementById('video').style.visibility='hidden'
	else	document.getElementById('video').style.visibility='visible'       
		}
		

function Video(testo){
	var tornaIndietro=location.toString()
	parent.tornaIndietro=tornaIndietro                
	location= '../video.htm#'+area+'/video.mpg'  
	parent.testoVideo=testo; 
		}          
		
//----------------------------------------------------- CREDITS		
function Credits(){
	l=document.all?layer:document.getElementById('layer')
	l.style.visibility='visible'
	document.onclick=Chiudi  
	try{
		parent.frames[1].document.onclick=Chiudi
		parent.frames[1].frames[0].document.onclick=Chiudi 
			}
	catch(error){}
		}  
function Chiudi(){l.style.visibility='hidden'}      

function Chiudi(){l.style.visibility='hidden'}
