// JavaScript Documentvar isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;// Gestisce tutti i messaggi FSCommand in un filmato Flashfunction menu_DoFSCommand(command, args) {	var menuObj = isInternetExplorer ? document.all.menu : document.menu;	//	// Inserire il codice qui.	//	if ( command == "seleziona" ) {		sel(args);	}}// Hook per Internet Explorerif (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {	document.write('<script language=\"VBScript\"\>\n');	document.write('On Error Resume Next\n');	document.write('Sub menu_FSCommand(ByVal command, ByVal args)\n');	document.write('	Call menu_DoFSCommand(command, args)\n');	document.write('End Sub\n');	document.write('</script\>\n');}function NewWindow(mypage, myname, w, h) {	var winl = (screen.width - w) / 2;	var wint = (screen.height - h) / 2;	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',toolbar=0,location=0,directories=0,status=no,menubar=no,scrollbars=0,resizable=0';	win = window.open(mypage, myname, winprops);	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }}function init() {	document.finestra.location.href = "home.html";	document.getElementById("homes").style.color="#FF0000";	}function sel(par) {	var ids = new Array("homes", "chisiamo", "cosafacciamo", "cast", "clienti", "portfolio", "preventivi", "contatti", "faq", "mappa");	//						0		1				2			3		4			5				6			7		 8		9	document.getElementById(par.id).style.color="#FF0000";	for (i=0;i<=9;i++) {		if (ids[i]!=par.id) {			document.getElementById(ids[i]).style.color="#FFFFFF";			//className = "normale";			//cambiare script in modo da assegnare una classe o ID di css						//MANDARE L'ID A FLASH per animazione....			//document.myFlash.setVariable...					}	}}/*	function comm_DoFSCommand(command, args){ 	if ( command == "seleziona" ) {		sel(args);	}}*///#### JS PER FORM ##########function conferma() {	return confirm("Sei sicuro di voler\ncaricare l'aggiornamento?");}function elimina(chi) {		document.elimina.id.value=chi;		if(confirm("Sicuro di voler eliminare l'oggetto? id="+chi)){			document.elimina.submit();				}}	function modifica(chi) {//	alert("Funzione non ancora disponibile..");	document.modifica.id.value=chi;		if(confirm("Vuoi modificare l'oggetto? id="+chi)){			document.modifica.submit();				}}function evidenzia(chi) {//	alert("Funzione non ancora disponibile..");	document.evidenzia.id.value=chi;		if(confirm("Vuoi mettere nel menù la manifestazione? id="+chi)){			document.evidenzia.submit();				}}	/*function nascondi(nome) {	if (document.getElementById(nome).style.display=="block") {		document.getElementById(nome).style.display = "none";	}else{		document.getElementById(nome).style.display = "block";	}}*/function nascondi(nome) {nome2=nome+"a";	if (document.getElementById(nome).style.display=="block") {		document.getElementById(nome).style.display = "none";		document.getElementById(nome2).style.display = "block";	}else{		document.getElementById(nome).style.display = "block";		document.getElementById(nome2).style.display = "none";	}}function controllaNum(ff) {// || parseInt(ff.value)<0 ||  parseInt(ff.value) > 999999	if (isNaN(ff.value) || ff.value==" ") {		alert("Inserire un valore numerico, prego...");		ff.value="";		ff.focus();	}}function controllaMail(ff){	if (ff.value!="") {   		var i=new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$");   		if(!i.test(ff.value)) {			alert("Il campo EMAIL non è valido.");			ff.value="";			ff.value.focus();		}	}}function cambia_form(valore) {		document.getElementById("homenews").style.display="none";		document.getElementById("flashnews").style.display="none";		document.getElementById("link").style.display="none";		document.getElementById("mani").style.display="none";		document.getElementById("associazione").style.display="none";		document.getElementById("class").style.display="none";		document.getElementById("moduli").style.display="none";		document.getElementById("header").style.display="none";		document.getElementById("pig").style.display="none";				document.getElementById(valore).style.display="block";}function cambia_form_pig(valore) {		document.getElementById("pig_informazioni").style.display="none";		document.getElementById("pig_attivita").style.display="none";		document.getElementById("pig_iscritti").style.display="none";				document.getElementById(valore).style.display="block";}/*Solo per checkbox...abilita() solo su chkbx di altrofunction abilita() { if(document.form.altro.checked) {		document.form.altro_t.disabled = false;	}else{		document.form.altro_t.disabled = true;	}}*/function abilita(valore) { if(valore!="altro") {		document.form.altro_t.disabled = true;	}else{		document.form.altro_t.disabled = false;	}}function convalidaForm() {	var ErrorMsg = "Impossibile continuare!\nCompilare tutti i campi obbligatori!"	var convalida = true;	if (document.form.agz.value=="") {		convalida = false;	}	if (document.form.ind.value=="") {		convalida = false;	}	if (document.form.num.value=="") {		convalida = false;	}	if (document.form.cap.value=="") {		convalida = false;	}	if (document.form.cap.value!="" && document.form.cap.value.length<5) {		convalida = false;		ErrorMsg += ("\n\n- controllare CAP (5 cifre)");	}	if (document.form.cit.value=="") {		convalida = false;	}	if (document.form.eml.value=="") {		convalida = false;	}	if (document.form.prv.value=="") {		convalida = false;	}	if (document.form.tel.value=="") {		convalida = false;	}	//CONVALIDA FINALE	if (convalida==false) {			alert(ErrorMsg);			return false;	}else{		return true;	}}var dayNames = new Array("Dom","Lun","Mar","Mer","Gio","Ven","Sab");var monthNames = new Array("Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre");var data = new Date();var anno  = data.getYear();// Y2K compliantif (anno < 1000) anno +=1900;var mese = data.getMonth();mese += 1;var oggi = data.getDate()  + "/" + mese + "/" + anno;function scriviData(aa) {	aa.value = oggi;}