<!--
function selBox(that){
	classe=that.getAttribute('class');
	if(classe===null){
		that.setAttribute('className','foto_hover');
	} else {
		that.setAttribute('class','foto_hover');
	}
}

function unselBox(that){
	classe=that.getAttribute('class');
	if(classe===null){
		that.setAttribute('className','foto');
	} else {
		that.setAttribute('class','foto');
	}
}

var stile = "top=100, left=100, width=600, height=400, status=no, menubar=no, toolbar=no, scrollbar=no";
function Popup(apri) {
	window.open(apri, "", stile);
}

var stilenewsletter = "top=100, left=100, width=500, height=150, toolbar=no,location=no,directories=no,status=no,menubar=no";
function PopupNewsletter(apri) {
	window.open(apri, "Iscrizione", stilenewsletter);
}


function controlla_email(email) {
	if (email!="") {
		re = /^(("[\w-\s]+")|([\w-]+(?:\.[\w-]+)*)|("[\w-\s]+")([\w-]+(?:\.[\w-]+)*))(@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][0-9]\.|1[0-9]{2}\.|[0-9]{1,2}\.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\]?$)/i;
		if ( re.test(email) ) return true
		return false
	} else return true;
}


function Verificanewsletter(lingua){
	
	var error = '';
	var email = document.formnewsletter.email.value;

		if (email.length == 0){
			if(lingua=='it') {
				error = error + 'Specificare l\'indirizzo email.\n'
			}
			if(lingua=='en') {
				error = error + 'Please specify e-mail address.\n'
			}
			if(lingua=='de') {
				error = error + 'Bitte, spezifizieren Sie E-mail Address.\n'
			}
			if(lingua=='pl') {
				error = error + 'Specificare l\'indirizzo email.\n'
			}

		}else{
			if (!controlla_email(email))

				if(lingua=='it') {
					error = error + 'L\'indirizzo email non è stato digitato correttamente.\n'
				}
				if(lingua=='en') {
					error = error + 'The e-mail address is not correct.\n'
				}
				if(lingua=='de') {
					error = error + 'Das E-mail Address ist nicht korrekt.\n'
				}
				if(lingua=='pl') {
					error = error + 'L\'indirizzo email non è stato digitato correttamente.\n'
				}
		}
	
		if (error == ''){
		  
			
			document.formnewsletter.submit();
			return true;
		}else{
			alert(error);
			return false;
		
		}
}


