<!--

function popestatuto() {
	popup('../estatuto','estatuto','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=auto,resizable=no,copyhistory=no,width=504,height=380');
}

function popenviar(qualnoticia) {
	popup('pop_enviar.php?release='+ qualnoticia +'','enviar','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=auto,resizable=no,copyhistory=no,width=450,height=345');
}

function popmostracanais(qualcanal) {
	popup('associacao_pop_canal.php?canal='+ qualcanal +'','mostracanal','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=auto,resizable=no,copyhistory=no,width=450,height=345');
}

function popimprimir(qualnoticia) {
	popup('pop_press.php?release='+ qualnoticia +'','popimprimir','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=520,height=400');
}

function popnoticia(qualnoticia,qualpagina) {
	popup('pop_noticia.php?noticia='+ qualnoticia +'&pagina='+ qualpagina +'','noticia','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=auto,resizable=no,copyhistory=no,width=796,height=435');
}

function popafiliada(numero) {
	popup('pop_afiliar.php?numero='+ numero +'','afiliada','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=auto,resizable=no,copyhistory=no,width=796,height=435');
}

function popup(url,nome,pr){
	window.open(url,nome,pr);
}

/***************************************************************************************************************************
  Selecionador de estilos
***************************************************************************************************************************/
function selecionarCSS(){
	estiloCerto=(document.getElementById)?'ie.css':((document.all)?'ie.css':'ns.css');
	correcaoPath=((document.location+'-').indexOf('/content')!=-1)?'../../':'';
	document.write('<link rel="stylesheet" href="'+correcaoPath+'styles/'+estiloCerto+'" type="text/css">')
}
selecionarCSS();

/***************************************************************************************************************************
  Verifica Campos
***************************************************************************************************************************/

function verificacanal() {
 parceiro=document.frmParceiros.Canal.options[document.frmParceiros.Canal.selectedIndex].value;
 if (parceiro=="null") {
  window.alert("Caro usuário, \n\nÉ necessário escolher um \nde nossos canais na lista \npara vę-lo. \n\nObrigado!");
  document.frmParceiros.Canal.focus();
  return;
 }
 else {
  document.frmParceiros.submit();
 }
}

function verificaestado() {
 estado=document.frmBuscaEstado.estado.options[document.frmBuscaEstado.estado.selectedIndex].value;
 if (estado=="null") {
  window.alert("Caro usuário, \n\nEscolha um estado \npara realizar a busca. \n\nObrigado!");
  document.frmBuscaEstado.estado.focus();
  return;
 }
 else {
  document.frmBuscaEstado.submit();
 }
}

function verificapalavra() {
 palavra=document.frmBuscaPalavra.palavrachave.value;
 if (palavra==" palavra-chave") {
  window.alert("Caro usuário, \n\nEspecifique uma palavra \npara realizar a busca. \n\nObrigado!");
  document.frmBuscaPalavra.palavrachave.focus();
  return;
 }
 else {
  document.frmBuscaPalavra.submit();
 }
}

function verificalogon() {
 user=document.frmLogon.usuario.value;
 pass=document.frmLogon.senha.value;
 if ((user==" nome usu&aacute;rio") || (pass==" senha")) {
  window.alert("Caro usuário, \n\nÉ necessário preencher os \ncampos com o seu nome de \nusuário e senha para se logar. \n\nObrigado!");
  document.frmLogon.usuario.focus();
  return;
 }
 else {
  document.frmLogon.submit();
 }
}

/***************************************************************************************************************************
  Troca de imagens
***************************************************************************************************************************/
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


/***************************************************************************************************************************
  Menu em árvore
***************************************************************************************************************************/

//Ficar aberto ao abrir outro item
var stayFolded = false		

//Do you want images (if not set to 0 and remove the images from the body)?
foldImg = 0

//Vertical space adjustment between the main items, in pixels.
mainOffsetY = 0


/**********************************************************************************   
FoldoutMenu 
*   Copyright (C) 2001 <a href="/dhtmlcentral/thomas_brattli.asp">Thomas Brattli</a>
*   This script was released at DHTMLCentral.com
*   Visit for more great scripts!
*   This may be used and changed freely as long as this msg is intact!
*   We will also appreciate any links you could give us.
*
*   Made by <a href="/dhtmlcentral/thomas_brattli.asp">Thomas Brattli</a> 
*********************************************************************************/

function lib_bwcheck(){ //Browsercheck (needed)
	this.ver=navigator.appVersion
	this.agent=navigator.userAgent
	this.dom=document.getElementById?1:0
	this.opera5=this.agent.indexOf("Opera 5")>-1
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0; 
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
	this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
	this.ie=this.ie4||this.ie5||this.ie6
	this.mac=this.agent.indexOf("Mac")>-1
	this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
	return this
}
var bw=new lib_bwcheck()

