function conferma_cancellazione(id,tabella,testo,ritorno) {
	if (confirm(testo)) {
			document.location="azione-eliminaoggetto.php?Tabella="+tabella+"&Id="+id+"&Ritorno="+ritorno;
	}
}

function cambiaordine(id,tabella,where,valore,ritorno) {
	if (where!="") {
		w="&campo="+where+"&valore="+valore;
	}
	document.location="azione-cambiaordine.php?Tabella="+tabella+"&Id="+id.name+"&Nuovoordine="+id.options[id.selectedIndex].value+""+w+"&Ritorno="+ritorno
}

function anteprima() {
	document.formcontenutitestuali.target="_blank"
	document.formcontenutitestuali.action="/anteprima.php"
	document.formcontenutitestuali.submit()
	document.formcontenutitestuali.target="_self"
	document.formcontenutitestuali.action="azione-gestionecontenutitestuali.php"
}

function apri_chiudi(cosa) {
	alert (cosa.options[cosa.selectedIndex].value)
}
function mostra(cosa,quale,quante) {
		for (i=0;i<quante;i++) {
			document.getElementById(cosa+"_"+i).style.display="none";  
		}
	document.getElementById(cosa+"_"+quale).style.display="block";
}

function flash(qualeid,qualeswf,lunghezza,altezza,array_chiavi,array_valori) {
		var foxv = new FlashObject("/swf/"+qualeswf+".swf", "MEDULAX", lunghezza, altezza, "8", "#EDEDED");
		for (cont_i=0;cont_i<array_chiavi.length;cont_i++) {
				foxv.addVariable(array_chiavi[cont_i], array_valori[cont_i]);
		}
	
		foxv.addVariable("flashVarText", "w3c");
		foxv.addParam("scale", "noscale");
		foxv.addParam("menu", "false");
		foxv.addParam("wmode", "transparent");
		foxv.write(qualeid); 
}
function vaiajax(scriptUrl)  { 

	var AJAX = null; 
		if (window.XMLHttpRequest) {
			AJAX = new XMLHttpRequest();
		} else {
			if (window.ActiveXObject) {
				 AJAX = new ActiveXObject('MSXML2.XMLHTTP.3.0');
			}
		}
	        AJAX.onreadystatechange = function() { 
				if (AJAX.readyState == 4 && AJAX.status == 200) { 
					eval(AJAX.responseText);
				} 
			} 
	AJAX.open("GET", scriptUrl, true); 
	AJAX.send(null); 
}                                  
function vaiajax2(num)  { 

	var AJAX = null; 
		if (window.XMLHttpRequest) {
			AJAX = new XMLHttpRequest();
		} else {
			if (window.ActiveXObject) {
				 AJAX = new ActiveXObject('MSXML2.XMLHTTP.3.0');
			}
		}
	        AJAX.onreadystatechange = function() { 
				if (AJAX.readyState == 4 && AJAX.status == 200) { 
					eval(AJAX.responseText);
				} 
			} 
	AJAX.open("GET", "calendario.php?Giorno="+num, true); 
	AJAX.send(null); 
}                                  
commento_v=0
	function vedi(che) {
			document.getElementById('commento').style.display='none';
			document.getElementById('passa_parola').style.display='none';
			document.getElementById(che).style.display='block';
	}
	//vedi('spot-intro');
	//vedi('senegal');
	function stampa() {
		window.open("/stampa.php?Idarticolo=&Idsottomenu=&Idmenuprincipale=&Percorso=","_blank","width=800,height=600,scrollbars=yes")
	}
	
	function popupform(myform, windowname)
	{
	if	(document.getElementById('bot-control').value.toLowerCase()=='landon') {
		if (! window.focus)return true;
		window.open('', windowname, 'height=200,width=400,scrollbars=no');
		myform.target=windowname;
		document.getElementById('commento').style.display='none';
		document.getElementById('passaparola').style.display='none';
		return true;
	} else {
		alert ('Il testo dell\'antispam non coincide ');
		document.getElementById('bot-control').focus()
		document.getElementById('bot-control').value=''
		return false;
	}
	}



