<!-- funzione mail antispam -->
function mail_no_spam(user,dominio) 
    { 
        document.location.href = "mailto:" + user + "@" + dominio; 
    }
<!-- fine funzione mail antispam -->

function mostra(livello){
	$('#'+livello).toggle();
}
<!-- stampa
function printit() {
        var NS = (navigator.appName == "Netscape");
        var IE = (navigator.appName == "IE");
        var VERSION = parseInt(navigator.appVersion);

        if (VERSION > 3) {
//              if (NS) {
                if (window.print) {
                    window.print() ;  
                } else {
                    var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
                        document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
                        WebBrowser1.ExecWB(6, 2); //Use a 1 vs. a 2 for a prompting dialog box    
                        WebBrowser1.outerHTML = "";  
                }
        }
//        self.close();
}
//-->

// PREVIENE SUBMIT AL FORM MULTIPLI
var submitDone = false;

function submitForm(myForm, button, action, target, msgOK) {   
  if (!submitDone) {
		submitDone = true;
		button.disabled = true;

		$('#loadingbtn').show();
		
		// legge le variabili del form
		var inputs = []; 
		$(':input', myForm).each(function() { 
			if (this.type=="checkbox") { // se è una checkbox
				if (this.checked==true) inputs.push(this.name + '=' + escape(this.value)); 
			} 
			else if (this.type=="radio") { // se è un radio button
				if (this.checked==true) inputs.push(this.name + '=' + escape(this.value)); 
			} 
			else { // è un campo testo
				inputs.push(this.name + '=' + escape(this.value)); 
			} 
		})
		var parametri = inputs.join('&'); 
		//alert("Parametri: "+parametri);
		$.ajax(
		{
			type: "POST",
			url: action,
			data: parametri,
			success: function(msg)
			{
				if (msg=='OK') {
					$('#loadingbtn').hide();
					$('#'+target).html('<p>'+msgOK+'</p>');
					return true;
				}
				else {
					$('#loadingbtn').hide();
					alert(msg);
					button.disabled = false;
					submitDone = false;
					return false;
				}
			},
			error: function() {
					$('#loadingbtn').hide();
					alert("<? echo _erroregenerico; ?>");
					return false;
			}				
		}
		);
  } else return false;
}
function seleziona(myForm, campo, action, target) {   
		// se legge il codice o la descrizione
		var codice = false;
		// legge le variabili del form
		var parametri = "p="+campo.value;
		if (codice==true) parametri = parametri + "&c=1"; else parametri = parametri + "&c=0";
		$.ajax(
		{
			type: "POST",
			url: action,
			data: parametri,
			success: function(msg)
			{
					$('#'+target).html(msg);
			},
			error: function() {
					alert("<? echo _erroregenerico; ?>");
			}				
		}
		);
}
function checkifitaly(campo) {   
$('#codiceregione').val('');
$('#codiceprovincia').val('');
$('#codicecomune').val('');
$('#city').val('');
if (campo.value!="IT") {
		$('#regione').hide();
		$('#provincia').hide();
		$('#comune').hide();
		$('#city').show();

}
else {
		$('#regione').show();
		$('#provincia').show();
		$('#comune').show();
		$('#city').hide();
}
}
function azzera(target) {   
$('#'+target).html('');
}
function show(target) {   
$('#'+target).show();
}
function nascondi(target) {   
$('#'+target).hide();
}


<!--comuni province regioni-->

// Ottieni la base url
url = document.location.href;
xend = url.lastIndexOf("/") + 1;
var base_url = url.substring(0, xend);

function chiama_ajax(url,campo) {
        
		var parametri = "?p="+campo.value;
		
		//Inizia l'url con http?
        if (url.substring(0, 4) != 'http') {
                url = base_url + url;
        }

		url = url + parametri;
		
        // Crea un nuovo elemento JS
        var jsel = document.createElement('SCRIPT');
        jsel.type = 'text/javascript';
        jsel.src = url;

        //Appende l'elemento JS e quindi esegue la 'chiamata AJAX')
        document.body.appendChild (jsel);
}
<!--comuni province regioni-->


