// JavaScript Document
function saudacao() {
var today = new Date();
var hrs = today.getHours();

if (hrs < 12)
document.write("Bom dia");
else if (hrs < 18)
document.write("Boa tarde");
else
document.write("Boa noite");
}

function writeDate(){
    var thetime=new Date();
    var nday=thetime.getDay();
    var nmonth=thetime.getMonth();
    var ntoday=thetime.getDate();
    var nyear=thetime.getYear();

    if (nday==0) nday="Domingo";
    if (nday==1) nday="Segunda";
    if (nday==2) nday="Terça";
    if (nday==3) nday="Quarta";
    if (nday==4) nday="Quinta";
    if (nday==5) nday="Sexta";
    if (nday==6) nday="Sábado";

	if (nmonth==0) nmonth="janeiro";
	if (nmonth==1) nmonth="fevereiro";
	if (nmonth==2) nmonth="março";
	if (nmonth==3) nmonth="abril";
	if (nmonth==4) nmonth="maio";	
	if (nmonth==5) nmonth="junho";	
	if (nmonth==6) nmonth="julho";	
	if (nmonth==7) nmonth="agosto";	
	if (nmonth==8) nmonth="setembro";	
	if (nmonth==9) nmonth="outubro";
	if (nmonth==10) nmonth="novembro";
	if (nmonth==11) nmonth="dezembro";
	
    if (nyear<=99)
        nyear= "19"+nyear;
    if ((nyear>99) && (nyear<2000))
        nyear+=1900;
    document.write(nday+", "+ntoday+" de "+nmonth+" de "+nyear);
}

<!-- Begin
function scrollit(seed) {
var m1  = "Bem vindo ao site da APAE - Alfenas ";
var m2  = "..... obrigado por nos visitar! ";
var m3  = "";
var m4  = "";
var msg=m1+m2+m3+m4;
var out = " ";
var c   = 1;
if (seed > 100) {
seed--;
cmd="scrollit("+seed+")";
timerTwo=window.setTimeout(cmd,100);
}
else if (seed <= 100 && seed > 0) {
for (c=0 ; c < seed ; c++) {
out+=" ";
}
out+=msg;
seed--;
window.status=out;
cmd="scrollit("+seed+")";
timerTwo=window.setTimeout(cmd,100);
}
else if (seed <= 0) {
if (-seed < msg.length) {
out+=msg.substring(-seed,msg.length);
seed--;
window.status=out;
cmd="scrollit("+seed+")";
timerTwo=window.setTimeout(cmd,100);
}
else {
window.status=" ";
timerTwo=window.setTimeout("scrollit(100)",75);
      }
   }
}
// End -->

<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
