// ypSlideOutMenu CONFIG
//left, top, width, height
new ypSlideOutMenu("menu1", "down", 237, 109, 190, 170)
new ypSlideOutMenu("menu2", "down", 335, 109, 255, 200)
new ypSlideOutMenu("menu3", "down", 464, 109, 155, 200)
new ypSlideOutMenu("menu4", "down", 535, 109, 205, 200)
ypSlideOutMenu.writeCSS();

///////////// CAMPI INPUT /////////////

var v = new Array();
v["email"] = 'email'; // [nome del campo] = 'descrizione che volete compaia all'interno del campo'
v["password"] = 'password';
v["SearchedTxt"] = 'cerca nel sito';
//v["SearchedTxt"] = '...';

function InputDel(campo) {
	if (campo.value.search(v[campo.name])== 0 ) {
		campo.value= '';
	}	
}

function InputFill(campo) {
	if (campo.value=='') {
		campo.value= v[campo.name];
	}	
}

///////////// CONTROLLO INDIRIZZO NEWSLETTER /////////////

function check_email(theForm) {		
	if (theForm.email.value == "") {
    	alert("Per favore inserire il proprio indirizzo Email, grazie.");
    	theForm.email.focus();
    	return (false);
	}
	if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(theForm.email.value))) {
		alert("Indirizzo E-Mail non valido, si prega di verificarlo.\nGrazie.");
		theForm.email.focus();
		return (false);
	}
}