// myDate = new Date()
// document.write(myDate.toLocaleString())
var relojid = new Array()
var relojidoutside = new Array()
var dows = new Array("Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado")
var months = new Array("enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre")
var i_reloj = -1
var thistime = new Date()
var hours = thistime.getHours()
var minutes = thistime.getMinutes()
var seconds = thistime.getSeconds()
var dow = thistime.getDay()
var dia = thistime.getDate()
var mes = thistime.getMonth()
var hora = thistime.getTime()
var year = thistime.getYear()
if (eval(hours) <10) {hours="0"+hours}
if (eval(minutes) < 10) {minutes="0"+minutes}
if (seconds < 10) {seconds="0"+seconds}
var thistime = hours+":"+minutes+":"+seconds
	
function writereloj() {
	i_reloj++
	if (document.all || document.getElementById || document.layers) {
		relojid[i_reloj]="reloj"+i_reloj
		document.write(dows[dow]+", "+dia+" de "+months[mes]+" de "+year)
		document.write(" - <span id='"+relojid[i_reloj]+"' style='position:relative'>"+thistime+"</span>")
	}
}

function relojon() {
	thistime= new Date()
	hours=thistime.getHours()
	minutes=thistime.getMinutes()
	seconds=thistime.getSeconds()
	dow = thistime.getDay()
	dia = thistime.getDate()
	mes = thistime.getMonth()
	hora = thistime.getTime()
	year = thistime.getYear()
	if (eval(hours) <10) {hours="0"+hours}
	if (eval(minutes) < 10) {minutes="0"+minutes}
	if (seconds < 10) {seconds="0"+seconds}
	thistime = hours+":"+minutes+":"+seconds
		
	if (document.all) {
		for (i=0;i<=relojid.length-1;i++) {
			var thisreloj=eval(relojid[i])
			thisreloj.innerHTML=thistime
		}
	}
	
	if (document.getElementById) {
		for (i=0;i<=relojid.length-1;i++) {
			document.getElementById(relojid[i]).innerHTML=thistime
		}
	}
	var timer=setTimeout("relojon()",1000)
}
window.onload=relojon








 