var checkobj

function leggi(el){
	checkobj=el
	if (document.all||document.getElementById){
		for (i=0;i<checkobj.form.length;i++){ 
		var tempobj=checkobj.form.elements[i]
		if(tempobj.value.toLowerCase()=="autorizzo")
		tempobj.disabled=!checkobj.checked
		if(tempobj.value.toLowerCase()=="non autorizzo")
		tempobj.disabled=!checkobj.checked
		}
	}
}

function autorizza(el){
	checkobj=el
	if (document.all||document.getElementById){
		for (i=0;i<checkobj.form.length;i++){ 
		var tempobj=checkobj.form.elements[i]
		if(tempobj.value.toLowerCase()=="accetta")
		tempobj.disabled=!checkobj.checked
		}
	}
}

function autorizzap(el){
	checkobj=el
	if (document.all||document.getElementById){
		for (i=0;i<checkobj.form.length;i++){ 
		var tempobj=checkobj.form.elements[i]
		if(tempobj.value.toLowerCase()=="accetta")
		tempobj.disabled=!checkobj.checked
		if(tempobj.value.toLowerCase()=="invia")
		tempobj.disabled=!checkobj.checked
		}
	}
}

function nonautorizza(el){
	checkobj=el
	if (document.all||document.getElementById){
		for (i=0;i<checkobj.form.length;i++){ 
		var tempobj=checkobj.form.elements[i]
		if(tempobj.value.toLowerCase()=="accetta")
		tempobj.disabled=!checkobj.unchecked
		if(tempobj.value.toLowerCase()=="registrati")
		tempobj.disabled=!checkobj.unchecked
		}
	}
}

function nonautorizzap(el){
	checkobj=el
	if (document.all||document.getElementById){
		for (i=0;i<checkobj.form.length;i++){ 
		var tempobj=checkobj.form.elements[i]
		if(tempobj.value.toLowerCase()=="accetta")
		tempobj.disabled=!checkobj.unchecked
		if(tempobj.value.toLowerCase()=="invia")
		tempobj.disabled=!checkobj.unchecked
		}
	}
}

function accetta(el){
	checkobj=el
	if (document.all||document.getElementById){
		for (i=0;i<checkobj.form.length;i++){ 
		var tempobj=checkobj.form.elements[i]
		if(tempobj.value.toLowerCase()=="registrati")
		tempobj.disabled=!checkobj.checked
		}
	}
}


function impostaaccetta(el){
	if (!document.all&&!document.getElementById){
	if (window.checkobj&&checkobj.checked)
		return true
		else{
		alert("Accetta le condizioni di utilizzo")
		return false
		}
	}
}

function main(str) {
        searchWin = window.open(str,'main','scrollbars=no,resizable=no,width=400,height=200,status=no,location=no,toolbar=no');
}

function audio(flusso)
{ 
	window.open("/utilita/ascolta.asp?immagine=" + flusso + "&","mywindow","scrollbars=yes,resizable=no,width=645,height=135,status=no,location=no,toolbar=no");
}
function audiowmp()
  { 
	 window.open("/utilita/ascoltawmp.asp","mywindow","scrollbars=yes,resizable=no,width=645,height=135,status=no,location=no,toolbar=no");
  }

function ImmagineGrande(immagine)
	{
	img = new Image;
	immagine = "/public/immagini/articoli/" + immagine;
	img.src = immagine;


	html = '<HTML>\n<HEAD>\n<TITLE>Immagine</TITLE>\n</HEAD>\n<BODY bgcolor=#cccc99 LEFTMARGIN=0 MARGINWIDTH=0 TOPMARGIN=0 MARGINHEIGHT=0>\n&nbsp;\n<CENTER><IMG SRC="'+immagine+'" BORDER=1 NAME=immagine onLoad="window.resizeTo(document.immagine.width+30,document.immagine.height+120)">\n<a  href="javascript:window.close()">chiudi questa finestra</a>\n</CENTER>\n</BODY>\n</HTML>';

	popupImage = window.open('','_blank','status=0,toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=0,top=50,left=50');
	popupImage.document.open();
	popupImage.document.write(html);
	popupImage.document.close()
	};
function ImmagineGrandeT(immagine)
	{
	img = new Image;
	immagine = "/public/immagini/articoli/" + immagine;
	img.src = immagine;


	html = '<HTML>\n<HEAD>\n<TITLE>Immagine</TITLE>\n</HEAD>\n<BODY bgcolor=#cccc99 LEFTMARGIN=0 MARGINWIDTH=0 TOPMARGIN=0 MARGINHEIGHT=0>\n&nbsp;\n<CENTER><IMG SRC="'+immagine+'" BORDER=1 NAME=immagine >\n<a  href="javascript:window.close()">chiudi questa finestra</a>\n</CENTER>\n</BODY>\n</HTML>';

	popupImage = window.open('','_blank','status=0,toolbar=0,location=0,directories=0,menuBar=0,scrollbars=1,resizable=1,top=50,left=50');
	popupImage.document.open();
	popupImage.document.write(html);
	popupImage.document.close()
	};
function right(e) {
if (navigator.appName == 'Netscape' &&
(e.which == 3 || e.which == 2))
return false;
else if (navigator.appName == 'Microsoft Internet Explorer' &&
(event.button == 2 || event.button == 3)) {
alert("Tutto il materiale contenuto nel sito e' protetto. E' VIETATA LA RIPRODUZIONE, anche parziale, se non preventivamente autorizzata.");
return false;
}
return true;
}

document.onmousedown=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=right;

