// JavaScript Document
<!-- start hide
// Delay in milliseconds for the growing headliner
growWait=90

// Delay in milliseconds for the expanding headliner
expandWait=120

// Delay in milliseconds for the scrolling headliner
scrollWait=100

// Number of characters in scrolling zone for the scrolling headliner
scrollWidth=60

// Number of lines, specify as much as you want to use
lineMax=2
lines=new Array(lineMax)

// Define the lines (Text to display, url, effect, time to wait)
lines[1]=new Line("Si organizzano e si effettuano corsi per lavori su fune, PROSSIMO CORSO dal 3 al 12/03/08 CLICCA QUI...", "javascript:MM_openBrWindow('documenti/corsi.pdf','','scrollbars=yes,width=800,height=600')", Scroll, 3000)
//lines[2]=new Line("Torino 18/Giugno2008 campionato Europeo  di Treeclimbing  e Congresso Europeo CLICCA QUI...", "javascript:MM_openBrWindow('/popup.html','','scrollbars=no,width=350,height=400')", Scroll, 3000)
lines[2]=new Line("Torino 18/Giugno2008 campionato Europeo  di Treeclimbing  e Congresso Europeo CLICCA QUI...", "javascript:MM_openBrWindow('http://www.etcc-2008.eu/index.html','','scrollbars=yes,width=800,height=600')", Scroll, 3000)

// Some other variables (just don't change)
lineText=""
timerID=null
timerRunning=false
spaces=""
charNo=0
charMax=0
charMiddle=0
lineNo=0
lineWait=0

// Define line object
function Line(text, url, type, wait) {
	this.text=text
	this.url=url
	this.Display=type
	this.wait=wait
}

// Fill a string with n chars c
function StringFill(c, n) {
	s=""
	while (--n >= 0) {
		s+=c
	}
	return s
}

function Static() {
	document.formDisplay.buttonFace.value=this.text
	timerID=setTimeout("ShowNextLine()", this.wait)
}

function Grow() {
	lineText=this.text
	lineWait=this.wait
	charMax=lineText.length
	TextGrow()
}

function TextGrow() {
	if (charNo <= charMax) {
		document.formDisplay.buttonFace.value=lineText.substring(0, charNo)
		charNo++
		timerID=setTimeout("TextGrow()", growWait)
	}
	else {
		charNo=0
		timerID=setTimeout("ShowNextLine()", lineWait)
	}
}

function Expand() {
	lineText=this.text
	charMax=lineText.length
	charMiddle=Math.round(charMax / 2)
	lineWait=this.wait
	TextExpand()
}

function TextExpand() {
	if (charNo <= charMiddle) {
		document.formDisplay.buttonFace.value=lineText.substring(charMiddle - charNo, charMiddle + charNo)
		charNo++
		timerID=setTimeout("TextExpand()", expandWait)
	}
	else {
		charNo=0
		timerID=setTimeout("ShowNextLine()", lineWait)
	}
}

function Scroll() {
	spaces=StringFill(" ", scrollWidth)
	lineText=spaces+this.text
	charMax=lineText.length
	lineText+=spaces
	lineWait=this.wait
	TextScroll()
}

function TextScroll() {
	if (charNo <= charMax) {
		document.formDisplay.buttonFace.value=lineText.substring(charNo, scrollWidth+charNo)
		charNo++
		timerID=setTimeout("TextScroll()", scrollWait)
	}
	else {
		charNo=0
		timerID=setTimeout("ShowNextLine()", lineWait)
	}
}

function StartHeadliner() {
	StopHeadliner()
	timerID=setTimeout("ShowNextLine()", 1000)
	timerRunning=true
}

function StopHeadliner() {
	if (timerRunning) { 
		clearTimeout(timerID)
		timerRunning=false
	}
}

function ShowNextLine() {
	(lineNo < lineMax) ? lineNo++ : lineNo=1
	lines[lineNo].Display()
}

function GotoUrl(url)
{
	top.location.href=url
}
// end hide -->

function apri_corso_fune(){
	MM_openBrWindow('file:///Macintosh HD/Users/morena/Desktop/documenti/Corso 235_03 funi e preposti funi.pdf','','scrollbars=yes,width=800,height=600')
	MM_openBrWindow('file:///Macintosh HD/Users/morena/Desktop/documenti/Cronoprogramma 235_03 Base + B Marzo 08.pdf','','scrollbars=yes,width=800,height=600')
	MM_openBrWindow('file:///Macintosh HD/Users/morena/Desktop/documenti/modulo iscrizione .pdf','','scrollbars=yes,width=800,height=600')
}
