
function getDateFormat(){
	return privateOnSecond();
}

function onSecond(){
    return false;
    hora = privateOnSecond();
    document.getElementById("curTime").innerHTML =  hora;
    window.setTimeout("onSecond()", 1000);
}


function privateOnSecond(){

    var now = new Date();
    var sec;
    var mins;
    var hrs;
    var hora;
    var tiempo="A.M.";

    if(now.getSeconds() < 10) sec = "0" + now.getSeconds();
    else sec = now.getSeconds();

    if(now.getMinutes() < 10) mins = "0" + now.getMinutes();
    else mins = now.getMinutes();

    hrs = now.getHours();
    if(now.getHours() >= 12 && now.getHours() <=24){
      tiempo = "P.M.";
      if(now.getHours() > 12){
        hrs = now.getHours() - 12;
      }
    }

    meses = new Array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio",
                      "Agosto","Septiembre","Octubre","Noviembre","Diciembre");
    fecha = new Date();
    fechaStr = fecha.getDate()+ " de " + meses[fecha.getMonth()]+", "+fecha.getFullYear();


    hora = fechaStr + " " + hrs + ":" + mins + ":" + sec + " " + tiempo;
    return hora;
}
