function Gol(idioma)
{
	//Hasiera
	document.frmGol.hdnIdioma.value=idioma;
	document.frmGol.action="DCGO001.asp";
	document.frmGol.submit();
}
function isEmpty(s)
{   return ((s == null) || (s.length == 0))
}
function isDate(s)
{
		var day;
		var month; 
		var year;
		var x;

		if (isEmpty(s)) 
			 if (isDate.arguments.length == 1) return defaultEmptyOK;
				 else return (isDate.arguments[1] == true);

		if (s.charAt(4)!="/")
			return false; 
		if (s.charAt(7)!="/")
			return false; 
		year = s.substring(0,4);
		month = s.substring(5,7);
		day = s.substring(8,10);

		year = parseInt(year,10);
		month = parseInt(month,10);
		day = parseInt(day,10);
		if ((year == 0) && (month == 0) && (day == 0))
		{
			alert("fecha no válida");
			return false;
		}

		if ((month < 1) || (month > 12))
			{
			alert ("mes erroneo");
			return false;
			}
			
		if ((month == 1) || (month == 3) || (month == 5) || (month == 7) || (month == 8) || (month == 10) || (month == 12))
			{
			if ( (day > 31) || (day < 1) )
				{
				alert ("mes no puede tener mas de 31 días");
				return false;
				}
			}
		if ((month == 4) || (month == 6) || (month == 9) || (month == 11))
			{
			if ( (day > 30) || (day < 1) )
				{
				alert ("mes no puede tener mas de 30 días");
				return false;
				}
			}
		if (month == 2)
			{
			if (year % 4 == 0)
				{
				if ( (day > 29) || (day < 1) )
					{
					alert ("mes no puede tener mas de 29 días");
					return false;
					}
				}
			else
				{
				if ( (day > 28) || (day < 1) )
					{
					alert ("mes no puede tener mas de 28 días");
					return false;
					}
				}
			}
		return true;
}
function Fecha2MayorFecha1(fecha1, fecha2)
{
	var dia1;
	var dia2;
	var mes1;
	var mes2;
	var ano1;
	var ano2;

	if (isEmpty(fecha1) || isEmpty(fecha2))
		{
		return false
		}
	else
		{
		ano1 = fecha1.substring(0,4);
		mes1 = fecha1.substring(5,7);
		dia1 = fecha1.substring(8,10);
		ano1 = parseInt(ano1,10);
		mes1 = parseInt(mes1,10);
		dia1 = parseInt(dia1,10);

		ano2 = fecha2.substring(0,4);
		mes2 = fecha2.substring(5,7);
		dia2 = fecha2.substring(8,10);
		ano2 = parseInt(ano2,10);
		mes2 = parseInt(mes2,10);
		dia2 = parseInt(dia2,10);

		if (ano2 > ano1)
			{
			return true
			}
		else if (ano2 < ano1)
			{
			//alert ("Fecha inicio mayor que fecha fin");
			return false
			}
		else
			{
			if (mes2 > mes1)
				{
				return true
				}
			else if (mes2 < mes1)
				{
				//alert ("Fecha inicio mayor que fecha fin");
				return false
				}
			else 
				{
				if (dia2 > dia1)
					{
					return true
					}
				else if (dia2 < dia1)
					{
					//alert ("Fecha inicio mayor que fecha fin");
					return false
					}
				else
					{
					return true
					}
				}
			}
		}
}
function TextoBiblioteca2(idioma,codigoBiblioteca){
if (idioma=="E"){
	if (codigoBiblioteca=="TOL")
		texto="Artxibo Liburutegia";
	if (codigoBiblioteca=="PEÑ")
		texto="Sebe Peña liburutegia"
	}
else{
	if (codigoBiblioteca=="TOL")
		texto="Biblioteca del archivo";
	if (codigoBiblioteca=="PEÑ")
		texto="Biblioteca Sebe Peña"
}
return(texto);
}

