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

function removerImg(id, nome_id, tabela, img, campo, pagina)
{
	if (confirm("Tem certeza que deseja remover a imagem '" + img + "' ?"))
	{
		window.location = "apaga-imagem.php?id=" + id + "&imagem=" + img + "&campo=" + campo + "&tabela=" + tabela + "&nome_id=" + nome_id + "&pagina=" + pagina
	}	
}

function mudacor(ref,cor)
{
  ref.style.borderColor=cor;
}

function tirarBorda(nome_campo)
{
	document.getElementById(nome_campo).style.border="solid 1px #ccc";
}

function mudaCor(ref)
{
	ref.style.border="solid 1px #ff0000";
	ref.style.background="#FFF";
}

function voltaCor(ref)
{
	ref.style.border="solid 1px #226484";
	ref.style.background="#FFF";
}

function avaliaContato()
{
	var doc = document.frmContato;
	
	if(doc.nome.value == "")
	{
		alert("Informe o nome de contato");
		document.getElementById("nome").style.border='solid 1px #ff0000';
		/*document.getElementById("nome").style.background='#f1f1f1';*/
		doc.nome.focus();
		return false;
	}
	
	if(doc.email.value == "")
	{
		alert("Informe o email corretamente");
		document.getElementById("email").style.border='solid 1px #ff0000';
		doc.email.focus();
		return false;
	}
	
	if((doc.email.value.indexOf("@") == -1) || (doc.email.value.indexOf(".") == -1))
	{
		alert("Informe o email corretamente");
		document.getElementById("email").style.border='solid 1px #ff0000';
		doc.email.focus();
		return false;
	}
}





