var enablepersist="on"
var collapseprevious="yes"

if (document.getElementById){
document.write('<style type="text/css">')
document.write('.switchcontent{display:none;}')
document.write('</style>')
}

function getElementbyClass(classname){
ccollect=new Array()
var inc=0
var alltags=document.all? document.all : document.getElementsByTagName("*")
for (i=0; i<alltags.length; i++){
if (alltags[i].className==classname)
ccollect[inc++]=alltags[i]
}
}

function contractcontent(omit){
var inc=0
while (ccollect[inc]){
if (ccollect[inc].id!=omit)
ccollect[inc].style.display="none"
inc++
}
}

function expandcontent(cid){
if (typeof ccollect!="undefined"){
if (collapseprevious=="yes")
contractcontent(cid)
document.getElementById(cid).style.display=(document.getElementById(cid).style.display!="block")? "block" : "none"
}
}

function revivecontent(){
contractcontent("omitnothing")
selectedComponents=getselectedComponent()
if (selectedComponents!="") {document.getElementById(selectedComponents).style.display="block"}
}

function do_onload(){
getElementbyClass("switchcontent");
var aperto;
if (document.getElementById) {
aperto = document.getElementById('MenuAperto'); 
aprire = aperto.getAttribute("content");
if (aprire) {
expandcontent(aprire);
}
}
}

if (window.addEventListener)
window.addEventListener("load", do_onload, false)
else if (window.attachEvent)
window.attachEvent("onload", do_onload)
else if (document.getElementById)
window.onload=do_onload

function MM_goToURL() {
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
{for (i=0; i<(args.length-1); i+=3) eval(args[i]+".location='"+args[i+1]+"'");}
}

//  apertura di una finestra popup  //

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

//  apertura finestra popup flash homepage //

function apriPopup(nome, titolo, lar, alt){
	javascript:window.open('http://www.sailinprogress.it/sailinprogress_news.htm','', 'toolbar=no,location=no,directories=no, status=no,menubar=no,resizable=yes,scrollbars=yes, width=600,height=520');
}
