﻿/*CSS Browser Selector v0.2.9Rafael Lima (http://rafael.adm.br)http://rafael.adm.br/css_browser_selectorLicense: http://creativecommons.org/licenses/by/2.5/Contributors: http://rafael.adm.br/css_browser_selector#contributors*/var css_browser_selector = function() {var ua=navigator.userAgent.toLowerCase(),is=function(t){return ua.indexOf(t) != -1;},h=document.getElementsByTagName('html')[0],b=(!(/opera|webtv/i.test(ua))&&/msie\s(\d)/.test(ua))?('ie ie'+RegExp.$1):is('firefox/2')?'gecko ff2':is('firefox/3')?'gecko ff3':is('gecko/')?'gecko':is('opera/9')?'opera opera9':/opera\s(\d)/.test(ua)?'opera opera'+RegExp.$1:is('konqueror')?'konqueror':is('chrome')?'chrome webkit safari':is('applewebkit/')?'webkit safari':is('mozilla/')?'gecko':'',os=(is('x11')||is('linux'))?' linux':is('mac')?' mac':is('win')?' win':'';var c=b+os+' js'; h.className += h.className?' '+c:c;}(); 
function pageLoad()
{
var isAsyncPostback = Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack();
if (isAsyncPostback) {
tb_init('a.thickbox, area.thickbox, input.thickbox');
}
}
function foo()
{
    var o = window.event.srcElement;
    if (o.tagName == "INPUT" && o.type == "checkbox")
    {
        __doPostBack("","");
    } 
}
// Máscara Moeda

function BlockKeybord()
{
    if((event.keyCode < 48) || (event.keyCode > 57))
    {
        event.returnValue = false;
    }
}

function troca(str,strsai,strentra)
{

    while(str.indexOf(strsai)>-1)
    {
        str = str.replace(strsai,strentra);
    }
    return str;
}

function FormataMoeda(campo,tammax,teclapres,caracter)
{
var tecla;
    if(teclapres == null || teclapres == "undefined")
        tecla = -1;
    else
        tecla = teclapres.keyCode;

    if(caracter == null || caracter == "undefined")
        caracter = ".";

vr = campo.value;

    if(caracter != "")
    {
        vr = troca(vr,caracter,"");
    }
    vr = troca(vr,"/","");
    vr = troca(vr,",","");
    vr = troca(vr,".","");

tam = vr.length;

    if(tecla > 0)
    {
        if(tam < tammax && tecla != 8)
        {
            tam = vr.length + 1;
        }
        if(tecla == 8)
        {
            tam = tam - 1;
        }
    }
    if(tecla == -1 || tecla == 8 || tecla >= 48 && tecla <= 57 || tecla >= 96 && tecla <= 105)
    {
        if(tam <= 2)
        { 
            campo.value = vr;
        }
        if((tam > 2) && (tam <= 5))
        {
            campo.value = vr.substr(0, tam - 2) + ',' + vr.substr(tam - 2, tam);
        }
        if((tam >= 6) && (tam <= 8))
        {
            campo.value = vr.substr(0, tam - 5) + caracter + vr.substr(tam - 5, 3) + ',' + vr.substr(tam - 2, tam);
        }
        if((tam >= 9) && (tam <= 11))
        {
            campo.value = vr.substr(0, tam - 8) + caracter + vr.substr(tam - 8, 3) + caracter + vr.substr(tam - 5, 3) + ',' + vr.substr(tam - 2, tam);
        }
        if((tam >= 12) && (tam <= 14))
        {
            campo.value = vr.substr(0, tam - 11) + caracter + vr.substr(tam - 11, 3) + caracter + vr.substr(tam - 8, 3) + caracter + vr.substr(tam - 5, 3) + ',' + vr.substr(tam - 2, tam);
        }
        if((tam >= 15) && (tam <= 17))
        {
            campo.value = vr.substr(0, tam - 14) + caracter + vr.substr(tam - 14, 3) + caracter + vr.substr(tam - 11, 3) + caracter + vr.substr(tam - 8, 3) + caracter + vr.substr(tam - 5, 3) + ',' + vr.substr(tam - 2, tam);
        }
    }
}

// Somente numeros
function onlynumber(myfield, e,tolerado)
{
    var tecla  = window.event?event.keyCode:event.which;
	if (tecla == 13 || tecla == 8 || tecla == 37 || tecla == 39 || tecla == 9)
        return true;
       
	else if (tecla>47 && tecla<58)
           return true;	
    else
           return false;
}   

