function plantillaimprime(id, idioma)
{
window.open("imprimir.php?idnoticia=" + id + "&lang=" + idioma,'titulo','toolbar=no,location=no,width=593,height=440,scrollbars=yes,resizable=no')
}

function vermapas(ruta)
{
window.open(ruta,'titulo','toolbar=no,location=no,scrollbars=no,width=550,height=400,resizable=no')
}

function verfoto(nombre,titulo)
{
ventana=window.open('','ventana','toolbar=no,location=no,scrollbars=no,resizable=no')
ventana.document.write('<html><head><title>' + titulo + '</title></head><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" scroll="no"><img src="' + nombre + '" onLoad="opener.redimensionar(this.width, this.height)"></body></html>')
ventana.document.close()
}

function redimensionar(ancho,alto)
{
ventana.resizeTo(ancho+10,alto+29);
ventana.moveTo((screen.width-ancho)/2,(screen.height-alto)/2); //centra la ventana. Eliminar si no se quiere centrar el popup
}

// Para visualizar la fecha
var pong;
function makeArray(n){
  this.length = n;
  for (i=1;i<=n;i++){
    this[i]=0;
  }
  return this;
}

// standard date display function with y2k compatibility
function displayDate() {
  var this_month = new makeArray(12);
  this_month[0]  = "Enero";
  this_month[1]  = "Febrero";
  this_month[2]  = "Marzo";
  this_month[3]  = "Abril";
  this_month[4]  = "Mayo";
  this_month[5]  = "Junio";
  this_month[6]  = "Julio";
  this_month[7]  = "Agosto";
  this_month[8]  = "Septiembre";
  this_month[9]  = "Octubre";
  this_month[10] = "Noviembre";
  this_month[11] = "Deciembre";

  var this_day_e = new makeArray(7);
  this_day_e[0]  = "Domingo";
  this_day_e[1]  = "Lunes";
  this_day_e[2]  = "Martes";
  this_day_e[3]  = "Miércoles";
  this_day_e[4]  = "Jueves";
  this_day_e[5]  = "Viernes";
  this_day_e[6]  = "Sábado";

  var today = new Date();
  var day   = today.getDate();
  var month = today.getMonth();
  var year  = today.getYear();
  var dia = today.getDay();
	if (year < 1000) {
       year += 1900; }
  return( " " + this_day_e[dia] + ", " + day + " de " + this_month[month] + " " + year);
}

function ventanaNueva(documento){	
	window.open(documento,'nuevaVentana','width=440,left=200,top=60,height=500,scrollbars=yes');
}

function reloj() {

// Obtiene la fecha actual
var fObj = new Date() ; 

// Obtiene la hora
var horas = fObj.getHours() ; 

// Obtiene los minutos
var minutos = fObj.getMinutes() ; 

// Obtiene los segundos
var segundos = fObj.getSeconds() ; 

// Si es menor o igual a 9 le concatena un 0
if (horas <= 9) horas = "0" + horas; 

// Si es menor o igual a 9 le concatena un 0
if (minutos <= 9) minutos = "0" + minutos; 

// Si es menor o igual a 9 le concatena un 0
if (segundos <= 9) segundos = "0" + segundos; 

// Asigna la hora actual a la caja de texto reloj
document.forma.reloj.value = horas+":"+minutos+":"+segundos;

}
setInterval("reloj()",1000);


