// JavaScript Document
function janela (url, lar, alt)
{
	window.open(url, "", "location=no, directories=no, resizable=no, toolbar=no, status=no, menubar=no, scrollbars=yes, width="+lar+", height="+alt);
}

function UR_Start() 
{
	UR_Nu = new Date;
	UR_Indhold = getTheDate() + " " + showFilled(UR_Nu.getHours()) + ":" + showFilled(UR_Nu.getMinutes()) + ":" + showFilled(UR_Nu.getSeconds());
	UR_Indhold += (UR_Nu.getHours() >= 12) ? " P.M." : " A.M.";
	document.getElementById("ur").innerHTML = UR_Indhold;
	setTimeout("UR_Start()",1000);
}

function showFilled(Value) 
{
	return (Value > 9) ? "" + Value : "0" + Value;
}

function getTheDate() {

               Todays = new Date();

               TheDate = "     " + (((Todays.getDate()) < 10) ? ("0" +(Todays.getDate())) : (Todays.getDate())) +" / "+ (((Todays.getMonth() + 1) < 10) ? ("0" +(Todays.getMonth() + 1)) : (Todays.getMonth() + 1)) + " / " + Todays.getFullYear() 

               return TheDate;

}

function mudaFonte( tipo , id_do_div )
{
	var tam = document.getElementById(id_do_div).style.fontSize;
	tam = parseInt(tam.replace(/px/,""));
	alert(tam);
	if( tipo == 'mais' ) { if(tam < 16) tam += 2; }
	else { if(tam > 8) tam -= 2; }
	document.getElementById(id_do_div).style.fontSize=tam+'px';
}

function mudaFonteId( tipo, id_do_div, tamini ) 
{
	var div = document.getElementById(id_do_div);
	var tags = div.getElementsByTagName('p');
	for(i=0; i<tags.length; i++)
			{
			var tam = tags[i].style.fontSize;
			if(tam == '')tam = tamini;
			tam = parseInt(tam);
			if( tipo == 'mais' )
			  { 
			  if(tam < 18) tam += 2;
			  }
			  else
			  {
				  if(tam > 10) tam -= 2;
			  }
			var e = tags[i].style.fontSize=tam+'px';
			}
}