//This is the default image.
//Remember to change the actual images in the page as well, but remember to keep the name of the image.
var unImg=new Image();
unImg.src='../../images/menu/blt_menuitem.gif'

var exImg=new Image();					//Making an image variable...
exImg.src='../../images/menu/blt_menuitem.gif'	//...this is the source of the image that it changes to when the menu expands.

// NOTE: if you change the position of divCont from absolute to relative, you can put the foldoutmenu in a table.
// HOWEVER it will no longer work in netscape 4. If you wish to support netscape 4, you have to use absolute positioning.

/*** There should be no need to change anything beyond this. ***/

// A unit of measure that will be added when setting the position of a layer.
var px = bw.ns4||window.opera?"":"px";

if(navigator.userAgent.indexOf('Opera')>-1 && document.getElementById){ //Opera 5 resize fix.
	scrX= innerWidth; scrY= innerHeight;
	document.onmousemove= function(){
		if(scrX<innerWidth-10 || scrY<innerHeight-10 || scrX>innerWidth+10 || scrY>innerHeight+10){
			scrX = innerWidth;
			scrY = innerHeight;
			initFoldout();
		}
	};
}

//object constructor...
function makeMenu(obj,nest){
	nest= (!nest)?"":'document.'+nest+'.';
	this.el= bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):document.getElementById(obj);	
   	this.css= bw.ns4?this.el:this.el.style;
	this.ref= bw.ns4?this.el.document:document;		
	this.x= (bw.ns4||bw.opera5)?this.css.left:this.el.offsetLeft;
	this.y= (bw.ns4||bw.opera5)?this.css.top:this.el.offsetTop;
	this.h= (bw.ie||bw.ns6)?this.el.offsetHeight:bw.ns4?this.ref.height:bw.opera5?this.css.pixelHeight:0;
    this.vis= b_vis;
	this.hideIt= b_hideIt;
    this.showIt= b_showIt;
    this.moveIt= b_moveIt;
	return this
}
//object methods...
function b_showIt(){this.css.visibility='visible'}
function b_hideIt(){this.css.visibility='hidden'}
function b_vis(){if(this.css.visibility=='hidden' || this.css.visibility=='HIDDEN' || this.css.visibility=='hide') return true;}
function b_moveIt(x,y){this.x=x; this.y=y; this.css.left=this.x+px; this.css.top=this.y+px}

/************************************************************************************
This is the function that changes the sub menus to folded or unfolded state.
************************************************************************************/
function menu(num){
	if(bw.bw){
		if (!stayFolded){
			for (var i=0; i<oSub.length; i++){
				if (i!=num){
					oSub[i].hideIt()
					if (foldImg)oTop[i].ref["imgA"+i].src = unImg.src
				}
			}
			for(var i=1; i<oTop.length; i++){
				oTop[i].moveIt(0,oTop[i-1].y+oTop[i-1].h)
			}
		}
		if (oSub[num].vis()){
			oSub[num].showIt()
			if (foldImg)oTop[num].ref["imgA"+num].src = exImg.src
		}else{
			oSub[num].hideIt()
			if(foldImg)oTop[num].ref["imgA"+num].src = unImg.src
		}
		for(var i=1; i<oTop.length; i++){ 
			if (!oSub[i-1].vis()) oTop[i].moveIt(0,oTop[i-1].y+oTop[i-1].h+oSub[i-1].h+mainOffsetY) 
			else oTop[i].moveIt(0,oTop[i-1].y+oTop[i-1].h+mainOffsetY)
		}
	}
}

/*********************************************************************
The init function... there should be no need to change anything here.
*********************************************************************/
function initFoldout() {
	//Fixing the browsercheck for opera... this can be removed if the browsercheck has been updated!!
	bw.opera5 = (navigator.userAgent.indexOf("Opera")>-1 && document.getElementById)?true:false
	if (bw.opera5) bw.ns6 = 0

	oTop = new Array()
	oSub = new Array()
	//Making the objects and hiding the subs...
	for (var i=0; i<FoldNumber; i++){
		oTop[i] = new makeMenu('divTop'+i,'divCont')
		oSub[i] = new makeMenu('divSub'+i,'divCont.document.divTop'+i)
		oSub[i].hideIt()
	}
	
	//Positioning the top objects...
	oTop[0].moveIt(0,0)
	for (var i=1; i<oTop.length; i++){
		oTop[i].moveIt(0, oTop[i-1].y+oTop[i-1].h+mainOffsetY)
	}
	
	//Making the containing menu object and showing it...
	oCont = new makeMenu('divCont')
	oCont.showIt()

}

// If the browser is ok, the script is started onload...
// if(bw.bw) onload = initFoldout





// -->