window.defaultStatus="SGS - Sistema de Gerenciamento do Site";function preenche(a,d){obj=document.getElementById(d);val=obj.value;fim=val+a;obj.value="";obj.value=fim}function testaSenha(a,d,e){if(erro==true)return true;obj1=eval("document."+e+"."+a);obj2=eval("document."+e+"."+d);if(obj1.value!=obj2.value){alert("Sua senha n\ufffdo foi confirmada!");document.formulario.senha.focus();return true}else return false}
function testaVazio(a,d,e,b,f){if(f==true)return true;obj1=eval("document."+e+"."+a);if(obj1.value==d){alert(b);obj1.focus();return true}else return false}function testaNumero(a,d,e,b){if(b==true)return true;obj1=eval("document."+d+"."+a);if(isNaN(obj1.value)){obj1.value="";alert(e);obj1.focus();return true}else return false}function mostraConteudo(a,d){obj_cont=document.getElementById(a);obj_local=document.getElementById(d);obj_local.innerHTML=obj_cont.innerHTML}
function verDados(a,d){if(a=="")alert("Voc\ufffd deve escolher um valor v\ufffdlido!");else if(a==0)alert("Voc\ufffd deve escolher um valor, n\ufffdo uma categoria!");else document.location="principal.php?m="+d+"&action=ver&valor="+a}function closeObj(a,d){obj=document.getElementById(a);if(d=="display")obj.style.display="none";else obj.style.visibility="hidden"}function openObj(a,d){obj=document.getElementById(a);if(d=="display")obj.style.display="block";else obj.style.visibility="visible"}
function gerenciaAbas(a,d){document.getElementById("aba").value=a;for(x=1;x<=d;x++){document.getElementById("aba_bt_"+x).className="";document.getElementById("abas_cad_"+x).style.display="none"}document.getElementById("aba_bt_"+a).className="selected";document.getElementById("abas_cad_"+a).style.display="block"}
function changeAba(a,d,e){for(x=1;x<=e;x++){$("#"+a+"aba_"+x).removeClass("choose");$("#"+a+"aba_"+x).addClass("aba");$("#"+a+"div_"+x).hide()}$("#"+a+"aba_"+d).removeClass("aba");$("#"+a+"aba_"+d).addClass("choose");$("#"+a+"div_"+d).show()}var lastzoekstr="J29dWTNVQV8TugOoCaLplUHwWPTgbWE8";
function selectSearch(a,d){a=a.toLowerCase();if(a!=lastzoekstr&&a!=""){lastzoekstr=a;var e=d.options.length,b=0;for(b=0;b<e;b++){var f=d.options[b].value;f=d.options[b].text;if(a==""||f.toLowerCase().indexOf(a)>=0){d.options[b].selected=true;d.options[b].style.display="block"}else d.options[b].style.display="none"}}}function resetaSelectSearch(a){var d=a.options.length,e=0;for(e=0;e<d;e++)a.options[e].style.display="block";a.options[0].selected=true}
function FormataValor(a,d,e){if(window.event)var b=e.keyCode;else if(e.which)b=e.which;vr=document.getElementById(a).value;vr=vr.toString().replace("/","");vr=vr.toString().replace("/","");vr=vr.toString().replace(",","");vr=vr.toString().replace(".","");vr=vr.toString().replace(".","");vr=vr.toString().replace(".","");vr=vr.toString().replace(".","");tam=vr.length;if(tam<d&&b!=8)tam=vr.length+1;if(b==8)tam-=1;if(b==8||b>=48&&b<=57||b>=96&&b<=105){if(tam<=2)document.getElementById(a).value=vr;if(tam>
2&&tam<=5)document.getElementById(a).value=vr.substr(0,tam-2)+","+vr.substr(tam-2,tam);if(tam>=6&&tam<=8)document.getElementById(a).value=vr.substr(0,tam-5)+"."+vr.substr(tam-5,3)+","+vr.substr(tam-2,tam);if(tam>=9&&tam<=11)document.getElementById(a).value=vr.substr(0,tam-8)+"."+vr.substr(tam-8,3)+"."+vr.substr(tam-5,3)+","+vr.substr(tam-2,tam);if(tam>=12&&tam<=14)document.getElementById(a).value=vr.substr(0,tam-11)+"."+vr.substr(tam-11,3)+"."+vr.substr(tam-8,3)+"."+vr.substr(tam-5,3)+","+vr.substr(tam-
2,tam);if(tam>=15&&tam<=17)document.getElementById(a).value=vr.substr(0,tam-14)+"."+vr.substr(tam-14,3)+"."+vr.substr(tam-11,3)+"."+vr.substr(tam-8,3)+"."+vr.substr(tam-5,3)+","+vr.substr(tam-2,tam)}}function checkAll(a,d,e){if(e==true)for(x=0;x<d;x++)document.getElementById(a+x).checked=true;else for(x=0;x<d;x++)document.getElementById(a+x).checked=false}
function relogio(){momentoAtual=new Date;hora=momentoAtual.getHours();minuto=momentoAtual.getMinutes();segundo=momentoAtual.getSeconds();hora=hora.toString();minuto=minuto.toString();segundo=segundo.toString();if(hora.length==1)hora="0"+hora;if(minuto.length==1)minuto="0"+minuto;if(segundo.length==1)segundo="0"+segundo;horaImprimivel=hora+":"+minuto+":"+segundo;$("#hr").html(horaImprimivel);setTimeout("relogio()",1E3)}
function alerta(a,d){$("#alerta").html(a);$("#alerta").removeClass("error");$("#alerta").removeClass("ok");$("#alerta").addClass(d);$("#alerta").slideDown();setTimeout("$('#alerta').slideUp();",2E3)}function fechaSessao(a){}
function FormataCNPJ(a,d){var e=d.keyCode,b=new String(a.value);b=b.replace(".","");b=b.replace(".","");b=b.replace("/","");b=b.replace("-","");tam=b.length+1;if(e!=9&&e!=8){if(tam>2&&tam<6)a.value=b.substr(0,2)+"."+b.substr(2,tam);if(tam>=6&&tam<9)a.value=b.substr(0,2)+"."+b.substr(2,3)+"."+b.substr(5,tam-5);if(tam>=9&&tam<13)a.value=b.substr(0,2)+"."+b.substr(2,3)+"."+b.substr(5,3)+"/"+b.substr(8,tam-8);if(tam>=13&&tam<15)a.value=b.substr(0,2)+"."+b.substr(2,3)+"."+b.substr(5,3)+"/"+b.substr(8,
4)+"-"+b.substr(12,tam-12)}}function mascara_cpf(a,d,e){var b="";b+=d;if(b.length==3){b+=".";ct_campo=eval("document."+e+"."+a+".value = mydata")}if(b.length==7){b+=".";ct_campo=eval("document."+e+"."+a+".value = mydata")}if(b.length==11){b+="-";ct_campo1=eval("document."+e+"."+a+".value = mydata")}b.length==14&&valida_cpf(e,a)}
function valida_cnpj(a,d){pri=eval("document."+a+"."+d+".value.substring(0,2)");seg=eval("document."+a+"."+d+".value.substring(3,6)");ter=eval("document."+a+"."+d+".value.substring(7,10)");qua=eval("document."+a+"."+d+".value.substring(11,15)");qui=eval("document."+a+"."+d+".value.substring(16,18)");var e;e="";s=pri+seg+ter+qua+qui;c=s.substr(0,12);var b=s.substr(12,2),f=0;for(e=0;e<12;e++)f+=c.charAt(11-e)*(2+e%8);if(f==0)var g="falso";f=11-f%11;if(f>9)f=0;if(b.charAt(0)!=f)g="falso";f*=2;for(e=
0;e<12;e++)f+=c.charAt(11-e)*(2+(e+1)%8);f=11-f%11;if(f>9)f=0;if(b.charAt(1)!=f)g="falso";if(g=="falso"){alert("CNPJ inv\ufffdlido!");aux1=eval("document."+a+"."+d+".focus");aux2=eval("document."+a+"."+d+".value = ''")}}
function valida_cpf(a,d){pri=eval("document."+a+"."+d+".value.substring(0,3)");seg=eval("document."+a+"."+d+".value.substring(4,7)");ter=eval("document."+a+"."+d+".value.substring(8,11)");qua=eval("document."+a+"."+d+".value.substring(12,14)");var e;s=pri+seg+ter+qua;c=s.substr(0,9);var b=s.substr(9,2),f=0;for(e=0;e<9;e++)f+=c.charAt(e)*(10-e);if(f==0)var g="falso";f=11-f%11;if(f>9)f=0;if(b.charAt(0)!=f)g="falso";f*=2;for(e=0;e<9;e++)f+=c.charAt(e)*(11-e);f=11-f%11;if(f>9)f=0;if(b.charAt(1)!=f)g=
"falso";if(g=="falso"){alert("CPF inv\ufffdlido!");aux1=eval("document."+a+"."+d+".focus");aux2=eval("document."+a+"."+d+".value = ''")}}function formatar(a,d){var e=a.value.length,b=d.substring(0,1);e=d.substring(e);if(e.substring(0,1)!=b)a.value+=e.substring(0,1)};function ajax(a,d,e,b,f,g){g||(g="POST");$.ajax({type:g,url:a,data:d,success:function(h){$("#pg_tit").html(e);$("#in_page").html(h);b&&$("#page_over").css("width",b);f||$("#page_over").toggle()}})}function ajaxDireto(a,d,e,b){b||(b="POST");$.ajax({type:b,url:a,data:d,success:function(f){$("#"+e).html(f)}})}
function sendPost(a,d,e,b,f){forme=eval("document."+a);var g;for(x=0;x<forme.elements.length;x++)if(forme.elements[x].name.search(d)!="-1")if(forme.elements[x].type=="radio"&&forme.elements[x].checked)g+="&"+forme.elements[x].name.replace(d,"")+"="+forme.elements[x].value;else if(forme.elements[x].type!="radio"&&forme.elements[x].type!="checkbox")g+="&"+forme.elements[x].name.replace(d,"")+"="+forme.elements[x].value;g=g.replace("undefined","");ajaxDireto(e,b+g,f)};if(typeof deconcept=="undefined"){var deconcept=new Object();}
if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){if(!document.createElement||!document.getElementById){return;}
this.DETECT_KEY=_b?_b:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}
if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}
this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion(this.getAttribute("version"),_7);if(c){this.addParam("bgcolor",c);}var q=_8?_8:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",_7);this.setAttribute("doExpressInstall",false);var _d=(_9)?_9:window.location;this.setAttribute("xiRedirectUrl",_d);this.setAttribute("redirectUrl","");if(_a){this.setAttribute("redirectUrl",_a);}};deconcept.SWFObject.prototype={setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16.push(key+"="+_18[key]);}
return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");}
_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}
var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");}
_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}
var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}
if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}
return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(_23,_24){var _25=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_25=new deconcept.PlayerVersion(x.description.replace(/([a-z]|[A-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");for(var i=3;axo!=null;i++){axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+i);_25=new deconcept.PlayerVersion([i,0,0]);}}
catch(e){}if(_23&&_25.major>_23.major){return _25;}if(!_23||((_23.minor!=0||_23.rev!=0)&&_25.major==_23.major)||_25.major!=6||_24){try{_25=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}
catch(e){}}}return _25;};deconcept.PlayerVersion=function(_29){this.major=parseInt(_29[0])!=null?parseInt(_29[0]):0;this.minor=parseInt(_29[1])||0;this.rev=parseInt(_29[2])||0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}
if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(q){var _2d=q.indexOf(_2b+"=");var _2e=(q.indexOf("&",_2d)>-1)?q.indexOf("&",_2d):q.length;if(q.length>1&&_2d>-1){return q.substring(q.indexOf("=",_2d)+1,_2e);}}return"";}};if(Array.prototype.push==null){Array.prototype.push=function(_2f){this[this.length]=_2f;return this.length;};}
var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;



function CopyPaste()
{var text='';var is_onmouseup=false;var is_ctrl=false;this.Init=Init;this.ChangeTextInSelection=ChangeTextInSelection;this.EventHandler=EventHandler;function Init(init_text)
{text=init_text;if(window.addEventListener)
{if(window.navigator.userAgent.match('Firefox'))
{switch(window.navigator.userAgent.match(/Firefox\/\d/).toString())
{case'Firefox/1':case'Firefox/2':document.addEventListener('mouseup',this.EventHandler,false);is_onmouseup=true;document.addEventListener('keyup',function(e)
{if(e.which==17)is_ctrl=false;},false);document.addEventListener('keydown',function(e)
{if(e.which==17)is_ctrl=true;if(e.which==67&&is_ctrl==true)EventHandler();},false);break;default:document.getElementsByTagName('body')[0].addEventListener('copy',this.EventHandler,false);}}
else
{document.getElementsByTagName('body')[0].addEventListener('copy',this.EventHandler,false);}}
else
{document.getElementsByTagName('body')[0].attachEvent('oncopy',this.EventHandler);}};function ChangeTextInSelection(text)
{var body_element=document.getElementsByTagName('body')[0];var new_selection_block=document.createElement('div');new_selection_block.style.overflow='hidden';new_selection_block.style.color='#000000';new_selection_block.style.backgroundColor='transparent';new_selection_block.style.textAlign='left';new_selection_block.style.textDecoration='none';new_selection_block.style.border='none';new_selection_block.id='new_selection_block'+Math.random().toString();if(typeof window.getSelection!='undefined')
{var current_selection=window.getSelection();if(current_selection.toString())
{if(typeof current_selection.setBaseAndExtent!='undefined')
{var current_range=current_selection.getRangeAt(0);new_selection_block.style.width=0.1;new_selection_block.style.height=0.1;new_selection_block.appendChild(current_range.cloneContents());var new_text_block=document.createElement('div');new_text_block.innerHTML=text;new_selection_block.appendChild(new_text_block);body_element.appendChild(new_selection_block);current_selection.selectAllChildren(new_selection_block);window.setTimeout(function()
{new_selection_block.parentNode.removeChild(new_selection_block);window.getSelection().setBaseAndExtent(current_range.startContainer,current_range.startOffset,current_range.endContainer,current_range.endOffset);},0);}
else
{var current_text_lower=text.replace(/<.*?>/gi,'');if(current_selection.toString().indexOf(current_text_lower)==-1)
{var new_text_block=document.createElement('div');new_text_block.style.position='fixed';body_element.appendChild(new_text_block);new_selection_block.innerHTML=text;new_text_block.appendChild(new_selection_block);var new_range=document.createRange();new_range.selectNode(new_text_block);current_selection.addRange(new_range);window.setTimeout(function()
{new_text_block.parentNode.removeChild(new_text_block);},(is_onmouseup)?3000:0);}}}}
else
{var range=document.selection.createRange();new_selection_block.style.width=0;new_selection_block.style.height=0;var current_range_text_lower=range.text.toString().toLowerCase();var current_text_lower=text.toLowerCase().replace(/<.*?>/gi,'');if(current_range_text_lower.indexOf(current_text_lower)==-1)
{new_selection_block.innerHTML=range.htmlText+text;}
else
{new_selection_block.innerHTML=range.htmlText}
body_element.appendChild(new_selection_block);var new_text_range=body_element.createTextRange();new_text_range.moveToElementText(new_selection_block);new_text_range.select();window.setTimeout(function()
{new_selection_block.parentNode.removeChild(new_selection_block);if(range.text!='')
{range.select();}},0);}};function EventHandler(e)
{ChangeTextInSelection(text);};}
if(window.attachEvent)
{window.attachEvent('onload',init);}
else if(window.addEventListener)
{window.addEventListener('load',init,false);}
else
{window.onload=init;}
function init()
{var copy_paste=new CopyPaste();var share_url=document.location.href;copy_paste.Init('<br><br>Leia mais no Ache Concursos: <a href="'+share_url+'" target="_blank_">'+share_url+'</a>',true);}

$().ready(function(){
    setTimeout(function(){
        $('#compartilhe_plus').css('top',($(window).height()/2)-100);
        $('#compartilhe_plus').css('display','block');
        $('#compartilhe_plus').animate({                
            right: ($(window).width()/2)-390            
          }, 500);
    }, 45000);    
});

function fechaCompartilhePlus(){
    $('#compartilhe_plus').animate({                
        right: -260            
    }, 500, function(){$('#compartilhe_plus').css('display','none')});
}
