//Caracteres Documentos DNI-CIF-...

function Spam(cadena)
{
	var limpio=true;
	patron=/http|href|www|<a|mailto/i;
	if(cadena.search(patron)>=0) limpio=false; 	
	
	if(limpio==false) MensajeShadow('Por motivos de anti-spam, no se permite la inserci&oacute;n de url\'s');
	
	return limpio;
}

function caracteres_utf8(cadena)
{
	/*cadena = cadena.replace(/[á]/g,'\u00E1');
	cadena = cadena.replace(/[é]/g,'\u00E9');
	cadena = cadena.replace(/[í]/g,'\u00ED');
	cadena = cadena.replace(/[ó]/g,'\u00F3');
	cadena = cadena.replace(/[ú]/g,'\u00FA');
	
	cadena = cadena.replace(/[Á]/g,'\u00C1');
	cadena = cadena.replace(/[É]/g,'\u00C9');
	cadena = cadena.replace(/[Í]/g,'\u00CD');
	cadena = cadena.replace(/[Ó]/g,'\u00D3');
	cadena = cadena.replace(/[Ú]/g,'\u00DA');
	
	
	cadena = cadena.replace(/[ñ]/g,'\u00F1');
	cadena = cadena.replace(/[Ñ]/g,'\u00D1');
	
	cadena = cadena.replace('¿','\u00BF');
	cadena = cadena.replace('¡','\u00A1');*/
	
	return cadena;
}

//función que recorre todos el grupo de checkbox que le pasamos para saber si hay alguno seleccionado.
//ejem. recorrer_checkbox(document.getElementById("micheckboxEjemplo"));
function recorrer_checkbox(checkbox)
{
	var cont = 0;
	for(var i = 0; i < checkbox.length; ++i)//suma antes de hacer nada
		if (checkbox[i].checked) cont++;
	return cont;
}

function recorrer_checkbox2(longitud, campoCheckbox)
{
	var registros_input = document.getElementsByTagName("input");
	
	var cont = 0;
	for(var i = 0; i < registros_input.length; i++)
		if(registros_input[i].id.substr(0,longitud) == campoCheckbox)
			if(registros_input[i].checked == true) cont++;
	
	return cont;
}

function Validar_Caracteres(evento,objeto)
{
	if(evento.keyCode) 
	{
		if(evento.keyCode != 20 && evento.keyCode != 144 && evento.keyCode != 16 && evento.keyCode != 192 && evento.keyCode != 8 && evento.keyCode != 37 && evento.keyCode != 38 && evento.keyCode != 39 && evento.keyCode != 40 && evento.keyCode != 13 && evento.keyCode != 9)
		{
			if(evento.keyCode < 96 || evento.keyCode > 105)
			{
				
				if(evento.keyCode < 48 || evento.keyCode > 90)
				{
					objeto.value = objeto.value.substring(0,(objeto.value.length)-1);
				}
				else
					if(evento.keyCode < 65 && evento.keyCode > 57 )
					{
						if(evento.keyCode > 31 )objeto.value = objeto.value.substring(0,(objeto.value.length)-1);
					}
			}
		}
	}
}

//Solo Texto
function esTexto(evento,objeto)
{
	if(evento.keyCode) 
	{
			if((evento.keyCode < 65 || evento.keyCode > 90) && (evento.keyCode != 16 && evento.keyCode != 222 && evento.keyCode != 219 && evento.keyCode != 32 && evento.keyCode != 8 && evento.keyCode != 46 && evento.keyCode != 192 && evento.keyCode != 9))
			{
					objeto.value = objeto.value.substring(0,(objeto.value.length)-1);
			}
	}
}


