<!--
// Store the date in a variable
d = new Date()
dateText = " Hoy es "

// Get the current day and convert it to the name of the day
dayValue = d.getDay()
if (dayValue == 0)
    dateText += "Domingo, "
else if (dayValue == 1)
    dateText += "Lunes, "
else if (dayValue == 2)
    dateText += "Martes, "
else if (dayValue == 3)
    dateText += "Miercoles, "
else if (dayValue == 4)
    dateText += "Jueves, "
else if (dayValue == 5)
    dateText += "Viernes, "
else if (dayValue == 6)
    dateText += "Sabado, "

// Get the current month and convert it to the name of the month
monthValue = d.getMonth()
dateText += " "
if (monthValue == 0)
    dateText += "Enero"
if (monthValue == 1)
    dateText += "Febrero"
if (monthValue == 2)
    dateText += "Marzo"
if (monthValue == 3)
    dateText += "Abril"
if (monthValue == 4)
    dateText += "Mayo"
if (monthValue == 5)
    dateText += "Junio"
if (monthValue == 6)
    dateText += "Julio"
if (monthValue == 7)
    dateText += "Agosto"
if (monthValue == 8)
    dateText += "Septiembre"
if (monthValue == 9)
    dateText += "Octubre"
if (monthValue == 10)
    dateText += "Noviembre"
if (monthValue == 11)
    dateText += "Deciembre"

// Get the current year; if it's before 2000, add 1900
if (d.getYear() < 2000) 
    dateText += " " + d.getDate() + " del  " + (1900 + d.getYear())
else 
    dateText += " " + d.getDate() + " del  " + (d.getYear())


// Get the current minutes
minuteValue = d.getMinutes()
if (minuteValue < 10)
    minuteValue = "0" + minuteValue

// Get the current hours
hourValue = d.getHours()

// Customize the greeting based on the current hours
if (hourValue < 12)
    {
    greeting = "Buenos Dias;"
    timeText = "  " + hourValue + ":" + minuteValue + " AM"
    }
else if (hourValue == 12)
    {
    greeting = "Buenas Tardes;"
    timeText = "" + hourValue + ":" + minuteValue + " PM"
    }
else if (hourValue < 17)
    {
    greeting = "Buenas Tardes;"
    timeText = "" + (hourValue-12) + ":" + minuteValue + " PM"
    }
else
    {
    greeting = "Buenas Noches;"
    timeText = "" + (hourValue-12) + ":" + minuteValue + " PM"
    }
// Write the greeting, the date, and the time to the page
document.write(greeting + "" + dateText +", y tu hora de acceso a esta página fue a las "+ timeText)
//-->