


















// --------------------------------------------------------------------------------------------------------------------
function showhide(pageelement) {
	if (document.getElementById('visibile').value == 'si')
	{
		document.getElementById(pageelement).style.display = 'none';
		document.getElementById('visibile').value = 'no';
	} else {
		document.getElementById(pageelement).style.display = '';
		document.getElementById('visibile').value = 'si';
	}
}


today=new Date()
var dateto=new Date(today.getFullYear(), 5, 26)//0,xx=gennaio
if (today.getMonth()==7 && today.getDate()>26)
dateto.setFullYear(dateto.getFullYear()+1)
var one_day=1000*60*60*24


function OpenLink(LinkToOpen) {
	document.location.href = LinkToOpen;
}


function ApriFile(UrlFile){
	var wh = 500
	var hh = 500
	var winl = (screen.width - wh) / 2;
	var wint = (screen.height - hh) / 2;
	window.open(UrlFile,"FilPre","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width="+wh+",height="+hh+",top="+wint+",left="+winl+"");
}









// FORM SEND ----------------------------------------------------------------------------------------------------------
function ValidLength(item, len) 
{	
	return(item.length >=len);
}

function ValidEmail(item)
{	
	if(!ValidLength(item,5)) return false;
	if(item.indexOf('@',0) == -1) return false;
	if(item.indexOf('.',0) == -1) return false;
	if(item.indexOf(',',0) > 0) return false;
	return true;	
}

function SendGutscheinDE()
{	
	errfound = false;
	
	if (!ValidLength(document.FrmGut.TxtWert.value,3))
		error(document.FrmGut.TxtWert,"Bitte geben Sie den Wert des Gutscheines ein.");
	if (!ValidLength(document.FrmGut.TxtVorname.value,3))
		error(document.FrmGut.TxtVorname,"Bitte geben Sie Ihren Vornamen ein.");
	if (!ValidLength(document.FrmGut.TxtNachname.value,3))
		error(document.FrmGut.TxtNachname,"Bitte geben Sie Ihren Nachnamen ein.");
	if (!ValidLength(document.FrmGut.TxtTel.value,6))
		error(document.FrmGut.TxtTel,"Bitte geben Sie Ihre Telefonnummer ein.");
	if (!ValidEmail(document.FrmGut.TxtMail.value))
		error(document.FrmGut.TxtMail, "Bitte geben Sie Ihre E-Mail Adresse ein.");
	if (document.FrmGut.TxtPrivacy.checked == 0)
		error(document.FrmGut.TxtPrivacy,"Sie müssen die Bedingungen des Gesetzes 675/96\nüber die Behandlung der persönlichen Daten\nzustimmen.");
	if (errfound == false)
		{
			document.FrmGut.TxtCheck03.value = 'validato';
			document.FrmGut.BtnSend.disabled = true;
			document.FrmGut.BtnSend.value = 'Ihre Anfrage wird gesendet...';
			document.FrmGut.submit();
		}
}

function SendGutscheinIT()
{	
	errfound = false;
	
	if (!ValidLength(document.FrmGut.TxtWert.value,3))
		error(document.FrmGut.TxtWert,"Inserire il valore del buono.");
	if (!ValidLength(document.FrmGut.TxtVorname.value,3))
		error(document.FrmGut.TxtVorname,"Inserire il proprio nome.");
	if (!ValidLength(document.FrmGut.TxtNachname.value,3))
		error(document.FrmGut.TxtNachname,"Inserire il proprio cognome.");
	if (!ValidLength(document.FrmGut.TxtTel.value,6))
		error(document.FrmGut.TxtTel,"Inserire il proprio numero telefonico.");
	if (!ValidEmail(document.FrmGut.TxtMail.value))
		error(document.FrmGut.TxtMail, "Inserire il proprio indirizzo e-mail.");
	if (document.FrmGut.TxtPrivacy.checked == 0)
		error(document.FrmGut.TxtPrivacy,"Per proseguire è necessario acconsentire il trattamento dei dati personali.");
	if (errfound == false)
		{
			document.FrmGut.TxtCheck03.value = 'validato';
			document.FrmGut.BtnSend.disabled = true;
			document.FrmGut.BtnSend.value = 'Invio in corso...';
			document.FrmGut.submit();
		}
}