//Formato númerico 1.000,00
function number_format (number, decimals, dec_point, thousands_sep)
{
	var i,z;
	var exponent = "";
	var numberstr = number.toString ();
	var eindex = numberstr.indexOf ("e");
	if (eindex > -1)
	{
		exponent = numberstr.substring (eindex);
		number = parseFloat (numberstr.substring (0, eindex));
	}
	
	if (decimals != null)
	{
		var temp = Math.pow (10, decimals);
		number = Math.round (number * temp) / temp;
	}
	var sign = number < 0 ? "-" : "";
	var integer = (number > 0 ? 
	  Math.floor (number) : Math.abs (Math.ceil (number))).toString ();
	
	var fractional = number.toString ().substring (integer.length + sign.length);
	dec_point = dec_point != null ? dec_point : ".";
	fractional = decimals != null && decimals > 0 || fractional.length > 1 ? 
			   (dec_point + fractional.substring (1)) : "";
	if (decimals != null && decimals > 0)
	{
		for (i = fractional.length - 1, z = decimals; i < z; ++i)
		  fractional += "0";
	}
	
	thousands_sep = (thousands_sep != dec_point || fractional.length == 0) ? 
				  thousands_sep : null;
	if (thousands_sep != null && thousands_sep != "")
	{
		for (i = integer.length - 3; i > 0; i -= 3)
		  integer = integer.substring (0 , i) + thousands_sep + integer.substring (i);
	}
	
	return sign + integer + fractional + exponent;
}

//Fomarto frances 1.000,00
function formato_frances($num)
{
	return number_format($num,2,',','.')
}

//Solo acepta caracteres numéricos 
function Numerico(texto)
{
	var i=0;
	var caracter = texto.charAt((texto.length)-1);
	
	if( caracter != '0' && caracter != '1' && caracter != '2' && caracter != '3' && caracter != '4' && caracter != '5' && caracter != '6' && caracter != '7' && caracter != '8' && caracter != '9' )
		texto=texto.substring(0,(texto.length)-1);
	
	while(i < texto.length)
	{
		if( texto.charAt(i) != '0' && texto.charAt(i) != '1' && texto.charAt(i) != '2' && texto.charAt(i) != '3' && texto.charAt(i) != '4' && texto.charAt(i) != '5' && texto.charAt(i) != '6' && texto.charAt(i) != '7' && texto.charAt(i) != '8' && texto.charAt(i) != '9' )
			texto=texto.replace(texto.charAt(i),'');
		i++;
	}

	return texto;
}
//controla que el formato del número sea 9.999,99
function validar_formato_numerico(numero)
{
	//var patron = /^(\d{1}\.)?(\d+\.?)+(,\d{2})?$/;	//formato válido para millonesimas: 99.999.999,99; 9.999,99; 9.999.999,99
	var patron = /^(\d{1}\.)?(\d+)(,\d{2})?$/;		//^(\d{1}\.)?(\d+\.?)+(,\d{2})?$	//formato válido sólo para milésimas: 9.999,99; 9.999
	
	/*
		^ --> principio
		$ --> final
		\d --> simboliza un dígito
		+ --> simboliza al menos 1 o más veces
		? --> simboliza 0 ó 1
		( )? --> conjunto opcional
		\d+ --> uno o mas números
		(\.\d+)? --> Un conjunto opcional formado por un punto y uno o más números(lo que sería los decimales) también vale este otro
		(,\d+)? --> Un conjunto opcional formado por un punto y uno o más números(lo que sería los decimales)
		\d{1} --> exactamente un dígito.
		\d{2} --> exactamente dos dígitos.(los decimales)
	*/
	return patron.test(numero);
}


//Solo acepta caracteres numéricos y el más:
function telefono_internacional(texto)
{
	var i;
	var caracter = texto.charAt((texto.length)-1);
	
	
	if( caracter != '+' && caracter != '0' && caracter != '1' && caracter != '2' && caracter != '3' && caracter != '4' && caracter != '5' && caracter != '6' && caracter != '7' && caracter != '8' && caracter != '9' )
	{
		texto=texto.substring(0,(texto.length)-1);
	}
	
	for(i = 0; i < texto.length; i++)
	{
		if(i == 0)
		{
			if( texto.charAt(i) != '+' && texto.charAt(i) != '0' && texto.charAt(i) != '1' && texto.charAt(i) != '2' && texto.charAt(i) != '3' && texto.charAt(i) != '4' && texto.charAt(i) != '5' && texto.charAt(i) != '6' && texto.charAt(i) != '7' && texto.charAt(i) != '8' && texto.charAt(i) != '9' )
					texto=texto.replace(texto.charAt(i),'');
		}
		else
		{
			if(texto.charAt(i) == '+')
				texto=texto.substring(0,i);
			else
			{
				if( texto.charAt(i) != '0' && texto.charAt(i) != '1' && texto.charAt(i) != '2' && texto.charAt(i) != '3' && texto.charAt(i) != '4' && texto.charAt(i) != '5' && texto.charAt(i) != '6' && texto.charAt(i) != '7' && texto.charAt(i) != '8' && texto.charAt(i) != '9' )
					texto=texto.replace(texto.charAt(i),'');
			}
		}
	}
	
	return texto;
}


