function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function portalTISS(id)
{
	window.open(id, "","channelmode,scrollbars")
}

function vertical()
{
	var navItems = document.getElementById("nav").getElementsByTagName("li");
	
	for (var i=0; i< navItems.length; i++)
	{
		if(navItems[i].className == "submenu")
		{
			navItems[i].onmouseover=function()
			{
				this.getElementsByTagName('ul')[0].style.display = "block";
			}
			
			navItems[i].onmouseout=function()
			{
				this.getElementsByTagName('ul')[0].style.display = "none";
			}
		}
	}
}

function Redireciona(opcao)
{
	if(opcao != "")
	{
		document.location.href = opcao;
	}
}

function detalhes(id)
{
	if (document.getElementById("div_"+id).style.display == "none")
	{
		document.getElementById("div_"+id).style.display = 'block';
	}
	else
	{
		document.getElementById("div_"+id).style.display = 'none';
	}
}

dia = new Date();
ano = dia.getYear();
if (ano < 2000) // correçao para browsers que retornam 100 no ano 2000
{
ano = 1900 + dia.getYear();
}

mes = new Array("Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro")
dia_semana = new Array("Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado");

function escreveData()
{
 document.writeln(dia_semana[dia.getDay()] + ", " + dia.getDate() + " de " +  mes[dia.getMonth()] + " de " + ano);
}

day = new Date(); 
hr = day.getHours(); 
if ((hr >= 0) && (hr <=5))
{
	t = "Boa Madrugada!";
}
if ((hr >= 6) && (hr <=11))
{
	t = "Bom dia!";
}
if ((hr >= 12) && (hr <=17))
{
	t = "Boa Tarde!";
}
if ((hr >= 18) && (hr <=23))
{
	t = "Boa Noite!";
}

function escreveSaud()
{
	document.writeln(t);
}


//verificar dados Urologia
function valida_dados(formUrologia)
{
	var v_nome = formUrologia.Nome.value;
	var v_em = formUrologia.Especialidade_Médica.value;
	var v_email = formUrologia.Email.value;
	
	if(v_nome == "" || v_em == "" || v_email == "")
	{
		alert("Os campos nome, especialidade médica e e-mail são obrigatórios.");
		return false;
	}
	return true;
}
