function verifyCompatibleBrowser_gen(){ 
    this.ver=navigator.appVersion 
    this.dom=document.getElementById?1:0 
    this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0; 
    this.ie4=(document.all && !this.dom)?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 
} 
bw=new verifyCompatibleBrowser_gen() 
 
 
var speed_gen=50 
 
var loop_gen, timer_gen 
 
function ConstructObject_gen(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_gen;this.down=MoveAreaDown_gen; 
    this.MoveArea_gen=MoveArea_gen; this.x; this.y; 
    this.obj = obj + "Object" 
    eval(this.obj + "=this") 
    return this 
} 
function MoveArea_gen(x,y){ 
    this.x=x;this.y=y 
    this.css.left=this.x 
    this.css.top=this.y 
} 
 
function MoveAreaDown_gen(move){ 
	if(this.y>-this.scrollHeight+objContainer_gen.clipHeight){ 
    this.MoveArea_gen(0,this.y-move) 
    if(loop_gen) setTimeout(this.obj+".down("+move+")",speed_gen) 
	} 
} 
function MoveAreaUp_gen(move){ 
	if(this.y<0){ 
    this.MoveArea_gen(0,this.y-move) 
    if(loop_gen) setTimeout(this.obj+".up("+move+")",speed_gen) 
	} 
} 
 
function PerformScroll_gen(speed_gen){ 
	if(initialised){ 
		loop_gen=true; 
		if(speed_gen>0) objScroller_gen.down(speed_gen) 
		else objScroller_gen.up(speed_gen) 
	} 
} 
 
function CeaseScroll_gen(){ 
    loop_gen=false 
    if(timer_gen) clearTimeout(timer_gen) 
} 
var initialised; 

function InitialiseScrollableArea_gen(){ 
    objContainer_gen=new ConstructObject_gen('divContainer_gen') 
    objScroller_gen=new ConstructObject_gen('divContent_gen','divContainer_gen') 
    objScroller_gen.MoveArea_gen(0,0) 
    objContainer_gen.css.visibility='visible' 
    initialised=true; 
} 

function NewWindow (pagina,nomepagina,larghezza,altezza,scroll)  {
	LeftPosition = (screen.width) ? (screen.width-larghezza)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-altezza)/2 : 0;
	settings = 'height='+altezza+',width='+larghezza+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable=yes'
	fine = window.open(pagina,nomepagina,settings)
	fine.focus()
}

function NewWindowNoResize (pagina,nomepagina,larghezza,altezza,scroll)  {
	LeftPosition = (screen.width) ? (screen.width-larghezza)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-altezza)/2 : 0;
	settings = 'height='+altezza+',width='+larghezza+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable=no,menubar=yes'
	fine = window.open(pagina,nomepagina,settings)
	fine.focus()
}

