<!--

img1		= new Image(212,28); img1.src		= "images/b_formazione1.gif";
img1_r 	= new Image(212,28); img1_r.src	= "images/b_formazione2.gif";

function imgOn(imgX){
	document.images [imgX].src = eval(imgX + "_r.src");
}

function imgOff(imgX){
	document.images [imgX].src = eval(imgX + ".src");
}

function checkPrivacy() {
	if (!(document.form.privacy[0].checked)) {
		alert('ATTENZIONE !!!\nse non si consente al trattamento dei dati personali secondo la legge 675/96, non è possibile proseguire.');
		return false;
	}
}


var ATCont
var ATScroll
var offsetAT

var loop, timer
var initialised,delay
var bw
delay=100

bw=new verifyCompatibleBrowser()


function inizia() {
	ATCont=new avviaScroll('areaTesto1')
	ATScroll=new avviaScroll('areaTesto2','areaTesto1')
	ATScroll.MoveArea(0,0)
	offsetAT =oset ("ATCont","ATScroll")
	Posiziona("areaTesto1",20,100)

	initialised=true;	
}

function verifyCompatibleBrowser() {
	this.ver=navigator.appVersion
	this.dom=document.getElementById?1:0
	this.ope=(this.ver.indexOf("Opera")>-1)
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom)?1:0;
	this.ie4=(document.all && !this.dom)?1:0;
	this.ie5=((this.ver.indexOf("MSIE 5")>-1 && this.dom) || this.ie4 || this.ie6 || this.ope)?1:0;
	this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5)
	return this
}

function avviaScroll(obj,nest) {
	nest=(!nest) ? '':'document.'+nest+'.'
	this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0;
	this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0;
	this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight
	this.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight

	this.up=MoveAreaUp;
	this.down=MoveAreaDown;
	this.left=MoveAreaLeft;
	this.right=MoveAreaRight;
	this.MoveArea=MoveArea;
	this.x;
	this.y;
	this.obj = obj + "Object"
	eval(this.obj + "=this")
	return this
}

function MoveArea(x,y) {
	this.x=x;this.y=y
	this.css.left=this.x
	this.css.top=this.y
}
function MoveAreaUp(passo) {
	if (this.y<0) {
		this.MoveArea(0,this.y-passo)
		if(loop) setTimeout(this.obj+".up(" + passo + ")",delay)
	}
}
function MoveAreaDown(passo,altezza) {
	if (this.y>-altezza) {
		this.MoveArea(0,this.y-passo)
		if(loop) setTimeout(this.obj+".down(" + passo + "," + altezza + ")",delay)
	}
}
function MoveAreaLeft(passo,altezza) {
	if (this.x>-altezza) {
		this.MoveArea(this.x-passo,0)
		if(loop) setTimeout(this.obj+".left(" + passo + "," + altezza + ")",delay)
	}
}
function MoveAreaRight(passo) {
	if (this.x<0) {
		this.MoveArea(this.x-passo,0)
		if(loop) setTimeout(this.obj+".right(" + passo + ")",delay)
	}
}

function oset(padre, figlio) { 
	if (bw.ie5) {return eval(figlio+".el.offsetHeight-"+ padre +".el.offsetHeight-5")} 
	if (bw.ns4) {return eval(figlio+".css.document.height-"+ padre +".css.clip.height-5")}
	if (bw.ns5) {return eval(figlio+".el.offsetHeight-"+ padre +".el.offsetHeight")}
}


//vuole il nome della div, la distanza dal bordo sinistro e la distanza dal bordo destro
function Posiziona(oggetto,left,top) {
	if (bw.ns4) {
		//left-=1
		eval('document.'+oggetto+'.left='+left)
		eval('document.'+oggetto+'.top='+top)
		eval("document."+oggetto+".visibility='visible'")
	}
	if (bw.ns5) {
		//left-=1
		top-=1
		document.getElementById(oggetto).style.left=left
		document.getElementById(oggetto).style.top=top
		document.getElementById(oggetto).style.visibility='visible'
	}
	if (bw.ie5 || bw.ie4) {
		document.all[oggetto].style.left=left
		document.all[oggetto].style.top=top
		document.all[oggetto].style.visibility='visible'
	}
}

function CeaseScroll() {
	loop=false
	if(timer) clearTimeout(timer)
}

function PerformScroll(passo,oggetto,altezza) {
	if (initialised) {
		loop=true;
		if (passo>0) {
			oggetto.down(passo,altezza)
		}
		else {
			oggetto.up(passo)
		}
	}
}

function nascondi(oggetto) {
	if (bw.ns4) {
		eval("document."+oggetto+".visibility='hidden'")
	}
	if (bw.ns5) {
		document.getElementById(oggetto).style.visibility='hidden'
	}
	if (bw.ie5 || bw.ie4) {
		document.all[oggetto].style.visibility='hidden'
	}
}







//-->

