
//Contents for menu 1
var menu1=new Array()

menu1[1]='<a href="format02.php">Planimetria</a>'
menu1[2]='<a href="format03.php">Location</a>'

//Contents for menu 2, and so on
var menu2=new Array()
menu2[0]='<a href="visit01.php">Chi incontrerete</a>'
menu2[1]='<a href="visit02.php">Iscriviti</a>'

var menu3=new Array()
menu3[0]='<a href="espo01.php">Come partecipare</a>'
menu3[1]='<a href="espo02.php">Tutti gli espositori</a>'

var menu4=new Array()
menu4[0]='<a href="sele01.php">Incontri liberi</a>'
menu4[1]='<a href="sele02.php">Selezioni</a>'

var menu5=new Array()
menu5[0]='<a href="eventi01.php">18 febbraio</a>'
menu5[1]='<a href="eventi02.php">19 febbraio</a>'

var menu6=new Array()
menu6[0]='<a href="af04.php">Proposte formative</a>'
menu6[1]='<a href="af01.php">Percorsi formativi</a>'
menu6[2]='<a href="af02.php">Punti di forza</a>'
menu6[3]='<a href="af03.php">Stage</a>'
menu6[4]='<a href="af05.php">Placement</a>'
		
var menuwidth='165px' //default menu width
var menubgcolor='lightyellow'  //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}

function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}