function MensError(campo,mensaje)
{
  MensajeShadow(caracteres_utf8(mensaje));
  campo.focus();
  return false;
}
  

function esNIF(campo,obligatorio)
{
  var inicio;
 // Cojo todo menos la letra del NIF
  var resto;
  // Cojo la letra del NIF
  var patron = /\D/;
  // Todo menos digitos.
  var patron1 = /T|R|W|A|G|M|Y|F|P|D|X|B|N|J|Z|S|Q|V|H|L|C|K|E/;
  //Letras posibles.
  var Letras_Posibles = "TRWAGMYFPDXBNJZSQVHLCKE" ;
  inicio = campo.value.substring(0,campo.value.length-1);
  resto = campo.value.substring(campo.value.length-1,campo.value.length);
  resto = resto.toUpperCase();
  if(obligatorio && campo.value.length == 0)
    return(MensError(campo,"Introduzca su NIF"));
  if(campo.value.length > 0)  {
    //Busco que la letra este al final y el resto sean numeros 
   if((inicio.length == 0) || (inicio.match(patron)) || (!resto.match(patron1)))      return(MensError(campo,"El formato del NIF es incorrecto"));
    var numero_documento = ""    
for (var i=0; i < inicio.length; i++)
      numero_documento = numero_documento + inicio.charAt(i)
    // Comprueba la letra del NIF 
   var pos_corr = (numero_documento%23);
    var letra_correcta = Letras_Posibles.charAt(pos_corr);
    if (resto != letra_correcta)
      return(MensError(campo,"La letra del NIF es incorrecta"));  }  
return true;
}



function esCIF(campo,obligatorio)
{
  var inicio;  	// Cojo la letra del NIF
  var resto;	// Cojo el resto -1
  var ultimo;
  var patron1 = /A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z/ //Letras posibles
  var patron3 = new RegExp(String.fromCharCode(91)+'A-J'+String.fromCharCode(93));
  var patron4 = /0|1|2|3|4|5|6|7|8|9/; //Digitos

  if(obligatorio && campo.value.length == 0)
    return(MensError(campo,"Introduzca su CIF"));

  if(campo.value.length > 0)
  {
  	inicio = campo.value.substring(0,1);
  	inicio = inicio.toUpperCase();
  	resto = campo.value.substring(1,campo.value.length-1);
  	ultimo = campo.value.substring(campo.value.length-1,campo.value.length);
  	ultimo = ultimo.toUpperCase();

    if (campo.value.length != 9)
      return(MensError(campo,"El CIF debe estar compuesto de 9 caracteres"));

    if (!inicio.match(patron1))
      return(MensError(campo,"La letra del CIF es incorrecta"));

    for(i=0;i<resto.length;i++)
    {
      if( !resto.substring(i,i+1).match(patron4) )
        return(MensError(campo,"Las posiciones del 2 al 8 del CIF solo pueden ser numeros "));
    }

    if (!ultimo.match(patron4) && !ultimo.match(patron3))
   	  return(MensError(campo,"El ultimo caracter es incorrecto"));

   	//Comprueba que la letra es correcta
    N1 = resto.charAt(0)
    dosN1 = "0" + (N1 * 2)
    sumaN1 = parseInt(dosN1.charAt(dosN1.length-1)) + parseInt(dosN1.charAt(dosN1.length-2))

    N3 = resto.charAt(2)
    dosN3 = "0" + (N3 * 2)
    sumaN3 = parseInt(dosN3.charAt(dosN3.length-1)) + parseInt(dosN3.charAt(dosN3.length-2))

    N5 = resto.charAt(4)
    dosN5 = "0" + (N5 * 2)
    sumaN5 = parseInt(dosN5.charAt(dosN5.length-1)) + parseInt(dosN5.charAt(dosN5.length-2))

    N7 = resto.charAt(6)
    dosN7 = "0" + (N7 * 2)
    sumaN7 = parseInt(dosN7.charAt(dosN7.length-1)) + parseInt(dosN7.charAt(dosN7.length-2))

    N2 = resto.charAt(1)
    N4 = resto.charAt(3)
    N6 = resto.charAt(5)

    total = sumaN1 + parseInt(N2) + sumaN3 + parseInt(N4) + sumaN5 + parseInt(N6) + sumaN7
    T = "0" + total
    unidades_total = T.charAt(T.length-1)
    if(ultimo.match(patron4))
    {
      SumaFinal = parseInt(unidades_total) + parseInt(ultimo)
      SF = "0" + SumaFinal
      UNIDAD = SF.charAt(SF.length-1)
      if (UNIDAD == 0)
        return true
      else
        return(MensError(campo,"El CIF es incorrecto"));
    }
    else
    {
      if (ultimo == "A")
        numero_control = 1
      else if (ultimo == "B")
        numero_control = 2
      else if (ultimo == "C")
        numero_control = 3
      else if (ultimo == "D")
        numero_control = 4
      else if (ultimo == "E")
        numero_control = 5
      else if (ultimo == "F")
        numero_control = 6
      else if (ultimo == "G")
        numero_control = 7
      else if (ultimo == "H")
        numero_control = 8
      else if (ultimo == "I")
        numero_control = 9
      else if (ultimo == "J")
        numero_control = 0

      SumaFinal = parseInt(unidades_total) + parseInt(numero_control)
      SF = "0" + SumaFinal
      UNIDAD = SF.charAt(SF.length-1)

      if (UNIDAD == 0)
        return true
      else
        return(MensError(campo,"El CIF es incorrecto"));
    }
  }
  return true
}

