// ActionScript Document
/*
function noticiasOver(alvo)
{
	document.getElementById('noticia'+alvo).style.backgroundPosition='0 -135px';
	document.getElementById('noticias'+alvo).style.color='#383838';
}

function noticiasOut(alvo)
{
	document.getElementById('noticia'+alvo).style.backgroundPosition='0 0';
	document.getElementById('noticias'+alvo).style.color='#878787';
}

function abreLink(link)
{
	window.location = link;
}
*/

function destaqueOver(alvo)
{
	if ( alvo == '_4' || alvo == '_8' || alvo == '_11')
	{
		document.getElementById('destaque_capa'+alvo).style.backgroundImage='url(img/div-vertical.png)';
		document.getElementById('destaque_capa'+alvo).style.backgroundRepeat='repeat-x';
	}
	else
	{
		document.getElementById('destaque_capa'+alvo).style.backgroundRepeat='repeat-x';
	}
	
}

function destaqueOut(alvo)
{
	if ( alvo == '_4' || alvo == '_8' || alvo == '_11')
	{
		document.getElementById('destaque_capa'+alvo).style.backgroundImage='none';
	}
	else
	{
		document.getElementById('destaque_capa'+alvo).style.backgroundRepeat='no-repeat';	
	}
}

function abreLink(link)
{
	window.location = link;
}



function validaDadosAreaClientes()
{
	d = document.getElementById('frEntrar');
	
	if (d.txtidentificacao.value == "")
	{
		alert("O campo usuráio é obrigatório");
		return false;
	}
	if (d.txtsenha.value == "")
	{
		alert("O campo senha é obrigatório");
		return false;
	}
	return true;
}


function validaForm(){
		//validar nome
		d = document.getElementById('formu');
		if (d.nome.value == ""){
			alert("O campo " + d.nome.name + " deve ser preenchido!");
			d.nome.focus();
			return false;
		}
		
		//validar email
		if (d.email.value == ""){
			alert("O campo " + d.email.name + " deve ser preenchido!");
			d.email.focus();
			return false;
		}
		//validar email(verificao de endereco eletronico)
		parte1 = d.email.value.indexOf("@");
		parte2 = d.email.value.indexOf(".");
		parte3 = d.email.value.length;
		if (!(parte1 >= 3 && parte2 >= 6 && parte3 >= 9)) {
			alert("O campo " + d.email.name + " deve ser conter um endereço eletrônico válido!");
			d.email.focus();
			return false;
		}
		//validar telefone
		if (d.telefone.value == ""){
			alert("O campo " + d.telefone.name + " deve ser preenchido!");
			d.telefone.focus();
			return false;
		}
		//validar telefone(verificacao se contem apenas numeros)
		/*if (isNaN(d.telefone.value)){
			alert("O campo " + d.telefone.name + " deve conter apenas numeros!");
			d.telefone.focus();
			return false;
		}*/
		if (d.assunto.options[assunto.selectedIndex].value=="")
       {
          alert("Escolha um Assunto!");
          d.assunto.focus();
          return false;
       }
       return true;
}


function abreAtuacao(objId,targ,restore){ //v9.0
  var selObj = null;  with (document) { 
  if (getElementById) selObj = getElementById(objId);
  if (selObj) eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0; }
}