// Formatando o RG        
function Formato_RG(input, e){
	var keyCode = (isNN) ? e.which : e.keyCode;

	 if (keyCode != 8){
		if(input.value.length == 2){
			input.value = input.value+'.';
		}
		if(input.value.length == 6){
			input.value = input.value+'.';
		}
		else if(input.value.length == 10){
			input.value = input.value+'-';
		}
	}
}
// Início do código de Aumentar/ Diminuir a letra  
	var tagAlvo = new Array('p','a','em','div','span'); 
	//pega todas as tags p//  
	// Especificando os possíveis tamanhos de fontes, poderia ser: x-small, small...
	var tamanhos = new Array( '9px','10px','11px','12px','13px','14px','15px' );
	var tamanhoInicial = 2;
	function mudaTamanho( idAlvo,acao ){
	if (!document.getElementById) 
	return   
	var selecionados = null,tamanho = tamanhoInicial,i,j,tagsAlvo;
	tamanho += acao; 
	
	if ( tamanho < 0 )
		tamanho = 0;   
	if ( tamanho > 6 )
			tamanho = 6;
			tamanhoInicial = tamanho;

	if ( !( selecionados = document.getElementById( idAlvo ) ) )
		selecionados = document.getElementsByTagName( idAlvo )[ 0 ];
		selecionados.style.fontSize = tamanhos[ tamanho ];

	for ( i = 0; i < tagAlvo.length; i++ )
	{    
		tagsAlvo = selecionados.getElementsByTagName( tagAlvo[ i ] );
		for ( j = 0; j < tagsAlvo.length; j++ ) tagsAlvo[ j ].style.fontSize = tamanhos[ tamanho ];
	} 
	} 
	// Fim do código de Aumentar/ Diminuir a letra   
// Formatando o CPF        
function Formato_CPF(input, e){
	 var keyCode;
    
	if (window.event)
		keyCode = window.event.keyCode;
	else if (e)
		keyCode = e.which;
	 if (keyCode != 8){
		if(input.value.length == 3){
			input.value = input.value+'.';
		}
		if(input.value.length == 7){
			input.value = input.value+'.';
		}
		else if(input.value.length == 11){
			input.value = input.value+'-';
		}
	}
}

// Formatando o CNPJ
function Formato_CNPJ(input, e)
{
    var keyCode;
    
	if (window.event)
		keyCode = window.event.keyCode;
	else if (e)
		keyCode = e.which;
	
    if (keyCode != 8)
	{ 
		if(input.value.length == 3 || input.value.length == 7)
			input.value = input.value+'.';
	
	    if (input.value.length == 11)
	        input.value = input.value+'/';
	        
	    if (input.value.length == 16)
	        input.value = input.value+'-';
	}
}
        
// Formatando o CEP
function Formato_CEP(input, e)
{
    var keyCode;
    
	if (window.event)
		keyCode = window.event.keyCode;
	else if (e)
		keyCode = e.which;
	
    if (keyCode != 8)
	{ 
		if(input.value.length == 5)
			input.value = input.value+'-';
	}
}

// Formatando o Fone
function Formato_Fone(input, e)
{
    var keyCode;
    
	if (window.event)
		keyCode = window.event.keyCode;
	else if (e)
		keyCode = e.which;
	
    if (keyCode != 8)
	{ 
	if(input.value.length == 1)
			input.value = '('+input.value;
	if(input.value.length == 3)
	    input.value = input.value+')';
		if(input.value.length == 8)
			input.value = input.value+'-';
	}
}

// Formatando o Fone
function Formato_Fone2(input, e)
{
    var keyCode;
    
	if (window.event)
		keyCode = window.event.keyCode;
	else if (e)
		keyCode = e.which;
	
    if (keyCode != 8)
	{ 
	    if(input.value.length == 4)
	        input.value = input.value+'-';		
	}
}


// Formatando o Data
function Formato_Data(input, e)
{
    var keyCode;
    
	if (window.event)
		keyCode = window.event.keyCode;
	else if (e)
		keyCode = e.which;
	
    if (keyCode != 8)
	{ 
		if(input.value.length == 2 || input.value.length == 5)
			input.value = input.value+'/';
	}
}

// Formatando o Hora
function Formato_Hora(input, e)
{
    var keyCode;
    
	if (window.event)
		keyCode = window.event.keyCode;
	else if (e)
		keyCode = e.which;
	
    if (keyCode != 8)
	{ 
		if(input.value.length == 2)
			input.value = input.value+':';
	}
}
            


function EnviarBuzz(BuzzCloud_Id){
    // paramentros para o método //
    var pArea = "Atualiza_Qtde_Buzzcloud";
    var pUrl = "/ajax/conteudo.aspx?Area="+pArea+"&pBuzzCloud_Id="+BuzzCloud_Id;
    var pDivResultado = document.getElementById("DivResultado");
   
    // método para recuperar o retorno ;
    ajax_conteudo(getRequestXml(),pUrl,pDivResultado);
    
}

function getRequestXml()
{
    if (window.XMLHttpRequest){
        http_request = new XMLHttpRequest();
        
        if (http_request.overrideMimeType) 
            http_request.overrideMimeType('text/xml');
        
    }else if (window.ActiveXObject){
        try{
            http_request = new ActiveXObject("Msxml2.XMLHTTP");
        }catch (e){
            // Faz nada
        }
        
        if(!http_request){
            try{
                http_request= new ActiveXObject("Microsoft.XMLHTTP");
            }catch (e){// Faz nada 
            }
        }
    }
   
    if (!http_request)
        alert('Sem suporte há esta funcionalidade');
    else
        return http_request;
      
}

