var tipo = "normal"; //horario normal ou verao var MAXIMO=; var valor=""; var valormax=MAXIMO-1; var anims= new Array(valormax); var elementos = new Array(valormax); var frame=0; var timeout_state=null; var velocidade=0.3; var rodando=false; fazerRequisicao('request.php', 'imgs='+valor+'&'); document.oncontextmenu = new Function("return false;") function animator() { datahora=document.getElementById("data_da_img"); img_local=document.getElementById("animador"); img_local.removeChild(elementos[frame]); frame>=valormax?frame=0:frame++; img_local.appendChild(elementos[frame]); datahora.innerHTML = elementos[frame].name; } function rapidez(indice) { indice==1?velocidade+=0.05:velocidade.toFixed(2)>0.05?velocidade-=0.05:velocidade; clearInterval(rodando); rodando=setInterval("animator()",3000*velocidade); } function iniciar() { if(!rodando && valormax) rodando=setInterval("animator()",3000*velocidade); } function parar() { clearInterval(rodando); rodando=false; } function avanca(valor){ datahora=document.getElementById("data_da_img"); img_local=document.getElementById("animador"); parar(); img_local.removeChild(elementos[frame]); valor==1?frame++:frame--; if (frame>valormax) frame=0; if (frame<0) frame=valormax; img_local.appendChild(elementos[frame]); datahora.innerHTML = elementos[frame].name; } function carregada() { for(k=0;k