function orar() {
options = 'scrollbars=yes,width=700,height=400';
window.open
('http://www.arquidiocese-bh.org.br/oracao/abre.asp?id=67','oracao',options)
;
}
function abrir(dt)
	{ 
		options = 'scrollbars=yes,width=220,height=500';
		window.open("liturgia/lit_dia.php?dt="+dt,"janela",options);
	}

hoje = new Date()
frase = "" //para colocar uma frase após o bom dia
natal = new Date("March 27, 2005")
natal.setYear = hoje.getYear;		
dias = (natal.getTime() - hoje.getTime()) / (1000*60*60*24);
dias = Math.floor(dias) + 1;


if (dias > 1) //usado para dizer quantos dias faltam para uma data - ver a data acima
{
	frase="Faltam "+dias+" dias para a Páscoa.";
}
else if (dias == 1)
{
	frase="Falta 1 dia para a Páscoa."
}
else
{
	frase=""
}
/*else if (dias == 0)
{
	frase="Feliz Natal!"
}
else if (dias < -6 && dias >-13)
{
	frase="Feliz Ano Novo!"
}*/

if(hoje.getMinutes() < 10){ 
	pad = "0"}
else 
pad = "";
if((hoje.getHours() < 12) && (hoje.getHours() >= 5)){
	mensagem="<FONT color=yellow><B>Bom Dia! "+frase+" </B></FONT>"
}
if((hoje.getHours() >= 12) && (hoje.getHours() < 18)){
	mensagem="<FONT color=yellow><B>Boa Tarde! "+frase+" </B></FONT>"
}
if((hoje.getHours() >= 18) && (hoje.getHours() <= 23)){
	mensagem="<FONT color=yellow><B>Boa Noite! "+frase+" </B></FONT>"
} 
if((hoje.getHours() >= 0) && (hoje.getHours() < 5)){
	mensagem="<FONT color=yellow><B>Na madruga, hein! "+frase+" </B></FONT>"
}
function getCookieVal (offset) 
   {
   var endstr = document.cookie.indexOf (";", offset);
   if (endstr == -1)
      endstr = document.cookie.length;
   return unescape(document.cookie.substring(offset, endstr));
   }
function GetCookie (name) 
   {
   var arg = name + "=";
   var alen = arg.length;
   var clen = document.cookie.length;
   var i = 0;
   while (i < clen) 
     {
      var j = i + alen;
      if (document.cookie.substring(i, j) == arg)
         return getCookieVal (j);
      i = document.cookie.indexOf(" ", i) + 1;
      if (i == 0) 
         break; 
      }
   return null;
   }
function SetCookie (name, value) 
   {
   var argv = SetCookie.arguments;
   var argc = SetCookie.arguments.length;
   var expires = (2 < argc) ? argv[2] : null;
   var path = (3 < argc) ? argv[3] : null;
   var domain = (4 < argc) ? argv[4] : null;
   var secure = (5 < argc) ? argv[5] : false;
   document.cookie = name + "=" + escape (value) +
     ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
     ((path == null) ? "" : ("; path=" + path)) +
     ((domain == null) ? "" : ("; domain=" + domain)) +
        ((secure == true) ? "; secure" : "");
   }
function ResetCounts(name) 
   {
   visits = 0;
   SetCookie("visits", visits, expdate , "/", null, false);
   location.reload();
   }
var expdate = new Date();
var visits;
// Set expiration date to a year from now.
expdate.setTime(expdate.getTime() +  (24 * 60 * 60 * 1000 * 365)); 
if(!(visits = GetCookie("visits"))) 
   visits = 0;
visits++;
SetCookie("visits", visits, expdate, "/", null, false);
visitas="<center class='visitas'> "+  "Você visitou esta página  " 
+"<FONT COLOR=lightblue> <b>" +visits+ "</b></FONT>"
+"  vezes."+"</center>"

//function inicio(){	
//	msg.innerHTML=mensagem+visitas;
	//options = 'scrollbars=no,width=300,height=200';
	//window.open("diversos/natal.htm","janela",options);
//}

	
	
	/*<!-- Begin
	if (document.all) {
	yourLogo = "  <<< FELIZ NATAL! >>>  ";
	logoFont = "verdana"
	logoColor = "000000";
	yourLogo = yourLogo.split('');
	L = yourLogo.length;
	TrigSplit = 360 / L;
	Sz = new Array()
	logoWidth = 100;
	logoHeight = -30;
	ypos = 0;
	xpos = 0;
	step = 0.03;
	currStep = 0;
	document.write('<div id="outer" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
	for (i = 0; i < L; i++) {
	document.write('<div id="ie" style="position:absolute;top:0px;left:0px;'
	+'width:10px;height:10px;font-family:'+logoFont+';font-size:12px;'
	+'color:'+logoColor+';text-align:center">'+yourLogo[i]+'</div>');
	}
	document.write('</div></div>');
	function Mouse() {
	ypos = event.y;
	xpos = event.x - 5;
	}
	document.onmousemove=Mouse;
	function animateLogo() {
	outer.style.pixelTop = document.body.scrollTop;
	for (i = 0; i < L; i++) {
	ie[i].style.top = ypos + logoHeight * Math.sin(currStep + i * TrigSplit * Math.PI / 180);
	ie[i].style.left = xpos + logoWidth * Math.cos(currStep + i * TrigSplit * Math.PI / 180);
	Sz[i] = ie[i].style.pixelTop - ypos;
	if (Sz[i] < 5) Sz[i] = 5;
	ie[i].style.fontSize = Sz[i] / 1.7;
	}
	currStep -= step;
	setTimeout('animateLogo()', 20);
	}
	window.onload = animateLogo;
	}
	//-->*/