// Conteudo //
function ajax_conteudo(xmlHttp,url,div_resultado)
{       
    xmlHttp.onreadystatechange = function() {ajax_conteudo_ready(xmlHttp,div_resultado);}
    xmlHttp.open("GET", url, true);
    xmlHttp.send(null);
}

function ajax_conteudo_ready(xmlHttp,div_resultado){
    if (xmlHttp.readyState == 4){ 
        if (xmlHttp.status == 200){
            retorno = xmlHttp.responseText;
            
            if(retorno != ""){
                div_resultado.innerHTML = "";
                div_resultado.innerHTML = retorno;
            }else{ 
                div_resultado.style.display = "none";
                div_resultado.innerHTML = "";
            }
        }
    }
}

function Formatar_Numero(Valor)
{
	Valor = Valor.toString();	

	if(Valor.indexOf(",",0) >= 0 && Valor.indexOf(".",0) >= 0)
		Valor = Valor.replace(".","").replace(",",".");
	else if(Valor.indexOf(",",0) >= 0)
		Valor = Valor.replace(",",".");

	var Numero = parseFloat(Valor);

	
	
	if(Numero)
	{
		var Formatado = Math.round(Numero * 100).toString();
		var Qtd = Formatado.length - 2;
		
		if(Qtd == -1)
			Formatado = "0,0" + Formatado
		else
			Formatado = Formatado.substring(0,Qtd) + "," + Formatado.substring(Qtd,Formatado.length)
		
		if(Qtd > 3)
		{
			Final = Formatado.substring(Qtd,Qtd + 3)
			
			for(var i=3; i < Qtd ; i=i+3)
				Final = "." + Formatado.substring(Qtd - i,(Qtd - i) + 3) + Final
			
			Final = Formatado.substring(0,Qtd - (i-3)) + Final;
		}
		else if(Qtd == 0)
			Final = "0" + Formatado;
		else
			Final = Formatado;

		return Final;
	}
	else
		return "0,00"
}

function AbrirVideo(video)
{
    var player;
    
    if (player != null)
    {
        player.close();
    }
	
	player = window.open("/upload/conteudo/videos/Player.aspx?Video_Id="+video,"","scrollbars=no,location=no,directories=no,status=no,menubar=no,resizable=no,toolbar=no,top="+(screen.height-280)/2+",left="+(screen.width-320)/2+",width=320,height=280");
}

function Upper(Campo)
{
	if(Campo.value.length != -1)
	{
		if (window.event)
		{
			var key = window.event.keyCode;
			
			if((key > 96 && key < 123) || (key > 223 && key < 254))
			{
				key = key - 32;
				window.event.keyCode = key;
			}	
		}
	}
}

function containsElement(arr, ele) {
var found = false, index = 0;
while(!found && index < arr.length)
if(arr[index] == ele)
found = true;
else
index++;
return found;
}
function getIndex(input) {
var index = -1, i = 0, found = false;
while (i < input.form.length && index == -1)
if (input.form[i] == input)index = i;
else i++;
return index;
}

function autoTab(input,len,e) {

var keyCode = (isNN) ? e.which : e.keyCode;
var filter = (isNN) ? [0,8,9] : [0,8,9,16,17,18,37,38,39,40,46];
if(input.value.length >= len && !containsElement(filter,keyCode)) {
input.value = input.value.slice(0, len);
input.form[(getIndex(input)+1) % input.form.length].focus();
}
}

function Deletar(){
var c = confirm("Deseja realmente deletar este registro?");
if(c)
    return true;
else
    return false;
}
function ShowHide(div){
    if(document.getElementById(div).style.display=='none')
        document.getElementById(div).style.display='block';
    else
        document.getElementById(div).style.display='none';
}

// Formatando o Fone
function Formato_DDD(input, e)
{
    var keyCode;
    
	if (window.event)
		keyCode = window.event.keyCode;
	else if (e)
		keyCode = e.which;
	
    if (keyCode != 8)
	{ 
	    if(input.value.length == 0)
	        input.value = input.value+'(';
		if(input.value.length == 3)
			input.value = input.value+')';
		if(input.value.length == 8)
		    input.value = input.value+'-';
	}
}
function ExibeGaleriaDescricao(i,n,d){
   document.getElementById("gdi").src="/upload/galeria/media/"+i;   

    if(document.getElementById("lblnomeGaleria")!=null)
    document.getElementById("lblnomeGaleria").innerHTML=n;
    ExibeGaleriaDescricao2(d)
}
function ExibeGaleriaDescricao2(d){
alert(d)
    if(document.getElementById("lbldescricaoGaleria")!=null)
    document.getElementById("lbldescricaoGaleria").innerHTML=d;
}

