function linke(url, odiv){
myAjax = new Ajax.Updater(odiv,url,{onLoading:fcarregando,onComplete:fcarrega});
}
function fcarregando(){
nmcrr=document.getElementById("mcarrega");nmcrr.innerHTML="<div style=\"margin-top:10px;margin-left:8px;\"><img src=\"imgs/crr.gif\" width=\"91\" height=\"23\" border=\"0\"></div>";
nmcrr.style.visibility='visible';
}
function scarregou(){
nscrr=document.getElementById("mcarrega");nscrr.innerHTML="";
nscrr.style.visibility='hidden';
}
function fcarrega(){
scarregou();
setTimeout("scarregou()", 100);
setTimeout("scarregou()", 1000);
setTimeout("scarregou()", 2000);
}

function ocultb(){
dvb=document.getElementById('balao');
dvb.style.display='none';
dvb.style.visibility='hidden';
}

function abredes(imagem, altura, larg, tit, urp){
ami = document.getElementById('amini').style;
ami.display="block";
ami.height=altura;
alti=altura-140;
//document.body.style.display='none';
document.getElementById('tudo').style.display='none';
document.getElementById('amini').innerHTML='<div align="center" style="margin-top:25px;cursor:default;"><table border="0" cellspacing="0" cellpadding="0"><tr><td bgcolor="#333333" align="right"><img src="imgs/bf.gif" style="cursor:pointer"></td></tr><tr><td style="font-weight:bold;color:#FFF;text-align:center;">'+tit+'</td></tr><tr><td style="background:#FFFFFF url(\'imgs/fc.gif\');border:10px solid #FFFFFF;cursor:pointer;"><img border="0" src="'+urp+'/g_'+imagem+'" height="'+alti+'" width="'+larg+'"></td></tr><tr><td bgcolor="#333333" align="right"><img src="imgs/bf.gif" style="cursor:pointer"></td></tr></table></div>';
document.location='#';
}

function fechades(){
ami = document.getElementById('amini').style;
ami.display="none";
document.getElementById('tudo').style.display='inline';
}

function escorregame(){
alt=document.getElementById('sme').style.height.split("px");
alt=alt[0];
document.getElementById('sme').style.height=parseFloat(alt)-parseFloat(5)+'px';
if(document.getElementById('sme').style.height.split("px")[0]>0){setTimeout("escorregame()", 1);}else{document.getElementById('paj').style.visibility='visible';document.getElementById('sme').style.visibility='hidden';}
}
function escorregama(){
if(document.getElementById('paj').style.visibility=='visible'){
alt=document.getElementById('sme').style.height.split("px");
alt=alt[0];
document.getElementById('sme').style.height=parseFloat(alt)+parseFloat(5)+'px';
if(alt<124){setTimeout("escorregama()", 1);}
}
}

function msme(r){
alt=document.getElementById('sme').style.height.split("px");
alt=alt[0];
if(r!='ok' && alt==0){
document.getElementById('lm2').src='imgs/lm2a.gif';
document.getElementById('sme').style.height='0px';
document.getElementById('sme').style.visibility='visible';
if(alt<124){setTimeout("escorregama()", 1);}
}
}
function osme(r){
if(r=='tmb'){
//setTimeout("tmb();", 1000);
tmb();
}
if(r=='ok'){
document.getElementById('paj').style.visibility='hidden';
alt=document.getElementById('sme').style.height.split("px");
alt=alt[0];
document.getElementById('lm2').src='imgs/lm2.gif';
if(alt>0){setTimeout("escorregame()", 1);}
}
}

function tmb(v){
if(v=='n'){
vtmb.value='n';
}else{
vtmb.value='s';
}
setTimeout("tmb2();", 1000);
}

function tmb2(){
vtmb=document.getElementById('vtmb');
if(vtmb.value!='n'){
parent.osme('ok');
}
}

function pajv(){
document.getElementById('paj').style.visibility='visible';
}

