// DEVUELVE LA FECHA ACTUAL FORMATEADA
function getFecha() {

	var monthNames = new Array();
	monthNames[0] = "Enero";
	monthNames[1] = "Febrero";
	monthNames[2] = "Marzo";
	monthNames[3] = "Abril";
	monthNames[4] = "Mayo";
	monthNames[5] = "Junio";
	monthNames[6] = "Julio";
	monthNames[7] = "Agosto";
	monthNames[8] = "Septiembre";
	monthNames[9] = "Octubre";
	monthNames[10] = "Noviembre";
	monthNames[11] = "Diciembre";

	// Array de los días
	var dayNames = new Array();
	dayNames[0] = "Domingo";
	dayNames[1] = "Lunes";
	dayNames[2] = "Martes";
	dayNames[3] = "Mi&eacute;rcoles";
	dayNames[4] = "Jueves";
	dayNames[5] = "Viernes";
	dayNames[6] = "S&aacute;bado";

	var now = new Date();
	var year = now.getYear();

	if (year < 2000) year = year + 1900;	

	//return (dayNames[now.getDay()] + " " + now.getDate() + " de " + monthNames[now.getMonth()] + " " +" de " + year);
	return (dayNames[now.getDay()] + ", " + now.getDate() + " - " + (now.getMonth()+1) + " - " + (year+"").substr(2));
}			

// RECUPERA UN PARAMETRO CONCRETO DE LA URL
function getParametro(parametro) {
	var regexS = "[\\?&]"+parametro+"=([^&#]*)";
	var regex = new RegExp ( regexS );
	var tmpURL = window.location.href;
	var results = regex.exec( tmpURL );
	if( results == null )
		return "";
	else
	  return results[1];	
} 

function verArticulo() {
	var articulo = getParametro("art");
	if (articulo == "" || !document.getElementById("articuloId"+articulo)) {
    articulo = "1";
	}
	for (var i=1;i<=6;i++) {
		if (""+i != articulo) {
      //document.getElementById("articuloIdRef"+i).style.display = "block";  
			document.getElementById("articuloIdRef"+i).style.visibility = "visible";
		} else {
			document.getElementById("articuloIdRef"+i).style.display = "none";  
		}
		
	}
	document.getElementById("articuloId"+articulo).style.display = "block";
	//document.getElementById("articuloId"+articulo).style.visibility = "visible";
}
/*
// HACE APARECER UN ARTÍCULO EN CONCRETO Y POR DEFECTO LA PORTADA
function verArticulo() {
	var articulo = getParametro("art");
	if (articulo == "" || !document.getElementById(articulo)) {
		articulo = "cuerpoDefecto";
		document.getElementById("cabeceraId").style.display = "block";
	}
	
  document.getElementById(articulo).style.display = "block";
}*/

