//var scrollerwidth=190
//var scrollerheight=120
//var scrollerbgcolor='#EAF4FC'
var scrollerwidth=300
var scrollerheight=130
var scrollerbgcolor='#EAF4FC'
var scrollerbackground=''

var messages=new Array()
//messages[0]='<table width="100%"><tr><td align="center"><font face="Arial" size="3" color="#000000">Welcome<br>to the Department of Civil and Environmental Engineering</font></td></tr></table>'
messages[0]='<font face="Arial" size="4" color="#000000"><div align="center"><strong>Welcome to the <br>Department of Civil and <br>Environmental Engineering</strong></font></div>'
messages[1]='<font face="Arial" size="3" color="#990000"><strong>School of Doctoral Studies in Environmental Engineering<br><font color="#000000" size="2"></strong><br><font color="#FF0000"><strong>New website</strong><br><a href="http://portale.unitn.it/dree/homepage.do?rootchannelId=-34479&utente=Visitors">DREE online</a></font>'
//messages[2]='<font face="Arial" size="3" color="#990000"><strong>School of Doctoral Studies in Environmental Engineering<br><font color="#000000" size="2"></strong><br><font color="#FF0000"><strong>Cycle 23, call for positions</strong><br><a href="http://www.ing.unitn.it/dica/eng/phd_programme/announcements.php">New application deadline: October 24, 2007</a></font>'
//messages[2]='<font face="Arial" size="3" color="#990000"><strong>FP7 Calls 2007<br><font color="#000000" size="2"></strong><br><font color="#FF0000"><strong>Energy and Environment priorities</strong><br><a href="http://cordis.europa.eu/fetch?CALLER=IT_NEWS&ACTION=D&SESSION=&RCN=28785">Deadlines: February-March 2008</a></font>'
//messages[3]='<font face="Arial" size="3"><strong>FORALPS project<br><a href="http://www.ing.unitn.it/~foralps/trento2008/index.php" font size="2">Final Conference</strong></a></font><font face="Arial" size="2" font color="#000000"><br>March 7, 2008</font>'
messages[2]='<font face="Arial" size="3"><strong>New e-book published<br><a href="http://www.ing.unitn.it/dica/eng/Quaderni/index.php" font size="2">ALPNAP Consortium</strong></font><font face="Arial" size="2" font color="#000000"><br>Air pollution, traffic noise and related health effects in the Alpine space</a></font>'
//messages[5]='<font face="Arial" size="3"><strong>Prestigious prizes won by DICA research fellows:<br><a href="http://www.ing.unitn.it/dica/tools/download/Titarev_Dumbser_2007.doc" font face="Arial" size="2" font color="#000000">V. Titarev and M. Dumbser</font></strong></a><br><font face="Arial" size="2" font color="#000000">Applied Mathematics group</font>'
//messages[5]='<font face="Arial" size="3"><strong>Corso<br><a href="http://www.ing.unitn.it/dica/eng/events.php" font face="Arial" size="2" font color="#000000">Minimizzare i fanghi di depurazione</font></strong></a><br><font face="Arial" size="2" font color="#000000">11-12 marzo 2008 - Attenzione! iscrizioni chiuse per esaurimento posti</font>'
messages[3]='<font face="Arial" size="3"><strong>Avviso seminario: J. T. JENKINS<br><a href="http://www.ing.unitn.it/dica/tools/documents/Jenkins.doc" font size="2">Wind-blown Sand</strong></a></font><font face="Arial" size="2" font color="#000000"><br>April 10, 2008, h. 15.30, CUDAM room</font>'
messages[4]='<font face="Arial" size="3"><strong>Avviso di borse di studio e collaborazioni<br><a href="http://www.ing.unitn.it/dica/ita/ricerca_personale_borse.php" font size="2">Varie tematiche</strong></a></font><font face="Arial" size="2" font color="#FF0000"><br>Scadenze:<font color="#000000">varie</font>'//messages[5]='<font face="Arial" size="3"><strong>INTAS Collaborative Call<br><a href="http://www.intas.be/index.asp?s=2_0&uid= font size="2">Research Project with Armenia, Azerbaijan & Georgia</strong></a></font><font face="Arial" size="2" font color="#FF0000"><br>Deadline:<font color="#000000"> June 06, 2006</font>'
//messages[2]='<table width="100%"><tr><td><font face="Arial" size="2" color="#000000">If you wish <br>to access the online courses,<br> click on a faculty under <br>"courses" or "learning"</font></td></tr></table>'
//messages[8]=''
//messages[9]=''
//-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/
if (messages.length > 1)
	i=2 //valore originale=2
else
	i=0

function move1(whichlayer){
tlayer=eval(whichlayer)
if (tlayer.top > 0 && tlayer.top <= 5){
	tlayer.top=0
	setTimeout("move1(tlayer)", 3000)
	setTimeout("move2(document.main.document.second)", 3000)
	return
}

if (tlayer.top >= tlayer.document.height*-1){
	tlayer.top-=5
	setTimeout("move1(tlayer)",100)
}else{
	tlayer.top=scrollerheight
	tlayer.document.write(messages[i])
	tlayer.document.close()
	if (i == messages.length-1)
		i=0
	else
		i++
	}
}

function move2(whichlayer){
tlayer2=eval(whichlayer)
if (tlayer2.top>0&&tlayer2.top<=5){
	tlayer2.top=0
	setTimeout("move2(tlayer2)",3000)
	setTimeout("move1(document.main.document.first)",3000)
	return
}
if (tlayer2.top>=tlayer2.document.height*-1){
	tlayer2.top-=5
	setTimeout("move2(tlayer2)",100)
}else{
	tlayer2.top=scrollerheight
	tlayer2.document.write(messages[i])
	tlayer2.document.close()
	if (i==messages.length-1)
		i=0
	else
		i++
	}
}

function move3(whichdiv){
tdiv=eval(whichdiv)
if (tdiv.style.pixelTop > 0 && tdiv.style.pixelTop <= 5){
	tdiv.style.pixelTop=0
	setTimeout("move3(tdiv)",3000)
	setTimeout("move4(second2)",3000)
	return
}
if (tdiv.style.pixelTop>=tdiv.offsetHeight*-1){
	tdiv.style.pixelTop-=5
	setTimeout("move3(tdiv)",100)
}else{
	tdiv.style.pixelTop=scrollerheight
	tdiv.innerHTML=messages[i]
	if (i==messages.length-1)
		i=0
	else
		i++
	}
}

function move4(whichdiv){
tdiv2=eval(whichdiv)
if (tdiv2.style.pixelTop > 0 && tdiv2.style.pixelTop <= 5){
	tdiv2.style.pixelTop=0
	setTimeout("move4(tdiv2)",3000)
	setTimeout("move3(first2)",3000)
	return
}
if (tdiv2.style.pixelTop >= tdiv2.offsetHeight*-1){
	tdiv2.style.pixelTop-=5
	setTimeout("move4(second2)",100)
}else{
	tdiv2.style.pixelTop=scrollerheight
	tdiv2.innerHTML=messages[i]
	if (i==messages.length-1)
		i=0
	else
		i++
	}
}

function startscroll(){
if (document.all){
	move3(first2)
	second2.style.top=scrollerheight
	second2.style.visibility='visible'
}else if (document.layers){
	document.main.visibility='show'
	move1(document.main.document.first)
	document.main.document.second.top=scrollerheight+5
	document.main.document.second.visibility='show'
	}
}
window.onload=startscroll

