/******
ESTILOS
******/
function menu_on(obj){
	obj.style.backgroundColor = "#D9E1F3";
}

function menu_off(obj){
	obj.style.backgroundColor = "#ffffff";
}

function Relacionados(){
 document.getElementById("assuntos_relacionados").style.display = "none"
}
/***********
FIM: ESTILOS
***********/


/****
POPUP
****/
function OpenPopup(arq, width, height, scroll){    
 var URL = arq 
 var W = width 
 var H = height 
 var S = scroll 
 var Wpopupsize =(W/2); 
 var Hpopupsize =(H/2); 
 var CenterPopUpX = (screen.width/2)-(Wpopupsize); 
 var CenterPopUpY = (screen.height/2)-(Hpopupsize); 
 var pos = "left="+CenterPopUpX+",top="+CenterPopUpY; 
 var desktop = window.open( ""+URL, "_blank", "width="+W+",height="+H+",toolbar=no,location=no,status=no,menubar=no,scrollbars="+S+",resizable=no,"+pos); 
} 
/*********
FIM: POPUP
*********/


/************
VALIDA E-MAIL
************/
function ValidaEmail(email) {
 var formato_errado = "(@.*@)|(\\.\\.)|(@\\.)|(\\.@)|(^\\.)";
 var formato_certo = "^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$";
 var errado = new RegExp(formato_errado);
 var certo = new RegExp(formato_certo);
 return (!errado.test(email) && certo.test(email))
}
/*****************
FIM: VALIDA E-MAIL
*****************/


/***
ABAS
***/
function abas(n, qtde){
 for(x=1;x<=qtde;x++){
  aba = eval('document.getElementById("aba' + x + '");');
		aba_cont = eval('document.getElementById("aba_cont' + x + '").style;');
  if(x==n){
   aba.className = 'current';
			aba_cont.display = '';
  }else {
   aba.className = '';
			aba_cont.display = 'none';
  }
 }
}
/********
FIM: ABAS
********/
