ua=navigator.userAgent;
OP=ua.match(/Opera.[5-9]/i)!=null;
IE=!OP&&ua.match(/msie.[4-9]/i)!=null;
N4=!OP&&!IE&&ua.match(/mozilla.4/i)!=null;

ofsH=14;
w=150;
nbsp="&nbsp;";
rt="<!--el-->";
mi=[];
c=0;
d=document;

//<!-- Javascript per andare sui links quando si premono i tasti -->
function VaiA(address) {
window.location = address;
} 
	
//<!-- Javascript per spedire i valori del Login con HTML nascosti -->
function mtChangeAction(){
var sUrl
myDdl= document.getElementById('ddl') 
sUrl= myDdl.options[myDdl.selectedIndex].value;
document.getElementById('formLogin').action = sUrl;
return true;
}
				
//<!-- Javascript per andare sulla pagina dell'Università scelta nel ComboBox --> myDdl= document.all['ddlUniversity'];
function mtGoUniversity(){
var sUrl
myDdl= document.getElementById('ddlUniversity') 
sUrl= myDdl.options[myDdl.selectedIndex].value;
document.getElementById('formUniversity').action = sUrl;
return true;
}
				
//<!-- Javascript per andare sulla pagina degli Istituti scelto nel ComboBox -->
function mtGoInstitute(){
var sUrl
myDdl= document.getElementById('ddlInstitute');
sUrl= myDdl.options[myDdl.selectedIndex].value;
document.getElementById('formInstitute').action = sUrl;
return true;
}

// Author: Sergey A Zakharov, sergey@kraft-sp.ru
// Copyright: (c)2002 Sergey A Zakharov
// Small JavaScript Menu: v1.0

function Item(m,w){
	this.l;
	this.m=m;
	this.w=w
}

function Menu(n){
	this.n=n;
	this.m="<table border=0 cellpadding=4 cellspacing=0 class=\"menutable2\"><tr>"+rt+"</tr></table>";
	this.sm=this.m; //"";
	this.sw=this.w
	this.bg=["#9CA7BA","#7385A4","#9CA7BA","#7385A4"];
	this.cl=["#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF"];
	this.mf="Arial, Helvetica, sans-serif";
	this.mfs="11px";
	this.mfw="normal";
	this.smf=this.mf;
	this.smfs=this.mfs;
	this.smfw=this.mfw;
	this.bc="#0000FF";
	this.bw=0
}

function addM(mo,mid,text,url,w){
	mi[mid]=new Item(mo,w);mo.m=mo.m.replace(rt,item(mid,mo.bg[0],mo.n,url,nbsp+text+nbsp)+rt)
	}

function addSM(mo,mid,text,url,w){
	mi[mid+"sub"+c]=new Item(mo,0);
	ls="<!--"+mid+"-->";
	if(mo.sm.indexOf(ls)<0)mo.sm+=(N4?"<layer":"<div")+" id="+mid+"sub onmouseover=sE(this,1) onmouseout=sE(this,0) "+(N4?"visibility=hide  width="+mi[mid].w:"style=position:absolute;visibility:hidden")+"><table width=85 border=0 cellpadding=0 cellspacing=0><tr><td bgcolor="+mo.bc+"><table width=100% border=0 cellpadding=4 cellspacing="+mo.bw+">"+ls+"</table></td></tr></table>"+(N4?"</layer>":"</div>");mo.sm=mo.sm.replace(ls,"<tr>"+item(mid+"sub"+c,mo.bg[2],mo.n+"sub",url,nbsp+text+nbsp)+"</tr>"+ls);c++
}

function writeStyle(o){
	s=IE?"cursor:hand":N4?"text-decoration:none":"cursor:default";d.write('<style>.'+o.n+',.'+o.n+'n{font-family:'+o.mf+';font-size:'+o.mfs+';font-weight:'+o.mfw+';'+s+'}.'+o.n+'sub,.'+o.n+'subn{font-family:'+o.smf+';font-size:'+o.smfs+';font-weight:'+o.smfw+';'+s+'}.'+o.n+'{color:'+o.cl[0]+'}.'+o.n+'sub{color:'+o.cl[2]+'}</style>')
	}

function hl(o,t){
	e=mi[o.id];c=(e.w>0)<<1|t;bg=e.m.bg[c];cl=e.m.cl[c];
	if(N4){
		w=o.clip.width;
		with(o.document){
			linkColor=cl;vlinkColor=cl;alinkColor=cl;bgColor=bg;open();write(e.l);close()
		}
		o.clip.width=w
		}
		else{
			OP?o.style.background=bg:o.style.backgroundColor=bg;o.style.color=cl
			}
		sm=gE(o.id+"sub");
		if(e.w && sm){
			if(t){
				if(N4){
					sm.left=o.pageX;sm.top=o.pageY+o.clip.height;
					}
				else{
					mnp=o;ofsL=0;ofsT=0;
					do{
						ofsL+=mnp.offsetLeft;ofsT+=mnp.offsetTop;mnp=mnp.offsetParent
						}
					while(mnp!=null);s=sm.style;s.left=ofsL;s.top=ofsT+(OP?ofsH:o.offsetHeight)
					}
				sE(sm,1)
				}
			else sE(sm,0)
		}
	}

function item(id,bg,cl,u,t){
	mi[id].l=a(cl+"n",u,t);
	return "<td align=center bgcolor="+bg+(N4?"><ilayer><layer width=100%":" class="+cl+(u?" onmousedown=document.location='"+u+"'":""))+" id="+id+" onmouseover=hl(this,1) onmouseout=hl(this,0)>"+(N4?a(cl,u,t)+"</layer></ilayer>":t)+"</td>"
	}

function a(cl,u,t){
	return "<a class="+cl+" href="+(u?u:"#")+">"+t+"</a>"
	}

function gE(e,f){
	if(N4){
		f=(f)?f:self;
		var V=f.document.layers;
		if(V[e])return V[e];
		for(var W=0;W<V.length;)t=gE(e,V[W++]);
		return t
		}
	if(IE)return d.all[e];
	return d.getElementById(e)
	}

function gS(e){
	return N4? gE(e):gE(e).style
	}

function sE(e,v){
	(N4?e:e.style).visibility=v?N4?'show':'visible':N4?'hide':'hidden'
	}
	

