function quizquiz() {
document.formquiz.submit();
EscondeLayer('ConcQuiz');
}
function AcordoRevisadoPOR() {
	var aEscreverAcordo = "<table align='center' width='783' height='26' border='0' cellpadding='0' cellspacing='0'>";
	aEscreverAcordo += "<td width='46' height='40' valign='top'>";
	aEscreverAcordo += "<a href='/acordo_ortografico/acordofront/0,7324,POR,00.html' target='_blank'>";
	aEscreverAcordo += "<img src='/2007/HF/POR/POR_img/reforma_rodape_OK.gif' width='46' height='40' border='0'></a></td>";
	aEscreverAcordo += "<td width='698' height='40' align='left' class='texto10 bold' style='background-image:url(/2007/HF/POR/POR_img/reforma_rodape_OK_meio.gif);background-repeat:repeat-x;'>&nbsp;Conte&uacute;do revisado conforme o Acordo Ortogr&aacute;fico da L&iacute;ngua Portuguesa</td>";
	aEscreverAcordo += "<td width='39' height='40' valign='top'><img src='/2007/HF/POR/POR_img/reforma_rodape_OK_D.gif' width='39' height='40' border='0'></td>";
	aEscreverAcordo += "</table>"
	try {document.getElementById("seloAcordoRodape").innerHTML = aEscreverAcordo;} catch(err) {}
}
var FLG_CLIENTE = "POR";
var ie4 = (document.all) ? true : false;var ns4 = (document.layers) ? true : false;var ns6 = (document.getElementById && !document.all) ? true : false;
var janelaAtual = window.name;var strCaminhoAtual = location.href; var referer = document.referrer; var strUserAgent = navigator.userAgent.toLowerCase(); 
var dados = "ZERO"; var portais = "ZERO"; var nomeuser = "ZERO"; var u_user_id = "ZERO"; var perfil = "ZERO"; var sexo = "ZERO"; 
var lgcli = ""; var acessouno = ""; var tipo_uno = ""; var idSecretaria = ""; dados = GetCookie("dados"); portais = GetCookie("portais");
var aEscrCam = "";
if (dados != "ZERO" && dados != "") {
dados = dados.split("|"); u_user_id = dados[0]; nomeuser = unescape(dados[1]); perfil = dados[2]; sexo=dados[4]; acessouno=dados[6];
tipo_uno=dados[7]; idSecretaria=dados[8]; dados = ""; setCookie("portais", "");
} else if (portais != "ZERO" && portais != "") {
portais = portais.split("|"); u_user_id = portais[0]; nomeuser = unescape(portais[1]); sexo=portais[2];
if (sexo == "F") {sexo = 10;} else {sexo = 11;}
perfil = portais[4]; lgcli = portais[10]; setCookie("dados", "");}
var datacache = new Date();
try {nomeuser = decodeURIComponent(escape(nomeuser));} catch(err) {nomeuser = escape(nomeuser);}
if (nomeuser != "" && nomeuser != "ZERO") {while(nomeuser.indexOf("+") >= 0) {nomeuser = nomeuser.replace("+"," ");}}
var clx = 0;var cly = 0;
if (!document.all) {document.captureEvents(Event.MOUSEMOVE);}
function getXY(e) {
if (document.all) {clx = event.clientX;cly = event.clientY;} else {clx = e.pageXcly = e.pageY}
if (clx < 0) {clx = 0;}
if (cly < 0) {cly = 0;}
}
function RTrim(VALUE){var w_space = String.fromCharCode(32);var v_length = VALUE.length;var strTemp = "";
if(v_length < 0){return"";}
var iTemp = v_length -1;
while(iTemp > -1){if(VALUE.charAt(iTemp) != w_space){strTemp = VALUE.substring(0,iTemp +1);break;}
iTemp = iTemp-1;}
return strTemp;}
function LTrim(VALUE){var w_space = String.fromCharCode(32);
if(v_length < 1){return"";}
var v_length = VALUE.length;var strTemp = "";var iTemp = 0;
while(iTemp < v_length){if(VALUE.charAt(iTemp) != w_space){strTemp = VALUE.substring(iTemp,v_length);break;}
iTemp = iTemp + 1;}
return strTemp;}
function Trim(TRIM_VALUE){if(TRIM_VALUE.length < 1){return "";}
TRIM_VALUE = RTrim(TRIM_VALUE);TRIM_VALUE = LTrim(TRIM_VALUE);
if(TRIM_VALUE==""){return "";} else {return TRIM_VALUE;}}
//
document.onmousemove = getXY;
//
function GetCookie (name) {
var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var vlrFinal = ""; var i = 0;
while (i < clen)  {var j = i + alen;
if (document.cookie.substring(i, j) == arg) {
vlrFinal = getCookieVal(j);
if (vlrFinal == "undefined" || vlrFinal == "") {vlrFinal = "ZERO"}
return vlrFinal;}
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) {break}; 
}
return "ZERO";
}
function setCookie (name,value,expires,path,domain) {
expires = 7;
if (expires) {var date = new Date();
date.setTime(date.getTime()+(expires*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
} else {var expires = "";}
document.cookie = name+'='+value+expires+'; path=/';
}
function getCookieVal (offset) {
var endstr = document.cookie.indexOf (";", offset);
var resposta = "";
if (endstr == -1)
endstr = document.cookie.length;
resposta = unescape(document.cookie.substring(offset, endstr));
if (resposta == 'undefined') {resposta = "ZERO"}
return resposta;
}
function aplicaFlash (swf,width,height,wmode,cache,url) {
var nomeSWF = swf;
var monta_swf = "";
var myArray = new Array();
var FVars = "";
var data = new Date();
var noCache = Date.parse(data);
var idSWF = "";
if (wmode != "opaque" && wmode != "transparent") {wmode = "transparent";}
if (cache && cache != "") {noCache = cache;}
if (url && url != "") {FVars = "clickTag=" + url;}
if (nomeSWF.indexOf("?") >= 1) {
if (FVars != "") {FVars += "&";}
FVars += nomeSWF.split("?")[1];
nomeSWF = nomeSWF.split("?")[0];
}
idSWF = nomeSWF.split(".")[0];
if (idSWF.indexOf("/") != "-1") {
myArray = idSWF.split("/");
for (EuSWF in myArray) {idSWF = myArray[EuSWF];}
}
if (FVars != "") {FVars += "&";}
FVars += "cache="+noCache;
if (FLG_CLIENTE && FLG_CLIENTE != "") {FVars += "&FLG_CLIENTE="+FLG_CLIENTE;}
nomeSWF += "?"+FVars;
monta_swf += "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' ";
monta_swf += "codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' ";
monta_swf += "width='"+ width +"' height='"+ height +"' id='"+idSWF+"' align='middle'>";
monta_swf += "<param name='allowScriptAccess' value='always'>";
monta_swf += "<param name='allowFullScreen' value='false'>";
monta_swf += "<param name='wmode' value='"+wmode+"'>";
monta_swf += "<param name='quality' value='high'>";
monta_swf += "<param name='bgcolor' value='#ffffff'>";
monta_swf += "<param name='movie' value='"+nomeSWF+"'>";
if (FVars != "") {monta_swf += "<param name='FlashVars' value='"+FVars+"'>";}
monta_swf += "<embed src='"+nomeSWF+"' allowScriptAccess='always' allowFullScreen='false' ";
monta_swf += "wmode='"+wmode+"' quality='high' ";
monta_swf += "bgcolor='#ffffff' ";
if (FVars != "") {monta_swf += "FlashVars='"+FVars+"' ";}
monta_swf += "width='"+ width +"' height='"+ height +"' name='"+idSWF+"' align='middle' ";
monta_swf += "type='application/x-shockwave-flash' pluginspage='http://www.adobe.com/go/getflashplayer'>";
monta_swf += "</object>";
document.write(monta_swf);
}
function DataHoje () {
theDate= new Date();
var month = theDate.getMonth() + 1;
var day = theDate.getDate();
if (month < 10) {month = "0" + month;}
if (day < 10) {day = "0" + day;}
return(month + "" + day);
}
function EscondeLayer (strLayer) {
if (strLayer == '' || strLayer == null) {strLayer = "popup";}
if (ie4) {try {document.all[strLayer].style.visibility = "hidden";} catch(err) {}}
if (ns4) {try {document.layers[strLayer].visibility = "hide";} catch(err) {}}
if (ns6) {try {document.getElementById([strLayer]).style.display = "none";} catch(err) {}}
}
function MostraLayer (strLayer) {
if (strLayer != '') {
if (ie4) {document.all[strLayer].style.visibility = "visible";}
if (ns4) {document.layers[strLayer].visibility = "show";}
if (ns6) {
if (document.getElementById([strLayer]).style.display) {
document.getElementById([strLayer]).style.display = "block";
} else {
document.getElementById([strLayer]).style.visibility = "visible";
}
}
}
}
function Coloca(objeto,menu) {if (menu == "bbviva") {objeto.className = "linkbb";} else if (menu == "anos") {objeto.className = "linkan";
} else if (menu == "prem") {objeto.className = "linkpr";} else if (menu == "espec") {objeto.className = "tdMenuEspClaro";}}
function Tira(objeto,menu) {objeto.className = menu;}
function AplicaBalao() {if (ie4) {document.write("<div id='balao' style='position:absolute;z-index:995;visibility:hidden;text-align:left;'></div>");}
if (ns4) {document.write("<div id='balao' style='position:absolute;z-index:995;visibility:hide;text-align:left;'></div>");}
if (ns6) {document.write("<div id='balao' style='position:absolute;z-index:995;display:block;text-align:left;'></div>");}}
function MostraBalao(x,y,larg,texto) {
if (document.all) {clx += document.documentElement.scrollLeft;cly += document.documentElement.scrollTop;}
var textomostra = "<table width='" + larg + "' border='0' cellpadding='3' cellspacing='10'>";
textomostra += "<tr><td class='texto11 corBorda' style='line-height:18px;border-width:1px;border-style:solid;background-color:#ffffff'>";
textomostra += "<table width='100%' border='0' cellpadding='0' cellspacing='0'><tr><td height='14' align='right' class='texto10 corFundo'><img src='/2006/global/publicador/templates/btnfecha.gif' width='16' height='14' border='0' style='cursor:pointer;' onclick='EscondeBalao();'></td></tr></table>";
textomostra += "<table width='100%' border='0' cellpadding='6' cellspacing='0'><tr><td class='texto10 corFundo'>";
textomostra += texto + "</td></tr><tr><td height='14' class='texto10 corFundo'></td></tr></table></td></tr></table>";
if (ie4) {document.all['balao'].innerHTML = textomostra;document.all['balao'].style.posLeft = clx + x;document.all['balao'].style.posTop = cly + y;}
if (ns4) {document.layers['balao'].innerHTML = textomostra;document.layers['balao'].left = clx + x;document.layers['balao'].top = cly + y;}
if (ns6) {document.getElementById(['balao']).innerHTML = textomostra;document.getElementById(['balao']).style.left = clx + x;document.getElementById(['balao']).style.top = cly + y;}
MostraLayer('balao');}
function EscondeBalao() {EscondeLayer('balao');}
function MandaEMail(assunto, destina) {top.location.href="/global/fale/0,7559,POR,00.html?A="+assunto+"&D="+destina;}
function ValidaBuscaO() {if (Trim(document.getElementById("qt").value) == "") {alert("Digite o que deseja encontrar");document.getElementById("qt").focus();return false;
} else {document.getElementById("qt").value = Trim(document.getElementById("qt").value);}}

function AcordoRevisadoPOR() {var aEscreverAcordo = "<table align='center' width='783' height='26' border='0' cellpadding='0' cellspacing='0'><tr>";
aEscreverAcordo += "<td width='46' height='40' valign='top'>";
aEscreverAcordo += "<a href='/acordo_ortografico/acordofront/0,7324,POR,00.html' target='_blank'>";
aEscreverAcordo += "<img src='/2007/HF/POR/POR_img/reforma_rodape_OK.gif' width='46' height='40' border='0'></a></td>";
aEscreverAcordo += "<td width='698' height='40' align='left' class='texto10 bold' style='background-image:url(/2007/HF/POR/POR_img/reforma_rodape_OK_meio.gif);background-repeat:repeat-x;'>&nbsp;Conte&uacute;do revisado conforme o Acordo Ortogr&aacute;fico da L&iacute;ngua Portuguesa</td>";
aEscreverAcordo += "<td width='39' height='40' valign='top'><img src='/2007/HF/POR/POR_img/reforma_rodape_OK_D.gif' width='39' height='40' border='0'></td>";
aEscreverAcordo += "</tr></table>"
try {document.getElementById("seloAcordoRodape").innerHTML = aEscreverAcordo;} catch(err) {}
}

