/*
O script a seguir permite que a data e o horário do sistema sejam exibidos na tela, no formato: Exemplo de Data: Segunda, 25 de Dezembro de 2001 Exemplo de Horário: 05:00
*/


function ObjDataHora()
{
	var agora = new Date();
	this.dia = agora.getDate();
	this.mes = agora.getMonth();
	this.ano = agora.getFullYear();
	this.hor = agora.getHours();
	this.min = agora.getMinutes();
	this.sem = agora.getDay();
	this.pad = function(s, n) {
		s = '0000' + s;
		return (s.substring(s.length - n, s.length));
	
	}
	this.NomeSem = function() {
		var aDia = new Array( 'Domingo', 'Segunda', 'Ter&ccedil;a', 'Quarta', 'Quinta', 'Sexta', 'S&aacute;bado' );
		return aDia[this.sem];
	}
	this.NomeMes = function() {
		var aMes = new Array( 'Janeiro', 'Fevereiro', 'Mar&ccedil;o', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro' );
		return aMes[this.mes];
	}
	this.MostraData = function() {
		document.write(this.NomeSem() + ', ' + this.dia + ' de ' + this.NomeMes() + ' de ' + this.pad(this.ano, 4));
	}
	this.MostraHorario = function() {
		document.write(this.pad(this.hor, 2) + ':' + this.pad(this.min, 2));
	}
	return this;
}
var oDataHora = new ObjDataHora;


/*
O código abaixo deve ser copiado antes da tag </head>
<script language="javascript" src="mostradata.js"></script>

Copie o código abaixo onde deseja exibir a data:
<script language="javascript">
oDataHora.MostraData();
</script>

Copie o código abaixo onde deseja exibir o horário:
<script language="javascript">
oDataHora.MostraHorario();
</script>


*/