function goBack() {
history.back();
}

function clickButton(e, buttonid){ 

      var evt = e ? e : window.event;

      var bt = document.getElementById(buttonid);

      if (bt){ 

          if (evt.keyCode == 13){ 

                bt.click(); 

                return false; 

          } 

      } 

}
function qtdDigitos(n,campo){

    if(document.getElementById(campo).value.length<n){
    document.getElementById(campo).focus();
        return false;
    }else
        return true;

}
    // Painel de chamadas rotativo com botões para navegação
//eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('s 6=1H.6||{};6.9={B:j,7:j,k:j,v:{1j:"C",1k:"D",V:"1I",L:"1J"},w:"",i:0,D:0,C:0,W:!!1K.1L.1M(/1N/g),r:j,x:10,M:l,n:m.X("E"),F:l,N:0,1O:8(a){5.B=m.1P(a.1Q);5.x=a.x||5.x;5.w=a.w||5.w;5.v=a.v||5.v;f(1l Y=="1R"){Y=0}5.F=F=(m.G.1m("1n=1")==-1)?o:l;5.7=5.B.y("1S");5.Z(5.i);5.1o();f(5.7.p==1){a.11=o}q{5.1p()}f(m.G.1m("12=1")!=-1){a.11=o}f(!a.11){5.O()}q{5.z("L")}},13:{P:8(a){f(a.P){a.P()}q{a.1T=l}},1q:8(c,b,a){f(m.1r){c.1r("1U"+b,a)}q{f(m.1s){c.1s(b,a,o)}}}},O:8(a){f((!a&&5.r==j)||(a&&5.r!=j)){1t(5.r);5.r=1V(8(){6.9.14(1)},6.9.x*1u);m.G="12=0; 15=/";5.z("V")}q{m.G="12=1; 15=/";1t(5.r);5.r=j;5.z("L")}},z:8(a){f(5.k!=j){s b=5.k.y("a")[1];b.t="1W"+a;b.16=5.v[a]}},Z:8(a){5.i=(1X(a)+(5.i||5.7.p))%5.7.p;5.D=((5.i||5.7.p)-1)%5.7.p;5.C=((5.i||5.7.p)+1)%5.7.p},A:8(b,d,c){f(d){b.h.Q=0;b.h.H="R(S=0)"}q{b.h.Q=1;b.h.H="R(S=17)"}6.9.M=o;18(s a=1;a<=10;a++){19(8(e){1Y 8(){f(6.9.W){b.h.H="R(S="+(d?10*e:17-10*e)+")"}q{b.h.Q=(d?0.1*e:1-0.1*e)}f(e==10){6.9.M=l;f(6.9.W){b.h.H="1a"}f(1l c=="8"){c()}}}}(a),1Z*a)}},1v:8(){m.G="1n=1; 15=/";5.F=l;20(6.9.1w);5.1b()},1b:8(){5.A(5.n,l,8(){6.9.n.h.T="1a";6.9.k.h.T="1x"});5.A(5.k,o,j)},14:8(b){s a=5.i;5.21=l;5.N++;f(Y==1&&5.F&&5.N>0&&5.N%5.7.p==0){5.n.h.T="1x";5.n.t="n";5.n.16=\'<a u="\'+22+\'" U="23"><I 1c="\'+24+\'" 1d="0" /></a><E J="25"><I 1c="1y://1z.I.1A.1B.1C/1D/26.1E" J="27" 1d="0" /><a u="28:29(0)" 2a="6.9.1v()"><I 1c="1y://1z.I.1A.1B.1C/1D/n-2b.1E" 1d="0" /></E>\';5.B.1e(5.n);5.A(5.n,o,8(){6.9.k.h.T="1a"});5.A(5.k,l,j);f(5.r!=j){6.9.1w=19(8(){6.9.1b()},6.9.x*1u)}}q{5.Z(b);5.7[5.i].t=5.7[5.i].t.2c(/1f/g,"");5.7[5.i].h.1g=3;5.7[a].h.1g=4;5.7[5.i].h.Q=1;5.7[5.i].h.H="R(S=17)";5.A(5.7[a],l,8(){6.9.7[a].t="1f";6.9.7[a].h.1g=2},o);5.1h();f(5.r==j){5.z("L")}q{5.z("V")}}},1p:8(){5.k=m.X("E");5.k.t="2d";5.1h();5.B.1e(5.k)},1o:8(){s b=m.X("E");b.t="2e";18(s a=0;a<5.7.p;a++){f(a>0){5.7[a].t+=" 1f"}5.7[a].1e(b.2f(o))}},1h:8(){5.k.16="<a K=\'-1\' u=\'"+5.7[5.D].y("a")[0].u+"\' J=\'D\' 1i=\'"+5.w+"\'>"+5.v.1k+"</a>      <a K=\'0\' u=\'"+5.7[5.i].y("a")[0].u+"\' J=\'\' 1i=\'"+5.w+"\'></a>      <a K=\'+1\' u=\'"+5.7[5.C].y("a")[0].u+"\' J=\'C\' 1i=\'"+5.w+"\'>"+5.v.1j+"</a>";s b=5.k.y("a");18(s a=0;a<b.p;a++){5.13.1q(b[a],"2g",8(c){6.9.1F(c)})}},1F:8(a){6.9.13.P(a);f(a.1G){a.U=a.1G}f(a.U.K==0){6.9.O()}q{f(6.9.M==l){19(8(){6.9.14(a.U.K);6.9.O(o)},2h)}}}};',62,142,'|||||this|UOLLib|itens|function|rotativoDeChamadas||||||if||style|ativado|null|botoes|false|document|banner|true|length|else|timeOut|var|className|href|botoesTxts|botoesRefClickUOL|timer|getElementsByTagName|setBtStopPlay|fadeIO|painel|proximo|anterior|div|showBanner|cookie|filter|img|class|rel|play|animando|contaTrocas|stopPlay|preventDefault|opacity|Alpha|Opacity|display|target|stop|navMSIE|createElement|mostrabanner|setNavegacao||startOff|rotativoDeChamadasStop|events|navegar|path|innerHTML|100|for|setTimeout|none|bannerFadeOut|src|border|appendChild|desativado|zIndex|writeBotoesHTML|name|next|prev|typeof|indexOf|rotativoDeChamadasNoBanner|aplicarSombras|montarBotoes|add|attachEvent|addEventListener|clearInterval|1000|fecharBanner|bannerFadeOutTimer|block|http|home|uol|com|br|h3|gif|btNavegacaoClick|srcElement|window|parar|executar|navigator|userAgent|match|MSIE|init|getElementById|id|undefined|li|returnValue|on|setInterval|bt|parseInt|return|75|clearTimeout|removerBanner|mostrabannerLINK|_blank|mostrabannerIMG|rodape|pub_h_120_b|txtPublicidade|javascript|void|onclick|fechar|replace|botoesNavegacao|sombra|cloneNode|click|30'.split('|'),0,{}))
//eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('t 6=1L.6||{};6.8={D:j,7:j,k:j,x:{1n:"E",1o:"F",Y:"1M",O:"1N"},n:"",i:0,F:0,E:0,Z:!!1O.1P.1Q(/1R/g),r:j,y:10,P:l,o:m.11("G"),H:l,Q:0,1S:9(a){5.D=m.1T(a.1U);5.y=a.y||5.y;5.n=a.n||5.n;5.x=a.x||5.x;f(1p 12=="1V"){12=0}5.H=H=(m.I.1q("1r=1")==-1)?s:l;5.7=5.D.z("1W");5.13(5.i);5.1s();f(5.7.p==1){a.14=s}q{5.1t()}f(m.I.1q("15=1")!=-1){a.14=s}f(!a.14){5.R()}q{5.A("O")}},16:{S:9(a){f(a.S){a.S()}q{a.1X=l}},1u:9(c,b,a){f(m.1v){c.1v("1Y"+b,a)}q{f(m.1w){c.1w(b,a,s)}}}},R:9(a){f((!a&&5.r==j)||(a&&5.r!=j)){1x(5.r);5.r=1Z(9(){6.8.17(1)},6.8.y*1y);m.I="15=0; 18=/";5.A("Y")}q{m.I="15=1; 18=/";1x(5.r);5.r=j;5.A("O")}},A:9(a){f(5.k!=j){t b=5.k.z("a")[1];b.v="20"+a;b.19=5.x[a]}},13:9(a){5.i=(21(a)+(5.i||5.7.p))%5.7.p;5.F=((5.i||5.7.p)-1)%5.7.p;5.E=((5.i||5.7.p)+1)%5.7.p},B:9(b,d,c){f(d){b.h.T=0;b.h.C="1a(1b=0)"}q{b.h.T=1;b.h.C="1a(1b=1z)"}6.8.P=s;1c(t a=1;a<=10;a++){1d(9(e){22 9(){f(6.8.Z){b.h.C="1a(1b="+(d?10*e:1z-10*e)+")"}q{b.h.T=(d?0.1*e:1-0.1*e)}f(e==10){6.8.P=l;f(1p c=="9"){c()}}}}(a),23*a)}},1A:9(){m.I="1r=1; 18=/";5.H=l;24(6.8.1B);5.1e()},1e:9(){5.B(5.o,l,9(){6.8.o.h.U="V";6.8.k.h.U="1C"});5.B(5.k,s,j)},17:9(b){t a=5.i;5.25=l;5.Q++;f(12==1&&5.H&&5.Q>0&&5.Q%5.7.p==0){5.o.h.U="1C";5.o.v="o";5.o.19=\'<a w="\'+26+\'" J="27"><K 1f="\'+28+\'" 1g="0" /></a><G L="29"><K 1f="1D://1E.K.M.1F.1G/1H/2a.1I" L="2b" 1g="0" /><a w="2c:2d(0)" 2e="6.8.1A()"><K 1f="1D://1E.K.M.1F.1G/1H/o-2f.1I" 1g="0" /></G>\';5.D.1h(5.o);5.B(5.o,s,9(){6.8.k.h.U="V"});5.B(5.k,l,j);f(5.r!=j){6.8.1B=1d(9(){6.8.1e()},6.8.y*1y)}}q{5.13(b);5.7[5.i].v=5.7[5.i].v.W(/1i/g,"");5.7[5.i].h.1j=3;5.7[a].h.1j=4;5.7[5.i].h.T=1;5.7[5.i].h.C="V";5.B(5.7[a],l,9(){f(6.8.Z){6.8.7[a].h.C=6.8.7[a].h.C="V"}6.8.7[a].v="1i";6.8.7[a].h.1j=2});5.1k();f(5.r==j){5.A("O")}q{5.A("Y")}}},1t:9(){5.k=m.11("G");5.k.v="2g";5.1k();5.D.1h(5.k)},1s:9(){t b=m.11("G");b.v="2h";1c(t a=0;a<5.7.p;a++){f(a>0){5.7[a].v+=" 1i"}5.7[a].1h(b.2i(s))}},1k:9(){5.k.19="<a N=\'-1\' w=\'"+5.7[5.F].z("a")[0].w.W(/(^.*?X\\.M.*?1l\\=).*?(&u\\=.*?)$/g,"$1"+5.n+"$2")+"\' L=\'F\' 1m=\'"+5.n+"\'>"+5.x.1o+"</a>      <a N=\'0\' w=\'"+5.7[5.i].z("a")[0].w.W(/(^.*?X\\.M.*?1l\\=).*?(&u\\=.*?)$/g,"$1"+5.n+"$2")+"\' L=\'\' 1m=\'"+5.n+"\'></a>      <a N=\'+1\' w=\'"+5.7[5.E].z("a")[0].w.W(/(^.*?X\\.M.*?1l\\=).*?(&u\\=.*?)$/g,"$1"+5.n+"$2")+"\' L=\'E\' 1m=\'"+5.n+"\'>"+5.x.1n+"</a>";t b=5.k.z("a");1c(t a=0;a<b.p;a++){5.16.1u(b[a],"X",9(c){6.8.1J(c)})}},1J:9(a){6.8.16.S(a);f(a.1K&&!a.J){a.J=a.1K}f(a.J.N==0){6.8.R()}q{f(6.8.P==l){1d(9(){6.8.17(a.J.N);6.8.R(s)},2j)}}}};',62,144,'|||||this|UOLLib|itens|rotativoDeChamadas|function||||||if||style|ativado|null|botoes|false|document|botoesRefClickUOL|banner|length|else|timeOut|true|var||className|href|botoesTxts|timer|getElementsByTagName|setBtStopPlay|fadeIO|filter|painel|proximo|anterior|div|showBanner|cookie|target|img|class|uol|rel|play|animando|contaTrocas|stopPlay|preventDefault|opacity|display|none|replace|click|stop|navMSIE||createElement|mostrabanner|setNavegacao|startOff|rotativoDeChamadasStop|events|navegar|path|innerHTML|Alpha|Opacity|for|setTimeout|bannerFadeOut|src|border|appendChild|desativado|zIndex|writeBotoesHTML|rf|name|next|prev|typeof|indexOf|rotativoDeChamadasNoBanner|aplicarSombras|montarBotoes|add|attachEvent|addEventListener|clearInterval|1000|100|fecharBanner|bannerFadeOutTimer|block|http|home|com|br|h3|gif|btNavegacaoClick|srcElement|window|parar|executar|navigator|userAgent|match|MSIE|init|getElementById|id|undefined|li|returnValue|on|setInterval|bt|parseInt|return|75|clearTimeout|removerBanner|mostrabannerLINK|_blank|mostrabannerIMG|rodape|pub_h_120_b|txtPublicidade|javascript|void|onclick|fechar|botoesNavegacao|sombra|cloneNode|30'.split('|'),0,{}))
/*eval(
function(p,a,c,k,e,r)
{
	e=function(c)
	{
	return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))
	};
	if(!''.replace(/^/,String))
	{
	while(c--)r[e(c)]=k[c]||e(c);
	k=[function(e)
	{
	return r[e]}];
		e=function()
		{
			return'\\w+'
		};
	c=1
	};
while(c--)
	if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);
return p
}
('t 6=1L.6||{};6.8={D:j,7:j,k:j,x:{1n:"E",1o:"F",Y:"1M",O:"1N"},n:"",i:0,F:0,E:0,Z:!!1O.1P.1Q(/1R/g),r:j,y:10,P:l,o:m.11("G"),H:l,Q:0,1S:9(a){5.D=m.1T(a.1U);5.y=a.y||5.y;5.n=a.n||5.n;5.x=a.x||5.x;f(1p 12=="1V"){12=0}5.H=H=(m.I.1q("1r=1")==-1)?s:l;5.7=5.D.z("1W");5.13(5.i);5.1s();f(5.7.p==1){a.14=s}q{5.1t()}f(m.I.1q("15=1")!=-1){a.14=s}f(!a.14){5.R()}q{5.A("O")}},16:{S:9(a){f(a.S){a.S()}q{a.1X=l}},1u:9(c,b,a){f(m.1v){c.1v("1Y"+b,a)}q{f(m.1w){c.1w(b,a,s)}}}},R:9(a){f((!a&&5.r==j)||(a&&5.r!=j)){1x(5.r);5.r=1Z(9(){6.8.17(1)},6.8.y*1y);m.I="15=0; 18=/";5.A("Y")}q{m.I="15=1; 18=/";1x(5.r);5.r=j;5.A("O")}},A:9(a){f(5.k!=j){t b=5.k.z("a")[1];b.v="20"+a;b.19=5.x[a]}},13:9(a){5.i=(21(a)+(5.i||5.7.p))%5.7.p;5.F=((5.i||5.7.p)-1)%5.7.p;5.E=((5.i||5.7.p)+1)%5.7.p},B:9(b,d,c){f(d){b.h.T=0;b.h.C="1a(1b=0)"}q{b.h.T=1;b.h.C="1a(1b=1z)"}6.8.P=s;1c(t a=1;a<=10;a++){1d(9(e){22 9(){f(6.8.Z){b.h.C="1a(1b="+(d?10*e:1z-10*e)+")"}q{b.h.T=(d?0.1*e:1-0.1*e)}f(e==10){6.8.P=l;f(1p c=="9"){c()}}}}(a),23*a)}},1A:9(){m.I="1r=1; 18=/";5.H=l;24(6.8.1B);5.1e()},1e:9(){5.B(5.o,l,9(){6.8.o.h.U="V";6.8.k.h.U="1C"});5.B(5.k,s,j)},17:9(b){t a=5.i;5.25=l;5.Q++;f(12==1&&5.H&&5.Q>0&&5.Q%5.7.p==0){5.o.h.U="1C";5.o.v="o";5.o.19=\'<a w="\'+26+\'" J="27"><K 1f="\'+28+\'" 1g="0" /></a><G L="29"><K 1f="1D://1E.K.M.1F.1G/1H/2a.1I" L="2b" 1g="0" /><a w="2c:2d(0)" 2e="6.8.1A()"><K 1f="1D://1E.K.M.1F.1G/1H/o-2f.1I" 1g="0" /></G>\';5.D.1h(5.o);5.B(5.o,s,9(){6.8.k.h.U="V"});5.B(5.k,l,j);f(5.r!=j){6.8.1B=1d(9(){6.8.1e()},6.8.y*1y)}}q{5.13(b);5.7[5.i].v=5.7[5.i].v.W(/1i/g,"");5.7[5.i].h.1j=3;5.7[a].h.1j=4;5.7[5.i].h.T=1;5.7[5.i].h.C="V";5.B(5.7[a],l,9(){f(6.8.Z){6.8.7[a].h.C=6.8.7[a].h.C="V"}6.8.7[a].v="1i";6.8.7[a].h.1j=2});5.1k();f(5.r==j){5.A("O")}q{5.A("Y")}}},1t:9(){5.k=m.11("G");5.k.v="2g";5.1k();5.D.1h(5.k)},1s:9(){t b=m.11("G");b.v="2h";1c(t a=0;a<5.7.p;a++){f(a>0){5.7[a].v+=" 1i"}5.7[a].1h(b.2i(s))}},1k:9(){5.k.19="<a N=\'-1\' w=\'"+5.7[5.F].z("a")[0].w.W(/(^.*?X\\.M.*?1l\\=).*?(&u\\=.*?)$/g,"$1"+5.n+"$2")+"\' L=\'F\' 1m=\'"+5.n+"\'>"+5.x.1o+"</a>      <a N=\'0\' w=\'"+5.7[5.i].z("a")[0].w.W(/(^.*?X\\.M.*?1l\\=).*?(&u\\=.*?)$/g,"$1"+5.n+"$2")+"\' L=\'\' 1m=\'"+5.n+"\'></a>      <a N=\'+1\' w=\'"+5.7[5.E].z("a")[0].w.W(/(^.*?X\\.M.*?1l\\=).*?(&u\\=.*?)$/g,"$1"+5.n+"$2")+"\' L=\'E\' 1m=\'"+5.n+"\'>"+5.x.1n+"</a>";t b=5.k.z("a");1c(t a=0;a<b.p;a++){5.16.1u(b[a],"X",9(c){6.8.1J(c)})}},1J:9(a){6.8.16.S(a);f(a.1K&&!a.J){a.J=a.1K}f(a.J.N==0){6.8.R()}q{f(6.8.P==l){1d(9(){6.8.17(a.J.N);6.8.R(s)},2j)}}}};',62,144,'|||||this|UOLLib|itens|rotativoDeChamadas|function||||||if||style|ativado|null|botoes|false|document|botoesRefClickUOL|banner|length|else|timeOut|true|var||className|href|botoesTxts|timer|getElementsByTagName|setBtStopPlay|fadeIO|filter|painel|proximo|anterior|div|showBanner|cookie|target|img|class|uol|rel|play|animando|contaTrocas|stopPlay|preventDefault|opacity|display|none|replace|click|stop|navMSIE||createElement|mostrabanner|setNavegacao|startOff|rotativoDeChamadasStop|events|navegar|path|innerHTML|Alpha|Opacity|for|setTimeout|bannerFadeOut|src|border|appendChild|desativado|zIndex|writeBotoesHTML|rf|name|next|prev|typeof|indexOf|rotativoDeChamadasNoBanner|aplicarSombras|montarBotoes|add|attachEvent|addEventListener|clearInterval|1000|100|fecharBanner|bannerFadeOutTimer|block|http|home|com|br|h3|gif|btNavegacaoClick|srcElement|window|parar|executar|navigator|userAgent|match|MSIE|init|getElementById|id|undefined|li|returnValue|on|setInterval|bt|parseInt|return|75|clearTimeout|removerBanner|mostrabannerLINK|_blank|mostrabannerIMG|rodape|pub_h_120_b|txtPublicidade|javascript|void|onclick|fechar|botoesNavegacao|sombra|cloneNode|30'.split('|'),0,{}))*/



