// JavaScript Document/
// Get today's current date.
var now = new Date();

// Array list of days.
var days = new Array('Domingo','Segunda','Ter&ccedil;a','Quarta','Quinta','Sexta','S&aacute;bado');

// Array list of months.
var months = new Array('Janeiro','Fevereiro','Mar&ccedil;o','Abril','Maio','Junho','Julho','Agosto','Setembro','Outubro','Novembro','Dezembro');

// 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 = "Bem vindo. " + days[now.getDay()] + ", " +
             date + " de " +
			  months[now.getMonth()] + " de " +
               (fourdigits(now.getYear())) ;

// Print out the data.
document.write("" +today+ ".");