function SendGutscheinFR()
{	
	errfound = false;
	
	if (!ValidLength(document.FrmGut.TxtWert.value,3))
		error(document.FrmGut.TxtWert,"S\'il vous plaît entrez la valeur du bon.");
	if (!ValidLength(document.FrmGut.TxtVorname.value,3))
		error(document.FrmGut.TxtVorname,"Insérer le propre prénom.");
	if (!ValidLength(document.FrmGut.TxtNachname.value,3))
		error(document.FrmGut.TxtNachname,"Insérer le propre nom.");
	if (!ValidLength(document.FrmGut.TxtTel.value,6))
		error(document.FrmGut.TxtTel,"S\'il vous plaît entrer votre numéro de téléphone.");
	if (!ValidEmail(document.FrmGut.TxtMail.value))
		error(document.FrmGut.TxtMail, "Insérer le propre e-mail.");
	if (document.FrmGut.TxtPrivacy.checked == 0)
		error(document.FrmGut.TxtPrivacy,"Pour continuer est nécessaire consentir le traitement des données personnelles.");
	if (errfound == false)
		{
			document.FrmGut.TxtCheck03.value = 'validato';
			document.FrmGut.BtnSend.disabled = true;
			document.FrmGut.BtnSend.value = 'Votre demande sera envoyée ...';
			document.FrmGut.submit();
		}
}

function SendGutscheinEN()
{	
	errfound = false;
	
	if (!ValidLength(document.FrmGut.TxtWert.value,3))
		error(document.FrmGut.TxtWert,"Please enter the amount of the gift certificate.");
	if (!ValidLength(document.FrmGut.TxtVorname.value,3))
		error(document.FrmGut.TxtVorname,"Please enter your name.");
	if (!ValidLength(document.FrmGut.TxtNachname.value,3))
		error(document.FrmGut.TxtNachname,"Please enter you surname.");
	if (!ValidLength(document.FrmGut.TxtTel.value,6))
		error(document.FrmGut.TxtTel,"Please enter your phone number.");
	if (!ValidEmail(document.FrmGut.TxtMail.value))
		error(document.FrmGut.TxtMail, "Please enter you e-mail address.");
	if (document.FrmGut.TxtPrivacy.checked == 0)
		error(document.FrmGut.TxtPrivacy,"To continue you must agree to our privacy policy.");
	if (errfound == false)
		{
			document.FrmGut.TxtCheck03.value = 'validato';
			document.FrmGut.BtnSend.disabled = true;
			document.FrmGut.BtnSend.value = 'Sending your request...';
			document.FrmGut.submit();
		}
}


function error(elem, text)
{	
	if (errfound) return;
	window.alert(text)
	elem.select();
	elem.focus;
	errfound = true;
}



function caldal(){
	if(self.gfPop)gfPop.fPopCalendar(document.FrmBook.BookDal);
	return false;
}


function calal(){
	if(self.gfPop)gfPop.fPopCalendar(document.FrmBook.BookAl);
	return false;
}


function SendKarriereDE()
{	
	errfound = false;
	
	if (!ValidLength(document.FrmKarriere.TxtVorname.value,3))
		error(document.FrmKarriere.TxtVorname,"Bitte geben Sie Ihren Vornamen ein.");
	if (!ValidLength(document.FrmKarriere.TxtNachname.value,3))
		error(document.FrmKarriere.TxtNachname,"Bitte geben Sie Ihren Nachnamen ein.");
	if (!ValidLength(document.FrmKarriere.TxtGeburtsdatum.value,6))
		error(document.FrmKarriere.TxtGeburtsdatum,"Bitte geben Sie Ihr Geburtsdatum ein.");
	if (!ValidLength(document.FrmKarriere.TxtFamilienstand.value,3))
		error(document.FrmKarriere.TxtFamilienstand,"Bitte geben Sie Ihren Familienstand ein.");
	if (!ValidLength(document.FrmKarriere.TxtNationalitat.value,3))
		error(document.FrmKarriere.TxtNationalitat,"Bitte geben Sie Ihre Nationalität ein.");
	if (!ValidLength(document.FrmKarriere.TxtStadt.value,3))
		error(document.FrmKarriere.TxtStadt,"Bitte geben Sie Ihre Stadt ein.");
	if (!ValidLength(document.FrmKarriere.TxtPlz.value,3))
		error(document.FrmKarriere.TxtPlz,"Bitte geben Sie Ihre PLZ ein.");
	if (!ValidLength(document.FrmKarriere.TxtLand.value,3))
		error(document.FrmKarriere.TxtLand,"Bitte geben Sie Ihr Land ein.");
	if (!ValidEmail(document.FrmKarriere.TxtMail.value))
		error(document.FrmKarriere.TxtMail, "Bitte geben Sie Ihre E-Mail Adresse ein.");
	if (!ValidLength(document.FrmKarriere.TxtLebenslauf.value,5))
		error(document.FrmKarriere.TxtLebenslauf,"Bitte fügen Sie Ihren Lebenslauf hinzu.");
	if (!ValidLength(document.FrmKarriere.TxtBild.value,5))
		error(document.FrmKarriere.TxtBild,"Bitte fügen Sie Ihr Portrait hinzu.");

	if (document.FrmKarriere.TxtPrivacy.checked == 0)
		error(document.FrmKarriere.TxtPrivacy,"Sie müssen die Bedingungen des Gesetzes 675/96\nüber die Behandlung der persönlichen Daten\nzustimmen.");
	if (errfound == false)
		{
			//document.getElementById('hidepage').style.visibility = 'visible';
			//document.getElementById('hidepage').style.display = '';
			document.FrmKarriere.TxtCheck03.value = 'validato';
			document.FrmKarriere.BtnSend.disabled = true;
			document.FrmKarriere.BtnSend.value = '-----------------------------\nIhre Bewerbung wird gesendet...\nBitte warten...\n-----------------------------';
			document.FrmKarriere.submit();
		}
}