//ejem. Ok = esCP(document.getElementById("cp"), document.getElementById("provincia").value, true);
function esCP(codPos,numProv,obligatorio)
	{
  var patron = /\D/;
  // Todo menos digitos.
  if(obligatorio && codPos.value.length == 0)
    return(MensError(codPos,"Introduzca el C\u00f3digo Postal"));
  if(codPos.value.length > 0)  { 
   if ((codPos.value.length != 5) || (codPos.value.match(patron))) 
     return(MensError(codPos,"El C\u00f3digo Postal debe ser un n\u00famero de 5 cifras"));
    var cad1=codPos.value.substring(0,2); 
    var cad2=numProv.substring(0,2);
   
   if (cad2.length==1)
	cad2='0'+ cad2;  
   
  if (cad1 == cad2)      return true; 
   return(MensError(codPos,"El C\u00f3digo Postal no coincide con la Provincia seleccionada"));  }
  return true;
}

function esProvincia(nomProvincia)
{
	
	if(nomProvincia)
			return true
	else
	{
			MensajeShadow(caracteres_utf8('La Provincia introducida no es v\u00e1lida'));
			return false;
	}
}


function esVia(nomVia)
{
	
	if(nomVia)
			return true
	else
	{
			MensajeShadow(caracteres_utf8('El tipo de V\u00eda introducido no es correcto'));
			return false;
	}
}

function esMovil(valor)
{

	if(valor.value.length==9 && valor.value.substr(0,1)==6)
		return true;
	else
	{
		MensajeShadow(caracteres_utf8('El M\u00f3vil de contacto debe tener 9 d\u00edgitos y comenzar por 6'));
		return false;
	}
}

function esFijo(valor)
{

	if(valor.value.substr(0,1)==9 || valor.value.substr(0,1)==6)
		return true;
	else
	{
		MensajeShadow(caracteres_utf8('El Tel\u00e9fono de contacto debe comenzar por 9 o por 6 y tener 9 d\u00edgitos'));
		return false;
	}
}



function esFax(valor)
{

	if(valor.value.substr(0,1)==9)
		return true;
	else
	{
		MensajeShadow(caracteres_utf8('El Fax debe comenzar por 9.'));
		return false;
	}
}

//telefono internacional formato: +346xxxxxxxx
function esTelefonoInternacional(valor)
{
	if(valor.value.substr(0,1)==0 && (valor.value.substr(4,1)==9 || valor.value.substr(4,1)==6))
		return true;
	else
	{
		MensajeShadow(caracteres_utf8('El Tel\u00e9fono de contacto internacional, debe comenzar por 0 y tener un formato como este : 00349xxxxxxxx.'));
		return false;
	}
}


//telefono internacional formato: 00346xxxxxxxx:
function esMovilInternacional_0034(valor)
{

	if(valor.value.substr(0,1)=='0' && valor.value.substr(4,1)=='6')
		return true;
	else
	{
		MensajeShadow(caracteres_utf8('El M\u00f3vil, debe tener el siguiente formato: 00346xxxxxxxx.'));
		return false;
	}
}

