function EnviaContacto(){
	tf = document.form1;
	valOK = true;
	if(tf.nombre.value == "" && valOK){
		valOK = false;
		alert("Insert your name.");
		tf.nombre.focus();
	}
	if(tf.apellidos.value == "" && valOK){
		valOK = false;
		alert("Insert your surname.");
		tf.apellidos.focus();
	}
	if(tf.email.value == "" && valOK){
		valOK = false;
		alert("Insert your email.");
		tf.email.focus();
	}
	if (!validaMail(tf.email.value) && valOK){
		valOK = false;
		alert("Check your email.");
		tf.email.focus();
	}
	if(tf.comentario.value == "" && valOK){
		valOK = false;
		alert("Insert your comments.");
		tf.comentario.focus();
	}
	if(tf.acepto.checked == false && valOK){
		valOK = false;
		alert("I accept the existing rules on personal details security.");
	}
	if(valOK){
		tf.action = "contsend.asp";
		tf.submit();
	}
}

function EnviaContactoReunion(){
	tf = document.form1;
	valOK = true;
	if(tf.empresa.value == "" && valOK){
		valOK = false;
		alert("Insert the name of your company or organisation.");
		tf.empresa.focus();
	}
	if(tf.sector.value == "" && valOK){
		valOK = false;
		alert("Insert the type of company.");
		tf.sector.focus();
	}
	if(tf.contacto.value == "" && valOK){
		valOK = false;
		alert("Insert name of contact person.");
		tf.contacto.focus();
	}
	if(tf.direccion.value == "" && valOK){
		valOK = false;
		alert("Insert address.");
		tf.direccion.focus();
	}
	if(tf.cp.value == "" && valOK){
		valOK = false;
		alert("Insert post code.");
		tf.cp.focus();
	}
	if(tf.poblacion.value == "" && valOK){
		valOK = false;
		alert("Insert town.");
		tf.poblacion.focus();
	}
	if(tf.telefono.value == "" && valOK){
		valOK = false;
		alert("Insert telephone number.");
		tf.telefono.focus();
	}
	if(tf.fax.value == "" && valOK){
		valOK = false;
		alert("Insert fax number.");
		tf.fax.focus();
	}
	if(tf.email.value == "" && valOK){
		valOK = false;
		alert("Insert your email.");
		tf.email.focus();
	}
	if (!validaMail(tf.email.value) && valOK){
		valOK = false;
		alert("Check your email.");
		tf.email.focus();
	}
	if(tf.asistentes.value == "" && valOK){
		valOK = false;
		alert("Insert number of people attending.");
		tf.asistentes.focus();
	}
	if(tf.asistentes.value != "" && isNaN(parseInt(tf.asistentes.value)) && valOK){
		valOK = false;
		alert("Insert number in figures, NOT letters.");
		tf.asistentes.focus();
	}
	if(tf.desde.value == "" && valOK){
		valOK = false;
		alert("Insert arrival date.");
		tf.desde.focus();
	}
	if(tf.hasta.value == "" && valOK){
		valOK = false;
		alert("Insert departure day.");
		tf.hasta.focus();
	}
	if(tf.alojamiento[0].checked == false && tf.alojamiento[1].checked == false && valOK){
		valOK = false;
		alert("Select if you require accommodation.");
		tf.sector.focus();
	}
	if(tf.comentario.value == "" && valOK){
		valOK = false;
		alert("Insert your comments.");
		tf.comentario.focus();
	}
	if(tf.acepto.checked == false && valOK){
		valOK = false;
		alert("I accept the existing rules on personal details security.");
	}
	if(valOK){
		tf.action = "trabcontsend.asp";
		tf.submit();
	}
}

function AltaNews(bAlta){
	tf = document.form1;
	valOK = true;
	if((tf.userNews.value == "" || tf.userNews.value == "e-mail") && valOK){
		valOK = false;
		alert("Insert your email.");
		tf.userNews.focus();
	}
	if (!validaMail(tf.userNews.value) && valOK){
		valOK = false;
		alert("Check your email.");
		tf.userNews.focus();
	}
	if(valOK){
		//tf.action = "altasend.asp";
		tf.action = "";
		tf.OpcionNews.value = bAlta;
		tf.submit();
	}
}

function CargaDescubre(){
	objFlash = MM_findObj("CarrHome");
	objFlash.LoadMovie(1, "../img/descubre_int.swf?lang=3&urldescubre=../../img/descubre.swf");
}


function EnviaReserva(){
	tf = window.document.form1;
	valOK = true;
	if(tf.en.value == "arrival" && valOK){
		valOK = false;
		alert("Insert arrival date.");
	}
	if(tf.sa.value == "departure" && valOK){
		valOK = false;
		alert("Insert departure day.");
	}
	if(valOK){
		strURL = "http://www.vectork.net/webguest/peticiones/FrmPeticion.aspx?hotel=004&idioma=en&en="+tf.en.value+"&sa="+tf.sa.value+"&rg=MP&p1=2&n1=0&b1=0&p2=0&n2=0&b2=0&p3=0&n3=0&b3=0";
		Wreserva = window.open(strURL);
	}
}