function SendKarriereIT()
{	
	errfound = false;
	
	if (!ValidLength(document.FrmKarriere.TxtVorname.value,3))
		error(document.FrmKarriere.TxtVorname,"Inserire il proprio nome.");
	if (!ValidLength(document.FrmKarriere.TxtNachname.value,3))
		error(document.FrmKarriere.TxtNachname,"Inserire il proprio cognome.");
	if (!ValidLength(document.FrmKarriere.TxtGeburtsdatum.value,6))
		error(document.FrmKarriere.TxtGeburtsdatum,"Inserire la propria data di nascita.");
	if (!ValidLength(document.FrmKarriere.TxtFamilienstand.value,3))
		error(document.FrmKarriere.TxtFamilienstand,"Inserire il proprio stato civile.");
	if (!ValidLength(document.FrmKarriere.TxtNationalitat.value,3))
		error(document.FrmKarriere.TxtNationalitat,"Inserire la propria nazionalità.");
	if (!ValidLength(document.FrmKarriere.TxtStadt.value,3))
		error(document.FrmKarriere.TxtStadt,"Inserire il nome della città di residenza.");
	if (!ValidLength(document.FrmKarriere.TxtPlz.value,3))
		error(document.FrmKarriere.TxtPlz,"Inserire il proprio CAP di residenza.");
	if (!ValidLength(document.FrmKarriere.TxtLand.value,3))
		error(document.FrmKarriere.TxtLand,"Inserire il nome del paese di residenza.");
	if (!ValidEmail(document.FrmKarriere.TxtMail.value))
		error(document.FrmKarriere.TxtMail, "Inserire il proprio indirizzo E-Mail.");
	if (!ValidLength(document.FrmKarriere.TxtLebenslauf.value,5))
		error(document.FrmKarriere.TxtLebenslauf,"Inserire il proprio curriculum.");
	if (!ValidLength(document.FrmKarriere.TxtBild.value,5))
		error(document.FrmKarriere.TxtBild,"Inserire una foto.");

	if (document.FrmKarriere.TxtPrivacy.checked == 0)
		error(document.FrmKarriere.TxtPrivacy,"Per proseguire è necessario acconsentire il trattamento dei dati personali.");
	if (errfound == false)
		{
			//document.getElementById('hidepage').style.visibility = 'visible';
			//document.getElementById('hidepage').style.display = '';
			document.FrmKarriere.TxtCheck03.value = 'validato';
			document.FrmKarriere.BtnSend.disabled = true;
			document.FrmKarriere.BtnSend.value = '-----------------------------\nLa sua richiesta sta per essere inviata...\nAttendere prego...\n-----------------------------';
			document.FrmKarriere.submit();
		}
}