function dropdownmenu(obj, e, menucontents, menuwidth){

if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation();

clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu


function aPPlica()
{
veLox = 1;
eL = document.getElementById("dentro");
eL.style.top = 0;
alteZZa = eL.offsetHeight	;
alteZZaEst = document.getElementById("fuori").offsetHeight;
setTimeout('Izz=setInterval("scoRRi()",50)', 1000);
}

function scoRRi()
{
if (parseInt(eL.style.top)>(alteZZa*(-1)))
eL.style.top=parseInt(eL.style.top)-veLox +'px';
else
eL.style.top=parseInt(alteZZaEst)+'px';
}

if (window.addEventListener)
window.addEventListener("load", aPPlica, false);
else if (window.attachEvent)
window.attachEvent("onload", aPPlica);
else if (document.getElementById)
window.onload=aPPlica;

function aumDim(stopAgain)
{
	veLox = stopAgain;
}



// Onload --------------------------------------------------------


window.onload=function(){
	
if(document.getElementById('resizablez')!=null)
{
rez = document.getElementById('resizablez');

  if (rez.addEventListener){ 
rez.addEventListener('mouseover', function(){InFiLa('news-aj.php','resizable')}, false); 	
} else if (rez.attachEvent) { 
rez.attachEvent('onmouseover', function(){InFiLa('news-aj.php','resizable')}); 
} 
}
	
if(!NiftyCheck())
    return;
	
Rounded("div.nifty","#FFFFFF","#d68631");
Rounded("div.nifty2","#000000","#d68631");
Rounded("div.niftyred","#000000","#712124");
Rounded("div.niftyw","#000000","#FFFFFF");
Rounded("div.niftyscheda","#FFFFFF","#712124");

<!-- target blank inizio -->
var i = 0;
  var collegamenti = document.links;
  for (i=0; i<collegamenti.length; i++)
  {
    if (collegamenti[i].title == "Nuova finestra")
    {
      collegamenti[i].target = "_blank";
    }
  }
 // Elementi del menu
formu = document.getElementById('formatz');
visitu = document.getElementById('visitz');
espu = document.getElementById('espoz');
selu = document.getElementById('selez');
eventiu = document.getElementById('eventiz');
afu = document.getElementById('afz');

// Barra news (dx)
destru = document.getElementById('fuori');

<!-- target blank fine -->
/*
document.getElementById('formatz').onmouseover =  function(){dropdownmenu(this, event, menu1, "85px");} ;
document.getElementById('formatz').onmouseout = function(){delayhidemenu();};
*/

    if (formu.addEventListener){ 
			// Menu
            formu.addEventListener('mouseover', function(e){var evt = window.event || e; dropdownmenu(formu, evt, menu1, "98px")}, false); 
			visitu.addEventListener('mouseover', function(e){var evt = window.event || e; dropdownmenu(visitu, evt, menu2, "116px")}, false);
			espu.addEventListener('mouseover', function(e){var evt = window.event || e; dropdownmenu(espu, evt, menu3, "120px")}, false);
			selu.addEventListener('mouseover', function(e){var evt = window.event || e; dropdownmenu(selu, evt, menu4, "112px")}, false);
			eventiu.addEventListener('mouseover', function(e){var evt = window.event || e; dropdownmenu(eventiu, evt, menu5, "91px")}, false);
			afu.addEventListener('mouseover', function(e){var evt = window.event || e; dropdownmenu(afu, evt, menu6, "163px")}, false);
			// Destra
			 destru.addEventListener('mouseover', function(){aumDim(0)}, false); 
			
			// Menu
			formu.addEventListener('mouseout', function(){delayhidemenu()}, false); 
			visitu.addEventListener('mouseout', function(){delayhidemenu()}, false); 
			espu.addEventListener('mouseout', function(){delayhidemenu()}, false); 
			selu.addEventListener('mouseout', function(){delayhidemenu()}, false); 
			eventiu.addEventListener('mouseout', function(){delayhidemenu()}, false); 
			afu.addEventListener('mouseout', function(){delayhidemenu()}, false); 
			//Destra
			destru.addEventListener('mouseout', function(){aumDim(1)}, false); 
    } else if (formu.attachEvent){ 
			//Menu
			formu.attachEvent('onmouseover', function(){dropdownmenu(formu, event, menu1, "98px");}); 
			visitu.attachEvent('onmouseover', function(){dropdownmenu(visitu, event, menu2, "116px");}); 
			espu.attachEvent('onmouseover', function(){dropdownmenu(espu, event, menu3, "120px");}); 
			selu.attachEvent('onmouseover', function(){dropdownmenu(selu, event, menu4, "112px");}); 
			eventiu.attachEvent('onmouseover', function(){dropdownmenu(eventiu, event, menu5, "91px");}); 
			afu.attachEvent('onmouseover', function(){dropdownmenu(afu, event, menu6, "163px");}); 
			// Destru
			destru.attachEvent('onmouseover', function(){aumDim(0)}); 
			
			//Menu
			formu.attachEvent('onmouseover', function(){delayhidemenu()}); 
			visitu.attachEvent('onmouseover', function(){delayhidemenu()});
			espu.attachEvent('onmouseover', function(){delayhidemenu()}); 
			selu.attachEvent('onmouseover', function(){delayhidemenu()}); 
			eventiu.attachEvent('onmouseover', function(){delayhidemenu()}); 
			afu.attachEvent('onmouseover', function(){delayhidemenu()}); 
			destru.attachEvent('onmouseout', function(){aumDim(1)}); 
    } 

if(document.getElementById('manunta'))
{
	nomi=new Array("manunta", "barbarossa", "petrucci", "albano", "scauri", "creti", "dutto");
	
	for (i=0; i<8;i++)
	{
	
		nometipo = nomi[i];
		cv = document.getElementById(nometipo);
		chiuditipo=nomi[i]+'chiudi';
		chiudi = document.getElementById(chiuditipo);
		
		if (cv.addEventListener)
		{ 
			cv.addEventListener('click', Alza, false);  
			chiudi.addEventListener('click', Abbassa, false);
		} 
		else if (cv.attachEvent) 
		{ 
			cv.onclick = function() {Alza(this)};
			chiudi.onclick = function(){Abbassa(this)};
		}
	
	}
}







}



function Alza(eL)
{
	if(this.id)
	stringa = this.id + 'click';
	else
	stringa = eL.id + 'click';
	var eleM =document.getElementById(stringa) ;
	eleM.style.zIndex = 3;

}

function Abbassa(eL)
{
		
	if(this.id)
	{
		
		stringa = this.id;
		stringa = stringa.replace("chiudi", "");
		stringa = stringa + 'click';
	}
	else
	{	
		stringa = eL.id;
		stringa = stringa.replace("chiudi", "");
		stringa = stringa + 'click';
	}
	var eleM =document.getElementById(stringa);
	eleM.style.zIndex = -3;
}

