function IncludeJavaScript(jsFile)
{
  document.write('<script type="text/javascript" src="'
    + jsFile + '"></script>'); 
}
IncludeJavaScript('../scr/jquery-1.4.2.min.js');
IncludeJavaScript('../scr/jquery.showcase.2.0.js');
IncludeJavaScript('../scr/fancybox/jquery.mousewheel-3.0.2.pack.js');
IncludeJavaScript('../scr/fancybox/jquery.fancybox-1.3.1.pack.js');

function Open(LinkToOpen) {
	document.location.href = LinkToOpen;

}



function Film(){	myLightWindow.activateWindow({ href: '../img/film.htm', 
		title: 'Eindr&uuml;cke - Impressioni - Impressions', caption: '', type: 'external', width: 540, height: 430 });
}

// FORM ----------------------------------------------------------------------------------------------------------
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 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 sendformDE()
{	
	errfound = false;
	
	if (!ValidLength(document.Form1.TxtNome.value,3))
		error(document.Form1.TxtNome,"Bitte geben Sie Ihren Namen ein.");
	if (!ValidLength(document.Form1.TxtCognome.value,3))
		error(document.Form1.TxtCognome,"Bitte geben Sie Ihren Nachnamen ein.");
	if (!ValidLength(document.Form1.TxtIndirizzo.value,3))
		error(document.Form1.TxtIndirizzo,"Bitte geben Sie Ihre Adresse ein.");
	if (!ValidLength(document.Form1.TxtCap.value,3))
		error(document.Form1.TxtCap,"Bitte geben Sie Ihre PLZ ein.");
	if (!ValidLength(document.Form1.TxtCitta.value,3))
		error(document.Form1.TxtCitta,"Bitte geben Sie den Namen Ihrer Stadt ein.");
	if (!ValidLength(document.Form1.TxtStato.value,3))
		error(document.Form1.TxtStato,"Bitte geben Sie Ihr Land ein.");
	if (!ValidEmail(document.Form1.TxtMail.value))
		error(document.Form1.TxtMail, "Bitte geben Sie Ihre E-Mail Adresse ein.");
	if (document.Form1.TxtAcconsento.checked == 0)
		error(document.Form1.TxtAcconsento,"Sie müssen die Bedingungen des Gesetzes 675/96\nüber die Behandlung der persönlichen Daten\nzustimmen.");
	if (errfound == false)
		{
			document.Form1.TxtCheck03.value = 'validato';
			document.Form1.BtnSend.disabled = true;
			document.Form1.BtnSend.value = 'Ihre Anfrage wird gesendet...';
			document.Form1.submit();
		}
}

function sendformIT()
{	
	errfound = false;
	
	if (!ValidLength(document.Form1.TxtNome.value,3))
		error(document.Form1.TxtNome,"Inserire il proprio nome.");
	if (!ValidLength(document.Form1.TxtCognome.value,3))
		error(document.Form1.TxtCognome,"Inserire il proprio cognome.");
	if (!ValidLength(document.Form1.TxtIndirizzo.value,3))
		error(document.Form1.TxtIndirizzo,"Inserire il proprio indirizzo.");
	if (!ValidLength(document.Form1.TxtCap.value,3))
		error(document.Form1.TxtCap,"Inserire il proprio CAP di residenza.");
	if (!ValidLength(document.Form1.TxtCitta.value,3))
		error(document.Form1.TxtCitta,"Inserire il nome della città di residenza.");
	if (!ValidLength(document.Form1.TxtStato.value,3))
		error(document.Form1.TxtStato,"Inserire il nome del paese di residenza.");
	if (!ValidEmail(document.Form1.TxtMail.value))
		error(document.Form1.TxtMail, "Inserire il proprio indirizzo e-mail.");
	if (document.Form1.TxtAcconsento.checked == 0)
		error(document.Form1.TxtAcconsento,"Per proseguire è necessario acconsentire il trattamento dei dati personali.");
	if (errfound == false)
		{
			document.Form1.TxtCheck03.value = 'validato';
			document.Form1.BtnSend.disabled = true;
			document.Form1.BtnSend.value = 'Invio in corso...';
			document.Form1.submit();
		}
}