function SendKarriereEN()
{	
	errfound = false;
	
	if (!ValidLength(document.FrmKarriere.TxtVorname.value,3))
		error(document.FrmKarriere.TxtVorname,"Please enter your name.");
	if (!ValidLength(document.FrmKarriere.TxtNachname.value,3))
		error(document.FrmKarriere.TxtNachname,"Please enter your last name.");
	if (!ValidLength(document.FrmKarriere.TxtGeburtsdatum.value,6))
		error(document.FrmKarriere.TxtGeburtsdatum,"Please enter your date of birth.");
	if (!ValidLength(document.FrmKarriere.TxtFamilienstand.value,3))
		error(document.FrmKarriere.TxtFamilienstand,"Please enter your marital status.");
	if (!ValidLength(document.FrmKarriere.TxtNationalitat.value,3))
		error(document.FrmKarriere.TxtNationalitat,"Please enter your nationality.");
	if (!ValidLength(document.FrmKarriere.TxtStadt.value,3))
		error(document.FrmKarriere.TxtStadt,"Please enter the name of your city.");
	if (!ValidLength(document.FrmKarriere.TxtPlz.value,3))
		error(document.FrmKarriere.TxtPlz,"Please enter your ZIP code.");
	if (!ValidLength(document.FrmKarriere.TxtLand.value,3))
		error(document.FrmKarriere.TxtLand,"Please enter the name of your country.");
	if (!ValidEmail(document.FrmKarriere.TxtMail.value))
		error(document.FrmKarriere.TxtMail, "Please enter your e-mail address.");
	if (!ValidLength(document.FrmKarriere.TxtLebenslauf.value,5))
		error(document.FrmKarriere.TxtLebenslauf,"Please attach your curriculum.");
	if (!ValidLength(document.FrmKarriere.TxtBild.value,5))
		error(document.FrmKarriere.TxtBild,"Please attach your picture.");

	if (document.FrmKarriere.TxtPrivacy.checked == 0)
		error(document.FrmKarriere.TxtPrivacy,"To continue you must agree to our privacy policy.");
	if (errfound == false)
		{
			//document.getElementById('hidepage').style.visibility = 'visible';
			//document.getElementById('hidepage').style.display = '';
			document.FrmKarriere.TxtCheck03.value = 'validato';
			document.FrmKarriere.BtnSend.disabled = true;
			document.FrmKarriere.BtnSend.value = '-----------------------------\nSending your request...\nPlease wait...\n-----------------------------';
			document.FrmKarriere.submit();
		}
}



function SendKarriereFR()
{	
	errfound = false;
	
	if (!ValidLength(document.FrmKarriere.TxtVorname.value,3))
		error(document.FrmKarriere.TxtVorname,"Insérer le propre prénom.");
	if (!ValidLength(document.FrmKarriere.TxtNachname.value,3))
		error(document.FrmKarriere.TxtNachname,"Insérer le propre nom.");
	if (!ValidLength(document.FrmKarriere.TxtGeburtsdatum.value,6))
		error(document.FrmKarriere.TxtGeburtsdatum,"Insérer le propre date de naissance.");
	if (!ValidLength(document.FrmKarriere.TxtFamilienstand.value,3))
		error(document.FrmKarriere.TxtFamilienstand,"Insérer le propre état civil.");
	if (!ValidLength(document.FrmKarriere.TxtNationalitat.value,3))
		error(document.FrmKarriere.TxtNationalitat,"Insérer le propre nationalité.");
	if (!ValidLength(document.FrmKarriere.TxtStadt.value,3))
		error(document.FrmKarriere.TxtStadt,"Insérer le propre ville.");
	if (!ValidLength(document.FrmKarriere.TxtPlz.value,3))
		error(document.FrmKarriere.TxtPlz,"Insérer le propre CP.");
	if (!ValidLength(document.FrmKarriere.TxtLand.value,3))
		error(document.FrmKarriere.TxtLand,"Insérer le propre pays.");
	if (!ValidEmail(document.FrmKarriere.TxtMail.value))
		error(document.FrmKarriere.TxtMail, "Insérer le propre e-mail.");
	if (!ValidLength(document.FrmKarriere.TxtLebenslauf.value,5))
		error(document.FrmKarriere.TxtLebenslauf,"Insère le propre curriculum.");
	if (!ValidLength(document.FrmKarriere.TxtBild.value,5))
		error(document.FrmKarriere.TxtBild,"Insère le propre photo.");

	if (document.FrmKarriere.TxtPrivacy.checked == 0)
		error(document.FrmKarriere.TxtPrivacy,"Pour continuer est nécessaire consentir le traitement des données personnelles.");
	if (errfound == false)
		{
			//document.getElementById('hidepage').style.visibility = 'visible';
			//document.getElementById('hidepage').style.display = '';
			document.FrmKarriere.TxtCheck03.value = 'validato';
			document.FrmKarriere.BtnSend.disabled = true;
			document.FrmKarriere.BtnSend.value = '-----------------------------\nSending your request...\nPlease wait...\n-----------------------------';
			document.FrmKarriere.submit();
		}
}