//Verificar Email
function esMail(campo,obligatorio){
  //var patron1=/&#91;^\w\-@\.&#93;/;
  var patron1=new RegExp(String.fromCharCode(91) + '^\\w\\-@\\.' +  String.fromCharCode(93));
   //var patron2=/&#91;@.&#93;{2}/;
  var patron2=new RegExp(String.fromCharCode(91) + '@.'  +String.fromCharCode(93) + '{2}');
  //var patron3=/^&#91;.@&#93;|&#91;.@&#93;$/;
  var patron3=new RegExp('^' + String.fromCharCode(91) + '.@' +  String.fromCharCode(93) + '|' + String.fromCharCode(91) + '.@' +  String.fromCharCode(93) + '$');
  //var patron4=/@&#91;\w\-&#93;*\.&#91;\w\-&#93;*/;
   var patron4=new RegExp('@' + String.fromCharCode(91) + '\\w\\-' +  String.fromCharCode(93) + '*\\.' + String.fromCharCode(91) + '\\w\\-'  + String.fromCharCode(93) + '*');
  var patron5=/@.*@/;
  //var patron6=/\.&#91;a-z&#93;*\-&#91;a-z&#93;*$/;
  var patron6=new RegExp('\\.' + String.fromCharCode(91) + 'a-z' +  String.fromCharCode(93) + '*\\-' + String.fromCharCode(91) + 'a-z' +  String.fromCharCode(93) + '*$');
  //var patron7=/\.&#91;a-z&#93;*\_&#91;a-z&#93;*$/;
  var patron7=new RegExp('\\.' + String.fromCharCode(91) + 'a-z' +  String.fromCharCode(93) + '*\\_' + String.fromCharCode(91) + 'a-z' +  String.fromCharCode(93) + '*$');
   if(obligatorio && campo.value.length == 0){MensajeShadow(caracteres_utf8("Formato de correo electr\u00f3nico incorrecto."));return false;}
   if(campo.value.length > 0)  {if(!(!campo.value.match(patron1)&&!campo.value.match(patron2)&&! campo.value.match(patron3)&&campo.value.match(patron4)&&! campo.value.match(patron5)&&!campo.value.match(patron6)&&! campo.value.match(patron7))){ MensajeShadow(caracteres_utf8('Formato de correo electr\u00f3nico incorrecto'));  return false;  } }  
   
   return true;
}


// Validación general y llamada a la comprobación de cuenta corriente
function esCCC(cc1,cc2,cc3,cc4)
{
       
       		var str_error = "";
       		var arrCC = new Array(cc1,cc2,cc3,cc4);
       		
       	    /*
       	     * Si algún campo no ha sido completado satisfactoriamente cambiar su estilo,
       	     * darle el foco y mostrar el error
       	    */
       		for (i=3;i>=0;i--){
       			if (arrCC[i].getAttribute("maxlength") != arrCC[i].value.length) {
       				arrCC[i].setAttribute("class","incompleto");
       				str_error = "No ha completado todos los datos";
       				arrCC[i].focus();
       			};
       		};
       		
       		if ("" != str_error) {
       			MensajeShadow (str_error);
       			return false;
			};
       		
			/*
			 * Comprobar la cuenta corriente introducida
			*/
 	  		if (checkDC(arrCC[0].value+arrCC[1].value,arrCC[3].value,arrCC[2].value))
			   return true;
    		else
			{
    			MensajeShadow ("La cuenta corriente introducida no es correcta.\nPor favor, compruebe los datos.");
				return false;
			}
       		
} // end validate()
		
		/**
		 * Validación de una cuenta corriente
		 * 
		 * Comprueba un número de cuenta corriente
		 *
		 * IN:  cc1	 string	 Primeros ocho dígitos de la cuenta corriente (entidad.oficina)
		 * IN:  cc2  string  Últimos diez dígitos de la cuenta corriente  (#cuenta)
		 * IN:  dc   string  Dígitos de control
		 * OUT:      bool    ¿Cuenta válida? 
		*/
