function hora() {
//{
hora = new Date()
var dia = hora.getDate();
var mes = hora.getMonth();
var anio = hora.getFullYear();
horas = hora.getHours()
minutos = hora.getMinutes()
segundos = hora.getSeconds()
if (mes <= 9) mes = "0" + mes
if (horas >= 12) tiempo = " p.m."
else tiempo = " a.m."
if (horas > 12) horas -= 12
if (horas == 0) horas = 12
if (minutos <= 9) minutos = "0" + minutos
if (segundos <= 9) segundos = "0" + segundos
document.write(horas + ":" + minutos + ":" + segundos + tiempo);

//setInterval("actualizar()",1000)

}

//window.onload=actualizar

//}

function fechareloj(tipo) {

  var this_month = new Array(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] = "Diciembre";

  var this_day_e = new Array(7);
  this_day_e[0]  = "Domingo";
  this_day_e[1]  = "Lunes";
  this_day_e[2]  = "Martes";
  this_day_e[3]  = "Mi&eacute;rcoles";
  this_day_e[4]  = "Jueves";
  this_day_e[5]  = "Viernes";
  this_day_e[6]  = "S&aacute;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; }

if(tipo==1)
 	document.write (this_day_e[dia] + ", " + day + " de " + this_month[month] + " de " + year);
else
	document.write (day + " de " + this_month[month] + " de " + year);

}

function curios_fecha(tipo) {

  var this_month = new Array(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] = "Diciembre";

  var this_day_e = new Array(7);
  this_day_e[0]  = "Domingo";
  this_day_e[1]  = "Lunes";
  this_day_e[2]  = "Martes";
  this_day_e[3]  = "Mi&eacute;rcoles";
  this_day_e[4]  = "Jueves";
  this_day_e[5]  = "Viernes";
  this_day_e[6]  = "S&aacute;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; }

if(tipo==1)
 	document.write ("<p class='day'>" + day + "</p><p class=' month'>" + this_month[month] + "&nbsp;" + year);
else
	document.write (day + " de " + this_month[month] + " de " + year);

}
