//Crea una variable Temp para almacenar la hora y minutos con estilo
var Temp;
setClock();
function setClock() {
Temp = "";
now = new Date();
var CurHour = now.getHours();
var CurMinute = now.getMinutes();
now = null;
if( CurHour >= 12) {
ampm = 1;
}
else
ampm = 0;
if( CurHour > 12 ) {
CurHour = CurHour - 12;
}
if( CurHour == 0 )
CurHour = 12;
if( CurMinute < 10 )
CurMinute = "0" + CurMinute;
CurHour = "<span>" + CurHour + ":" + CurMinute + "</span>";
if( ampm == 1 )
CurHour = CurHour + " p.m.";
else
CurHour = CurHour + " a.m.";
Temp = CurHour;
}
function pathOnly (InString)  {
LastSlash=InString.lastIndexOf ('/', InString.length-1)
OutString=InString.substring  (0, LastSlash+1)
return (OutString);     
}

// Get today's current date.
var now = new Date();
// Array list of days.
var days = new Array('Domingo','Lunes','Martes','Mi&eacute;rcoles','Jueves','Viernes','S&aacute;bado');
// Array list of months.
var months = new Array('Enero','Febrero','Marzo','Abril','Mayo','Junio','Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre');
// Calculate the number of the current day in the week.
var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();
// Calculate four digit year.
function fourdigits(number)	{
	return (number < 1000) ? number + 1900 : number;
           			}
// Join it all together
today =  days[now.getDay()] + ", " +
              date + " de " +
               months[now.getMonth()] + " de " +
                (fourdigits(now.getYear())) +",";
