function changeClass(obj, c) {
    if (document.getElementById)
	{
	p = document.getElementById(obj);
	p.className = c;
	}
    else if (document.layers)
	{
	document.layers[obj].className = c;
	}
    else if (document.all)
	{
     	eval("document.all." + obj + ".className = " + c);
	}
}
function setFocus(obj) {
    if (document.getElementById)
	{
	p = document.getElementById(obj);
	p.focus();
	}
}

function mostra(obj) {
    if (document.getElementById)
	{
	p = document.getElementById(obj);
	p.style.visibility = 'visible';
	}
    else if (document.layers)
	{
	document.layers[obj].visibility = 'show';
	}
    else if (document.all)
	{
     	eval("document.all." + obj + ".style.visibility = 'visible'");
	}
}

function nascondi(obj) {
    if (document.getElementById)
	{
	p = document.getElementById(obj);
	p.style.visibility = 'hidden';
	}
    else if (document.layers)
	{
	document.layers[obj].visibility = 'hide';
	}
    else if (document.all)
	{
     	eval("document.all." + obj + ".style.visibility = 'hidden'");
	}
}

function lnk1(){
// parametri: testo, locazione, stile base, stile per mouseover
	style1 = "lnk"; style2 = "lnko";
	if (typeof(lnk1.arguments[2]) != "undefined" && lnk1.arguments[2] != "") {style1 = lnk1.arguments[2]}
	if (typeof(lnk1.arguments[3]) != "undefined" && lnk1.arguments[3] != "") {style2 = lnk1.arguments[3]}
	if (document.getElementById)
		{
		document.write('<a href="' + lnk1.arguments[1] + '"><span class="' + style1 + '" onmouseover="this.className=\'' + style2 + '\'" onmouseout="this.className=\'' + style1 + '\'">');
		document.write(lnk1.arguments[0]);
		document.write('</span></a>');
		}
	else if (document.layers)
		{
		document.write('<a href="' + lnk1.arguments[1] + '">');
		document.write(lnk1.arguments[0]);
		document.write('</a>');
		}
	else 
		{
		document.write('<a href="' + lnk1.arguments[1] + '"><span class="' + style1 + '" onmouseover="this.className=\'' + style2 + '\'" onmouseout="this.className=\'' + style1 + '\'">');
		document.write(lnk1.arguments[0]);
		document.write('</span></a>');
		}
}

function lnk2(){
// parametri: testo, locazione, stile base, stile per mouseover, nome finestra, opzioni finestra
	style1 = "lnk"; style2 = "lnko";
	wname = "newWin";
	if (typeof(lnk2.arguments[2]) != "undefined" && lnk2.arguments[2] != "") {style1 = lnk2.arguments[2]}
	if (typeof(lnk2.arguments[3]) != "undefined" && lnk2.arguments[3] != "") {style2 = lnk2.arguments[3]}
	if (typeof(lnk2.arguments[4]) != "undefined" && lnk2.arguments[4] != "") {wname = lnk2.arguments[4]}
	ss = " "; if (typeof(lnk2.arguments[5]) != "undefined") {ss = lnk2.arguments[5]}
	opt = getopt(ss, "width=", "600");
	opt = opt + "," + getopt(ss, "height=", "400");
	opt = opt + "," + getopt(ss, "left=", "150");
	opt = opt + "," + getopt(ss, "top=", "50");
	opt = opt + "," + getopt(ss, "location=", "yes");
	opt = opt + "," + getopt(ss, "resizable=", "yes");
	opt = opt + "," + getopt(ss, "scrollbars=", "yes");
	if (document.getElementById)
		{
		document.write('<span class="' + style1 + '" onmouseover="this.className=\'' + style2 + '\'" onmouseout="this.className=\'' + style1 + '\'" onclick="' + wname + '=window.open(\'' + lnk2.arguments[1] + '\',\'' + wname + '\',\'' + opt + '\')">');
		document.write(lnk2.arguments[0]);
		document.write('</span>');
		}
	else if (document.layers)
		{
		document.write('<a href="' + lnk2.arguments[1] + '" target="newWin">');
		document.write(lnk2.arguments[0]);
		document.write('</a>');
		}
	else 
		{
		document.write('<span class="' + style1 + '" onmouseover="this.className=\'' + style2 + '\'" onmouseout="this.className=\'' + style1 + '\'" onclick="' + wname + '=window.open(\'' + lnk2.arguments[1] + '\',\'' + wname + '\',\'' + opt + '\')">');
		document.write(lnk2.arguments[0]);
		document.write('</span>');
		}
}