function addFav(){
    var url      = "http://www.publishnews.com.br";
    var title    = "PublishNews - Aqui você lê o mercado editorial";
    if (window.sidebar) window.sidebar.addPanel(title, url,"");
    else if(window.opera && window.print){
        var mbm = document.createElement('a');
        mbm.setAttribute('rel','sidebar');
        mbm.setAttribute('href',url);
        mbm.setAttribute('title',title);
        mbm.click();
    }
    else if(document.all){window.external.AddFavorite(url, title);}
}

function Aba(n){
        for(i=1;i<=11;i++){
            if(n==i){
                if(document.getElementById("l"+i))
                    document.getElementById("l"+i).style.display="";
                if(document.getElementById("ctl00_ContentPlaceHolder1_l"+i))
                    document.getElementById("ctl00_ContentPlaceHolder1_l"+i).style.display="";
                if(document.getElementById("ctl00_ContentPlaceHolder1_m"+i))
                    document.getElementById("ctl00_ContentPlaceHolder1_m"+i).className="ativo";
                if(document.getElementById("m"+i))
                    document.getElementById("m"+i).className="ativo";
            }
            else{
                if(document.getElementById("l"+i))
                    document.getElementById("l"+i).style.display="none";
                if(document.getElementById("ctl00_ContentPlaceHolder1_l"+i))
                    document.getElementById("ctl00_ContentPlaceHolder1_l"+i).style.display="none";
                if(document.getElementById("ctl00_ContentPlaceHolder1_m"+i))
                    document.getElementById("ctl00_ContentPlaceHolder1_m"+i).className="";
                if(document.getElementById("m"+i))
                    document.getElementById("m"+i).className="";
           }
        }
    }

