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 dispY(obj) {
    if (document.getElementById)
	{
	p = document.getElementById(obj);
	p.style.display = '';
	}
    else if (document.layers)
	{
	document.layers[obj].display = '';
	}
    else if (document.all)
	{
     	eval("document.all." + obj + ".style.display = ''");
	}
}
function dispYxx(obj) {
	p = document.getElementById(obj);
	alert(p.style.display );
}
function dispNxx(obj) {
	p = document.getElementById(obj);
	alert(p.style.display );
}
function dispN(obj) {
    if (document.getElementById)
	{
	p = document.getElementById(obj);
	p.style.display = 'none';
	}
    else if (document.layers)
	{
	document.layers[obj].display = 'none';
	}
    else if (document.all)
	{
     	eval("document.all." + obj + ".style.display = 'none'");
	}
}

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=", "800");
	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");
	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(\'' + 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=no,toolbar=no,status=no";
	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(ordIcoh)!='undefined'){window.ordIcoh.close()}
}

