﻿// RUSO - CHARSET ISO-8859-5 -----------------------------------------------------------------------/

// ---------------------------------------------------------------------------------------------------/
function ValidarFormularioSolicitudTarjetas(formulario) { //v4.0
	var errors = "";

	// NOMBRE
	if (formulario.Nom.value.length == 0) {
		errors += "Please indicate your NAME\n";
	}
	// PERSONA DE CONTACTO
	if (formulario.PersonaContacte.value.length == 0) {
		errors += "Please indicate the CONTACT PERSON.\n";
	}
	// POBLACIO
	if (formulario.Poblacio.value.length == 0) {
		errors += "Please indicate the CITY.\n";
	}
	// TELEFON
	if (formulario.Telefon.value.length == 0) {
		errors += "Please indicate your PHONE number.\n";
	}
	// EMAIL
	if (formulario.Email.value.length == 0) {
		errors += "Please indicate your EMAIL.\n";
	}else{
		if (isEmailAddress(formulario.Email) == false) {
			errors += "This email address is not correct.\n";
		}
	}
	// ACTIVITAT EMPRESA
	if (formulario.ActivitatEmpresa.value.length == 0) {
		errors += "Please indicate BUSINESS ACTIVITY (PERSONAL if the card is for private use, for example).\n";
	}
	// TIPUS DE TRANSPORT
	if ((formulario.TransportLocal.checked == false) && (formulario.TransportComarcal.checked == false) && (formulario.TransportNacional.checked == false) && (formulario.TransportInternacional.checked == false)){
		errors += "Please indicate at least one TYPE OF TRANSPORT (Local, Regional, National or International).\n";
	}
	// DEBEMOS DAR MENSAJE ??
	if (errors.length > 0){
		alert(errors);
	}
	document.MM_returnValue = (errors == '');
}

// ---------------------------------------------------------------------------------------------------/
function ValidarFormularioContacto(formulario) { //v4.0
	var errors = "";

	// NOMBRE
	if (formulario.Nom.value.length == 0) {
		errors += "Please indicate your NAME.\n";
	}
	// TELEFON
	if (formulario.Tel.value.length == 0) {
		errors += "Please indicate your PHONE number.\n";
	}
	// EMAIL
	if (formulario.email.value.length == 0) {
		errors += "Please indicate your EMAIL.\n";
	}else{
		if (isEmailAddress(formulario.email) == false) {
			errors += "This email address is not correct.\n";
		}
	}
	// DEBEMOS DAR MENSAJE ??
	if (errors.length > 0){
		alert(errors);
	}
	document.MM_returnValue = (errors == '');
}
