<!-- Funções em Javascript -->

//Início da função de data
 
       hoje = new Date() 
 
        dia = hoje.getDate() 
 
        dias = hoje.getDay() 
 
        mes = hoje.getMonth() 
 
        ano = hoje.getFullYear() 
 
        mes = mes + 1  
     

        if (mes < 10) 
               mes = "0" + mes 
                
        if (dia < 10) 
                dia = "0" + dia 
 
 
        function CriaArray (n) { 
 
        this.length = n } 
 
 
        NomeDia = new CriaArray(7) 
 
        NomeDia[0] = "Dom" 
 
        NomeDia[1] = "Seg" 
 
        NomeDia[2] = "Ter" 
 
        NomeDia[3] = "Qua" 
 
        NomeDia[4] = "Qui" 
 
        NomeDia[5] = "Sex" 
 
        NomeDia[6] = "S&aacute;b" 
   
       // 
 
        NomeMes = new CriaArray(12) 
 
        NomeMes[0] = "Jan" 
 
        NomeMes[1] = "Fev" 
 
        NomeMes[2] = "Mar" 
 
        NomeMes[3] = "Abr"
 
        NomeMes[4] = "Mai" 
 
        NomeMes[5] = "Jun" 
 
        NomeMes[6] = "Jul" 
 
        NomeMes[7] = "Ago" 
 
        NomeMes[8] = "Set" 
 
        NomeMes[9] = "Out" 
 
        NomeMes[10] = "Nov" 
 
        NomeMes[11] = "Dez" 
 
        // 
 
function Writedate() { 
           document.write ("" + NomeDia[dias] + "  " + dia + "/" + mes + "/" + ano + "") 
  
} 

//Início da função de data

//Incício da função de Hora


<!--  JAVAscript Preset 
var timerID = null; 
var timerRunning = false; 
function stopclock() 
{ 
    if(timerRunning) 
        clearTimeout(timerID) 
    timerRunning = false; 
} 
 
function startclock() 
{ 
    stopclock(); 
    showtime(); 
} 
 
function showtime() 
{ 
    var now = new Date(); 
    var hours = now.getHours(); 
    var minutes = now.getMinutes(); 
    //var seconds = now.getSeconds(); 
    var timeValue = "" + ((hours > 12) ? hours - 12 : hours); 
    timeValue  += ((minutes < 10) ? ":0" : ":") + minutes; 
    //timeValue  += ((seconds < 10) ? ":0" : ":") + seconds; 
    timeValue  += (hours >= 12) ? " p.m" : " a.m"; 
    document.clock.face.value = timeValue; 
    timerID = setTimeout("showtime()",1000); 
    timerRunning = true; 
} 
//--> 
 
 
 
function Writetime() 
{ 
     startclock ();    
} 
 
//Fim da função de Hora



// JavaScript Document

