<!--
  var formatoFecha = 'dd/mm/yyyy';	// Formato de fecha que vamos a utilizar
  
  // Función de validación de fecha
  function fechaValida(valor) {
  	var formatoFechaReg = formatoFecha;
  	formatoFechaReg = formatoFechaReg.replace('dd','([0-1][0-9]|3[0-1])');
  	formatoFechaReg = formatoFechaReg.replace('mm','(0[0-9]|1[0-2])');
  	formatoFechaReg = formatoFechaReg.replace(/y/g,'[0-9]');
  	formatoFechaReg = "^" + formatoFechaReg + "$";
  	var ExpReg = new RegExp(formatoFechaReg);
  	var fechaOK = ExpReg.test(valor);
  	return fechaOK;
  }
  
  // Función de validación de email
  function emailValido(valor) {
	var EmailOk = true;
	var AtSym = valor.indexOf('@');
	var Period = valor.lastIndexOf('.');
	var Space = valor.indexOf(' ');
	var Length = valor.length - 1;
	if ((AtSym < 1) || (Period <= AtSym+1) || (Period == Length ) || (Space  != -1)) {  
		  EmailOk = false;
	}
	return EmailOk;
  }
  
  // Función que oculta o muestra un bloque de código html
  function verBloque(valor,campo) {
  	if(campo.checked)
  		document.getElementById(valor).style.display = '';
  	else
  		document.getElementById(valor).style.display = 'none';
  }
  
  // Función que inserta valores en un select multiple
  function aSelect(origen,destino) {
  	if((destino.type != "select-multiple") || (origen.value == ""))
  		return false;
  	texto = origen.value;
  	valor = origen.value;
  	opcion = new Option(texto,valor);
  	destino.options[destino.length] = opcion;
  	origen.value = "";
	return true;
  }
  // Función que saca valores de un select multiple
  function deSelect(origen,destino) {
  	if(destino.type != "select-multiple")
  		return false;
  	for(i=(destino.length - 1);i>=0;i--) {
  		if(destino.options[i].selected) {
  			destino.options[i] = null;
  		}
  	}
	return true;
  }

//Función para abrir ventanas
function MM_openBrWindow(theURL,winName,features) { //v2.0
	window.open(theURL,winName,features);
}
//-->