function checkDC(cc1,cc2,dc)
{
            
			/*
			 * Comprobar que los datos son correctos
			*/
     		if (!(cc1.match(/^\d{8}$/) && cc2.match(/^\d{10}$/) && dc.match(/^\d{2}$/) )) return false;
       	    
	   	    var arrWeights = new Array(1,2,4,8,5,10,9,7,3,6);	// vector de pesos
    		var dc1=0, dc2=0;
       	    
    		/*
    		 * Cálculo del primer dígito de cintrol
    		*/
   		    for (i=7;i>=0;i--) dc1 += arrWeights[i+2] * cc1.charAt(i);
    		dc1 = 11 - (dc1 % 11);
  		    if (11 == dc1) dc1 = 0;
   		    if (10 == dc1) dc1 = 1;
       	    
   		    /*
   		     * Cálculo del segundo dígito de control
   		    */
   		    for (i=9;i>=0;i--) dc2 += arrWeights[i] * cc2.charAt(i);
    		dc2 = 11 - (dc2 % 11);
   		    if (11 == dc2) dc2 = 0;
    		if (10 == dc2) dc2 = 1;
       	    
    		/*
    		 * Comprobar la coincidencia y delvolver el resultado
    		*/
     		return (10*dc1+dc2 == dc);	// Javascript infiere tipo entero para dc1 y dc2
 } // end checkDC()



//////////////////////////////////////////////////////
/////validar que la fecha que se escribe en el formulario (con el evento onBlur="javascript:fecha_valida(this.value)) sea correcta
// Uso: Simple... se debe pasar la cadena de la fecha y devuelve false si no es válida...
// El Formato es dd/mm/aaaa
// Ejemplo: if (fecha_valida('14/08/1981')==false) { MensajeShadow(caracteres_utf8('Entrada Incorrecta')) }
// Uso en formularios: onSubmit="return fecha_valida(this.fecha.value)"
/////////////////////////////////////////////////////
function fecha_valida(Cadena)
{
	var Fecha = new String(Cadena);	// Crea un string
	var RealFecha = new Date();	// Para sacar la fecha de hoy
	var Esbisiesto = false;		//para año bisiesto
	// Cadena Año
	var Ano = new String(Fecha.substring(Fecha.lastIndexOf("/")+1,Fecha.length));
	// Cadena Mes
	var Mes = new String(Fecha.substring(Fecha.indexOf("/")+1,Fecha.lastIndexOf("/")));
	// Cadena Día
	var Dia = new String(Fecha.substring(0,Fecha.indexOf("/")));
	
	// Valido el año
	if(Ano.length<4 || Ano.length>4 || parseInt(Ano, 10)<1900)
	{
       	MensajeShadow(caracteres_utf8('El formato de fecha no es correcto ( dd/mm/aaaa ).'));
		//alert("ano"+isNaN(Ano));
		return false;
	}
	// Valido el Mes
	if(parseInt(Mes, 10)<1 || parseInt(Mes, 10)>12 || Mes == "")
	{
		MensajeShadow(caracteres_utf8('El formato de fecha no es correcto ( dd/mm/aaaa ).'));
		//alert("mes");
		return false;
	}
	// Valido el Dia
	if(parseInt(Dia, 10)<1 || parseInt(Dia, 10)>31 || Dia == ""){
		MensajeShadow(caracteres_utf8('El formato de fecha no es correcto ( dd/mm/aaaa ).'));
		//alert("dia");
		return false;
	}
	//meses de 30 días
	if((Mes==4 || Mes==6 || Mes==9 || Mes==11) && Dia>30)
	{
		MensajeShadow(caracteres_utf8('El mes seleccionado no puede tener m\u00e1s de 30 d\u00edas.'));
		return false;
	}
	else if (Mes==2)//año bisiesto o no:
	{
		Esbisiesto = (Ano % 4 == 0 && (Ano % 100 != 0 || Ano % 400 == 0)) ? true : false;
		if(Esbisiesto == true && Dia > 29)
		{
			MensajeShadow(caracteres_utf8('El a\u00f1o introducido es bisiesto, por tanto, febrero no puede tener m\u00e1s de 29 d\u00edas.'));
			return false;
		}
		else if(Esbisiesto == false && Dia > 28)
		{
			MensajeShadow(caracteres_utf8('El a\u00f1o introducido no es bisiesto, por tanto, febrero no puede tener m\u00e1s de 28 d\u00edas.'));
			return false;
		}
		else
			return true;
	}else return true;
}