function lnk2b(){
// parametri: testo, locazione, stile base, stile per mouseover, nome finestra, opzioni finestra
	style1 = "lnk"; style2 = "lnko";
	wname = "newWin";
	if (typeof(lnk2b.arguments[2]) != "undefined" && lnk2b.arguments[2] != "") {style1 = lnk2b.arguments[2]}
	if (typeof(lnk2b.arguments[3]) != "undefined" && lnk2b.arguments[3] != "") {style2 = lnk2b.arguments[3]}
	if (typeof(lnk2b.arguments[4]) != "undefined" && lnk2b.arguments[4] != "") {wname = lnk2b.arguments[4]}
	ss = " "; if (typeof(lnk2b.arguments[5]) != "undefined") {ss = lnk2b.arguments[5]}
	opt = getopt(ss, "width=", "740");
	opt = opt + "," + getopt(ss, "height=", "500");
	opt = opt + "," + getopt(ss, "left=", "30");
	opt = opt + "," + getopt(ss, "top=", "50");
	opt = opt + "," + getopt(ss, "location=", "yes");
	opt = opt + "," + getopt(ss, "resizable=", "yes");
	opt = opt + "," + getopt(ss, "scrollbars=", "yes");
	opt = opt + ",menubar=yes,toolbar=yes,status=yes";
	if (document.getElementById)
		{
		document.write('<span class="' + style1 + '" onmouseover="this.className=\'' + style2 + '\'" onmouseout="this.className=\'' + style1 + '\'" onclick="' + wname + '=window.open(\'' + lnk2b.arguments[1] + '\',\'' + wname + '\',\'' + opt + '\')">');
		document.write(lnk2b.arguments[0]);
		document.write('</span>');
		}
	else 
		{
		document.write('<a href="' + lnk2b.arguments[1] + '" target="newWin">');
		document.write(lnk2b.arguments[0]);
		document.write('</a>');
		}
}
function getopt(str, param, defval) {
	n = str.indexOf(param);
	if (n < 0) {
		return param + defval}
	else	{
		ss1 = str.substr(n+param.length);
		n = ss1.indexOf(",");
		if (n < 0) 
			{return param + ss1}
		else	
			{return param + ss1.substr(0, n)}
		}
}

function clsAllW(){
	if (typeof(newWin)!='undefined'){window.newWin.close()}
	if (typeof(figWin)!='undefined'){window.figWin.close()}
	if (typeof(bacWin)!='undefined'){window.bacWin.close()}
	if (typeof(didWin)!='undefined'){window.didWin.close()}
	if (typeof(did2Win)!='undefined'){window.did2Win.close()}
	if (typeof(wimm)!='undefined'){window.wimm.close()}
	if (typeof(ordIcoh)!='undefined'){window.ordIcoh.close()}
}

function mostramenu(menuid){
 nascondimenu();
    if (document.getElementById)
    {
	p = document.getElementById(menuid);
	p.style.visibility = 'visible';
    }
    else if (document.layers)
    {
	document.layers[menuid].visibility = 'show';
    }
    else if (document.all)
    {
     	eval("document.all." + menuid + ".style.visibility = 'visible'");
     }
}

function nascondimenu() {
    if (document.getElementById)
    {
	p = document.getElementById('men1'); p.style.visibility = 'hidden';
	p = document.getElementById('men2'); p.style.visibility = 'hidden';
	p = document.getElementById('men3'); p.style.visibility = 'hidden';
	p = document.getElementById('men4'); p.style.visibility = 'hidden';
	p = document.getElementById('men5'); p.style.visibility = 'hidden';
	p = document.getElementById('men6'); p.style.visibility = 'hidden';
    }
    else if (document.layers)
    {
	document.layers["men1"].visibility = "hidden";
	document.layers["men2"].visibility = "hidden";
	document.layers["men3"].visibility = "hidden";
	document.layers["men4"].visibility = "hidden";
	document.layers["men5"].visibility = "hidden";
	document.layers["men6"].visibility = "hidden";
    }
    else if (document.all)
    {
     	document.all.men1.style.visibility = 'hidden'
     	document.all.men2.style.visibility = 'hidden'
     	document.all.men3.style.visibility = 'hidden'
     	document.all.men4.style.visibility = 'hidden'
     	document.all.men5.style.visibility = 'hidden'
     	document.all.men6.style.visibility = 'hidden'
     }
 return true;
}

function lll_set(){
 if (document.getElementById) {
	ttt = document.createTextNode(lll[lll_first]);
	p = document.getElementById('lll_b1'); p.replaceChild(ttt, p.childNodes[0]) ;
	ttt = document.createTextNode(lll[lll_first+1]);
	p = document.getElementById('lll_b2'); p.replaceChild(ttt, p.childNodes[0]) ;
	ttt = document.createTextNode(lll[lll_first+2]);
	p = document.getElementById('lll_b3'); p.replaceChild(ttt, p.childNodes[0]) ;
	ttt = document.createTextNode(lll[lll_first+3]);
	p = document.getElementById('lll_b4'); p.replaceChild(ttt, p.childNodes[0]) ;
	ttt = document.createTextNode(lll[lll_first+4]);
	p = document.getElementById('lll_b5'); p.replaceChild(ttt, p.childNodes[0]) ;
	ttt = document.createTextNode(lll[lll_first+5]);
	p = document.getElementById('lll_b6'); p.replaceChild(ttt, p.childNodes[0]) ;
	}
 else	{
	lll_b1.Text = lll[lll_first];
	lll_b2.Text = lll[lll_first+1];
	lll_b3.Text = lll[lll_first+2];
	lll_b4.Text = lll[lll_first+3];
	lll_b5.Text = lll[lll_first+4];
	lll_b6.Text = lll[lll_first+5];
	}
}

function lll_salta(ii){
	document.location = 'sezioni.asp?nsez0=1&nsez=' + (parseInt(ii) + lll_first - 1)
}