jQuery(window).bind("load", function() {
			jQuery("#coda-slider-1").codaSlider({
				autoHeight: true,
				autoHeightEaseDuration: 1000,
				autoHeightEaseFunction: "easeInOutExpo",
				autoSlide: false,
				autoSlideInterval: 7000,
				autoSlideStopWhenClicked: true,
				crossLinking: true,
				dynamicArrows: true,
				dynamicArrowLeftText: "",
				dynamicArrowRightText: "",
				dynamicTabs: true,
				dynamicTabsAlign: "center",
				dynamicTabsPosition: "top",
				externalTriggerSelector: "a.xtrig",
				firstPanelToLoad: 1,
				panelTitleSelector: "h2.title",
				slideEaseDuration: 1000,
				slideEaseFunction: "easeInOutExpo"
			})
			
			jQuery("#coda-slider").codaSlider({
				autoSlide: true,
        		autoSlideInterval: 4000,
        		autoSlideStopWhenClicked: true
			})
			
		});



function conferma_canc(nome,id,tabella)

	{

		
		
action=confirm('Cliccando OK eliminerai definitivamente questo/a '+nome)

	if (action==true)
	parent.self.location.href = "mod/admin/"+nome+"/elimina.php?id="+id+"&tabella="+tabella;
	
	}
	

	
	
function isnum(obj) {
if (isNaN(obj.value) || parseInt(obj.value)<=0 || parseInt(obj.value) > 9999){
	alert('Nel campo e\' possibile immettere solo numeri maggiori a 0 !');
	obj.value="";
	obj.focus();
	}
	
	
}



function pulisci_campo(c){
	document.getElementById(c).value='';
}

function pulisci_testo(c){
	document.getElementById(c).innerHTML="";
}
function controlla_estensione(campo,permessi) {
	
	path = document.getElementById(campo).value;
	

	
    posizione_punto=path.lastIndexOf(".");
	lunghezza_stringa=path.length;
	estensione=path.substring(posizione_punto+1,lunghezza_stringa);
	//return estensione;
	
	
	estensione=estensione.toLowerCase();
	permessi=permessi.toLowerCase();
	
	
	

	

	
	
	if (permessi.indexOf(estensione)==-1) {
		
	
		window.alert("estensione per il file inserito non corretta");
		document.getElementById(campo).value='';
	}
	//alert(estensione);
	
	
	
}
	



function newsletter() {
if(document.form_newsletter.privacy.checked == true)
	{ 
		document.form_newsletter.submit();
	}else{	
	alert('Devi autorizzare l\'informativa sulla privacy ')
		return false;
	}

	
	


}