function sendformEN()
{	
	errfound = false;
	
	if (!ValidLength(document.Form1.TxtNome.value,3))
		error(document.Form1.TxtNome,"Please enter your first name.");
	if (!ValidLength(document.Form1.TxtCognome.value,3))
		error(document.Form1.TxtCognome,"Please enter your last name.");
	if (!ValidLength(document.Form1.TxtIndirizzo.value,3))
		error(document.Form1.TxtIndirizzo,"Please enter your address.");
	if (!ValidLength(document.Form1.TxtCap.value,3))
		error(document.Form1.TxtCap,"Please enter your ZIP code.");
	if (!ValidLength(document.Form1.TxtCitta.value,3))
		error(document.Form1.TxtCitta,"Please enter the name of your city.");
	if (!ValidLength(document.Form1.TxtStato.value,3))
		error(document.Form1.TxtStato,"Please enter the name of your country.");
	if (!ValidEmail(document.Form1.TxtMail.value))
		error(document.Form1.TxtMail, "Please enter your e-mail address.");
	if (document.Form1.TxtAcconsento.checked == 0)
		error(document.Form1.TxtAcconsento,"To continue you must agree the privacy statement.");
	if (errfound == false)
		{
			document.Form1.TxtCheck03.value = 'validato';
			document.Form1.BtnSend.disabled = true;
			document.Form1.BtnSend.value = 'Sending your request...';
			document.Form1.submit();
		}
}

function sendformFR()
{	
	errfound = false;
	
	if (!ValidLength(document.Form1.TxtNome.value,3))
		error(document.Form1.TxtNome,"Insérer le propre prénom.");
	if (!ValidLength(document.Form1.TxtCognome.value,3))
		error(document.Form1.TxtCognome,"Insérer le propre nom.");
	if (!ValidLength(document.Form1.TxtIndirizzo.value,3))
		error(document.Form1.TxtIndirizzo,"Insérer le propre adresse.");
	if (!ValidLength(document.Form1.TxtCap.value,3))
		error(document.Form1.TxtCap,"Insérer le propre CP.");
	if (!ValidLength(document.Form1.TxtCitta.value,3))
		error(document.Form1.TxtCitta,"Insérer le propre ville.");
	if (!ValidLength(document.Form1.TxtStato.value,3))
		error(document.Form1.TxtStato,"Insérer le propre pays.");
	if (!ValidEmail(document.Form1.TxtMail.value))
		error(document.Form1.TxtMail, "Insérer le propre e-mail.");
	if (document.Form1.TxtAcconsento.checked == 0)
		error(document.Form1.TxtAcconsento,"Pour continuer est nécessaire consentir le traitement des données personnelles.");
	if (errfound == false)
		{
			document.Form1.TxtCheck03.value = 'validato';
			document.Form1.BtnSend.disabled = true;
			document.Form1.BtnSend.value = 'Envoie en cours...';
			document.Form1.submit();
		}
}


function sendform_de()
{	
	errfound = false;
	
	if (!ValidLength(document.Form1.TxtNome.value,3))
		error(document.Form1.TxtNome,"Bitte geben Sie Ihren Namen ein.");
	if (!ValidEmail(document.Form1.TxtMail.value))
		error(document.Form1.TxtMail, "Bitte geben Sie Ihre E-Mail Adresse ein.");
	if (document.Form1.TxtPrivacy.checked == 0)
		error(document.Form1.TxtPrivacy,"Sie müssen die Bedingungen des Gesetzes 675/96\nüber die Behandlung der persönlichen Daten\nzustimmen.");
	if (errfound == false)
		{
			document.Form1.BtnSend.disabled = true;
			document.Form1.BtnSend.value = '.................';
			document.Form1.submit();
		}
}

function sendform_it()
{	
	errfound = false;
	
	if (!ValidLength(document.Form1.TxtNome.value,3))
		error(document.Form1.TxtNome,"Inserire il proprio nome.");
	if (!ValidEmail(document.Form1.TxtMail.value))
		error(document.Form1.TxtMail, "Inserire il proprio indirizzo e-mail.");
	if (document.Form1.TxtPrivacy.checked == 0)
		error(document.Form1.TxtPrivacy,"Per proseguire è necessario acconsentire il trattamento dei dati personali.");
	if (errfound == false)
		{
			document.Form1.BtnSend.disabled = true;
			document.Form1.BtnSend.value = '.................';
			document.Form1.submit();
		}
}

function sendform_en()
{	
	errfound = false;
	
	if (!ValidLength(document.Form1.TxtNome.value,3))
		error(document.Form1.TxtNome,"Please enter your first name.");
	if (!ValidEmail(document.Form1.TxtMail.value))
		error(document.Form1.TxtMail, "Please enter your e-mail address.");
	if (document.Form1.TxtPrivacy.checked == 0)
		error(document.Form1.TxtPrivacy,"To continue you must agree the privacy statement.");
	if (errfound == false)
		{
			document.Form1.BtnSend.disabled = true;
			document.Form1.BtnSend.value = '.................';
			document.Form1.submit();
		}
}