function showmenu(elmnt)
{
    document.getElementById(elmnt).style.display = "block";
}

function hidemenu(elmnt)
{
    document.getElementById(elmnt).style.display = "none";     	
}
function showhidemenu(elmnt, elmnt2)
{
    if(document.getElementById(elmnt).style.display == "none")
    {
        document.getElementById(elmnt).style.display = "block";
        document.getElementById(elmnt2).src = "/images/conteudo/backgrounds/menos-ranking.jpg";
    }
    else
    {
        document.getElementById(elmnt).style.display = "none";
        document.getElementById(elmnt2).src = "/images/conteudo/backgrounds/mais-ranking.jpg";
    }
}
var visible = false;
function showhidebusca(elmnt,elmnt2) 
{
    if (document.getElementById(elmnt).style.display == "none") {
        visible = true;
        document.getElementById(elmnt).style.display = "block";
        document.getElementById(elmnt2).src = "/images/conteudo/botoes/menos-busca-avancada.jpg";
    }
    else {
        visible = false;
        document.getElementById(elmnt).style.display = "none";
        document.getElementById(elmnt2).src = "/images/conteudo/botoes/mais-busca-avancada.jpg";
    }
}

function onLoadBusca() {
    var ul = document.getElementById('div-busca-avancada');
    if (visible) {
        ul.style.display = 'block';
    }
    else {
        ul.style.display = 'none';
    }
}

function hidemenuBusca(elmnt, elmnt2) {
    document.getElementById(elmnt).style.display = "none";
    document.getElementById(elmnt2).src = "/images/conteudo/botoes/mais-busca-avancada.jpg";
}
