function popup(url, name, width, height, scrollbars, status) 
{ 
if (document.all) { 
var x = window.screenLeft; 
var y = window.screenTop; 
var w = window.document.body.offsetWidth; 
var h = window.document.body.offsetHeight; 
} 
else { 
var x = window.screenX; 
var y = window.screenY; 
var w = window.outerWidth; 
var h = window.outerHeight; 
} 
var cntx = x + Math.round((w - width) / 2); 
//var cnty = y + Math.round((h - height) / 2); 
var cnty = 100;

window.open (url, name, 'left=' + cntx + ', top=' + cnty + ', width=' + width + ', height=' + height + ', scrollbars='+scrollbars+', resizable=no, status='+status+' +' ); 
} 

function chiudi() {
	window.self.close()
}


var ns6=document.getElementById&&!document.all
var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1

function checkcontained(e){
var iscontained=0
cur=ns6? e.target : event.srcElement
i=0
if (cur.id=="foldheader")
iscontained=1
else
while (ns6&&cur.parentNode||(ie4&&cur.parentElement)){
if (cur.id=="foldheader"||cur.id=="foldinglist"){
iscontained=(cur.id=="foldheader")? 1 : 0
break
}
cur=ns6? cur.parentNode : cur.parentElement
}

if (iscontained){
var foldercontent=ns6? cur.nextSibling.nextSibling : cur.all.tags("UL")[0]
if (foldercontent.style.display=="none"){
foldercontent.style.display=""
}
else{
foldercontent.style.display="none"
}
}
}

if (ie4||ns6)
document.onclick=checkcontained