function EnviaContacto(){
	tf = document.form1;
	valOK = true;
	if(tf.nombre.value == "" && valOK){
		valOK = false;
		alert("Introdueixi el seu nom.");
		tf.nombre.focus();
	}
	if(tf.apellidos.value == "" && valOK){
		valOK = false;
		alert("Introdueixi els seus cognoms.");
		tf.apellidos.focus();
	}
	if(tf.email.value == "" && valOK){
		valOK = false;
		alert("Introdueixi el seu correu electronic.");
		tf.email.focus();
	}
	if (!validaMail(tf.email.value) && valOK){
		valOK = false;
		alert("Comprovi el seu correu electronic.");
		tf.email.focus();
	}
	if(tf.comentario.value == "" && valOK){
		valOK = false;
		alert("Introdueixi el seu comentari.");
		tf.comentario.focus();
	}
	if(tf.acepto.checked == false && valOK){
		valOK = false;
		alert("Accepti la Normativa Vigent de Seguretat de Dades Personals.");
	}
	if(valOK){
		tf.action = "contsend.asp";
		tf.submit();
	}
}

function EnviaContactoReunion(){
	tf = document.form1;
	valOK = true;
	if(tf.empresa.value == "" && valOK){
		valOK = false;
		alert("Introdueixi el nom d'empresa o entitat.");
		tf.empresa.focus();
	}
	if(tf.sector.value == "" && valOK){
		valOK = false;
		alert("Introdueixi el sector de l'activitat.");
		tf.sector.focus();
	}
	if(tf.contacto.value == "" && valOK){
		valOK = false;
		alert("Introdueixi la persona de contacte.");
		tf.contacto.focus();
	}
	if(tf.direccion.value == "" && valOK){
		valOK = false;
		alert("Introdueixi la adreça.");
		tf.direccion.focus();
	}
	if(tf.cp.value == "" && valOK){
		valOK = false;
		alert("Introdueixi el codi postal.");
		tf.cp.focus();
	}
	if(tf.poblacion.value == "" && valOK){
		valOK = false;
		alert("Introdueixi la població.");
		tf.poblacion.focus();
	}
	if(tf.telefono.value == "" && valOK){
		valOK = false;
		alert("Introdueixi el telèfon.");
		tf.telefono.focus();
	}
	if(tf.fax.value == "" && valOK){
		valOK = false;
		alert("Introdueixi el fax.");
		tf.fax.focus();
	}
	if(tf.email.value == "" && valOK){
		valOK = false;
		alert("Introdueixi el seu correu electronic.");
		tf.email.focus();
	}
	if (!validaMail(tf.email.value) && valOK){
		valOK = false;
		alert("Comprovi el seu correu electronic.");
		tf.email.focus();
	}
	if(tf.asistentes.value == "" && valOK){
		valOK = false;
		alert("Introdueixi el nº d'assistents.");
		tf.asistentes.focus();
	}
	if(tf.asistentes.value != "" && isNaN(parseInt(tf.asistentes.value)) && valOK){
		valOK = false;
		alert("Introdueixi un valor numèric per el nº d'assistents.");
		tf.asistentes.focus();
	}
	if(tf.desde.value == "" && valOK){
		valOK = false;
		alert("Introdueixi la data d'inici.");
		tf.desde.focus();
	}
	if(tf.hasta.value == "" && valOK){
		valOK = false;
		alert("Introdueixi la data de sortida.");
		tf.hasta.focus();
	}
	if(tf.alojamiento[0].checked == false && tf.alojamiento[1].checked == false && valOK){
		valOK = false;
		alert("Seleccioni si vol allotjament.");
		tf.sector.focus();
	}
	if(tf.comentario.value == "" && valOK){
		valOK = false;
		alert("Introdueixi el seu comentari.");
		tf.comentario.focus();
	}
	if(tf.acepto.checked == false && valOK){
		valOK = false;
		alert("Accepti la Normativa Vigent de Seguretat de Dades Personals.");
	}
	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("Introdueixi el correu electrònic.");
		tf.userNews.focus();
	}
	if (!validaMail(tf.userNews.value) && valOK){
		valOK = false;
		alert("Comprovi el correu electronic.");
		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=1&urldescubre=../img/descubre.swf");
}

function EnviaReserva(){
	tf = window.document.form1;
	valOK = true;
	if(tf.en.value == "entrada" && valOK){
		valOK = false;
		alert("Introdueixi la data d'entrada.");
	}
	if(tf.sa.value == "sortida" && valOK){
		valOK = false;
		alert("Introdueixi la data de sortida.");
	}
	if(valOK){
		strURL = "http://www.vectork.net/webguest/peticiones/FrmPeticion.aspx?hotel=002&idioma=ca&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);
	}
}

