';
cron += '
';
cron += '
';
for (i = 0; i < 73; i=i+36) {
var D = ( ( i == 0 ) ? 'H' : ( ( i == 36 ) ? 'M' : 'S' ) );
for (x = 0; x < 10; x++) {
cron += '
'
cron += '
'
}
}
cron += '
'
document.write( cron );
document.all( "CronometroPrv" ).style.left = ( screen.width - 780 ) / 2 + 34;
var relogio = 1;
// Valores em milissegundos
var Minuto = 60 * 1000;
var Hora = Minuto * 60;
var Dia = Hora * 24;
var Alerta = 0;
var Alerta10 = 0;
var AlertaFim = 0;
var horaInicial = new Date();
var horaAlvo;
var FimTemp;
var AlertarFinal;
var tempo;
var diferenca = 1000
var diferencaatual = 1000
var hms = "HMS"
var vartmp = new Array( 'tempoHoras', 'tempoMinutos', 'tempoSegundos' );
var tempoHoras, tempoMinutos, tempoSegundos
var meta = -1;
Venceu = false;
flagInicio = false;
FlagAlertaMinFim = true;
MinutosParaTermino = -1;
FlagTextoIniLido = false;
function FncPopIni(){
if( document.all ){
FlagTextoIniLido = true;
DivConteudoProva.style.visibility = "visible";
PopAlertaInicio.style.visibility = "hidden";
}
else{
FlagTextoIniLido = true;
document.getElementById( "DivConteudoProva" ).style.visibility = "visible";
document.getElementById( "PopAlertaInicio" ).style.visibility = "hidden";
}
}
function FncMinFin(){
if( document.all ){
PopAlertaMinFim.style.visibility = 'hidden'; }
else{
document.getElementById( "PopAlertaMinFim" ).style.visibility = 'hidden';
}
}
function cronom( TmpHoras, TmpMin, TmpSeg, AlertarFimTemp, MinFaltam )
{
if( !flagInicio ){
if( document.all ){
PopAlertaInicio.style.top = document.body.scrollTop + 155;
PopAlertaInicio.style.left = 100;
PopAlertaInicio.style.visibility = "visible";
PopAlertaInicio.style.left = ( screen.width / 2 ) - 180;
flagInicio = true;
}
else{
document.getElementById( "PopAlertaInicio" ).style.top = document.body.scrollTop + 155;
document.getElementById( "PopAlertaInicio" ).style.left = 100;
document.getElementById( "PopAlertaInicio" ).style.visibility = "visible";
document.getElementById( "PopAlertaInicio" ).style.left = ( screen.width / 2 ) - 180;
flagInicio = true;
}
}
if( !FlagTextoIniLido ){
tempocron = setTimeout( "cronom( " + TmpHoras + "," + TmpMin + "," + TmpSeg + "," + AlertarFimTemp + "," + MinFaltam + " )", 500 );
return
}
if( MinutosParaTermino == -1 ){
MinutosParaTermino = MinFaltam * Minuto;
}
if( meta == -1 ){ meta = TmpHoras * Hora + TmpMin * Minuto + TmpSeg * 1000 }
// Início: Internauta venceu o jogo
if( Venceu ){
clearTimeout();
diferenca = (meta - diferenca );
tempoHoras = '' + Math.floor( diferenca/Hora );
tempoHoras = ( ( tempoHoras.length < 2 ) ? '0' : '' ) + tempoHoras;
diferenca -= tempoHoras * Hora;
tempoMinutos = '' + Math.floor( diferenca/Minuto );
tempoMinutos = ( ( tempoMinutos.length < 2 ) ? '0' : '' ) + tempoMinutos;
diferenca -= tempoMinutos * Minuto;
tempoSegundos = '' + Math.floor( diferenca/1000 );
tempoSegundos = ( ( tempoSegundos.length < 2 ) ? '0' : '' ) + tempoSegundos;
if( document.all ){
TempoParaVencer.innerHTML = tempoHoras + ":" + tempoMinutos + ":" + tempoSegundos
PopVenceu.style.visibility = "visible";
}
else{
document.getElementById( "TempoParaVencer" ).innerHTML = tempoHoras + ":" + tempoMinutos + ":" + tempoSegundos
document.getElementById( "PopVenceu" ).style.visibility = "visible";
}
//alert( "Venceu em: " + tempoHoras + ":" + tempoMinutos + ":" + tempoSegundos );
return false;
}
// Fim: Internauta venceu o jogo
if( Alerta == 0 ) {
Alerta = 1;
// alerta1.style.visibility = "visible";
horaAlvo = new Date();
horaAlvo = horaAlvo.valueOf() + ( TmpHoras * Hora + TmpMin * Minuto + TmpSeg * 1000 );
horaAlvo = horaAlvo.valueOf()
AlertarFinal = AlertarFimTemp;
FimTemp = MinFaltam * Minuto;
}
var horaAtual = new Date();
horaAtual = horaAtual.valueOf();
diferenca = horaAlvo - horaAtual;
// diferenca = horaAtual - horaInicial;
if ( diferenca <=0 ) {
diferenca = 0;
}
if ( ( FlagAlertaMinFim ) && ( diferenca <= ( MinutosParaTermino ) ) ) {
if( document.all ){
PopAlertaMinFim.style.top = document.body.scrollTop + 230;
PopAlertaMinFim.style.left = 100;
PopAlertaMinFim.style.visibility = "visible";
FlagAlertaMinFim = false; }
else{
document.getElementById( "PopAlertaMinFim" ).style.top = document.body.scrollTop + 230;
document.getElementById( "PopAlertaMinFim" ).style.left = 100;
document.getElementById( "PopAlertaMinFim" ).style.visibility = "visible";
FlagAlertaMinFim = false;
}
}
if ( ( diferenca <= 0 ) && ( AlertaFim == 0 ) ) {
AlertaFim = 1;
//PopAlertaFim.style.pixelTop = document.body.scrollTop + 150;
//PopAlertaFim.style.pixelLeft = 200;
//botaoenviar.style.visibility = "hidden";
if( document.all ){
PopAlertaFim.style.top = document.body.scrollTop + 230;
PopAlertaFim.style.left = 100;
PopAlertaFim.style.visibility = "visible";
DivConteudoProva.style.visibility = "hidden";
}
else{
document.getElementById("PopAlertaFim").style.visibility = "visible";
}
//JanPrincipal.style.visibility = "hidden";
}
tempoHoras = '' + Math.floor( diferenca/Hora );
tempoHoras = ( ( tempoHoras.length < 2 ) ? '0' : '' ) + tempoHoras;
diferenca -= tempoHoras * Hora;
tempoMinutos = '' + Math.floor( diferenca/Minuto );
tempoMinutos = ( ( tempoMinutos.length < 2 ) ? '0' : '' ) + tempoMinutos;
diferenca -= tempoMinutos * Minuto;
tempoSegundos = '' + Math.floor( diferenca/1000 );
tempoSegundos = ( ( tempoSegundos.length < 2 ) ? '0' : '' ) + tempoSegundos;
visibilidade = ( ( relogio == 0 ) ? 'hidden' : 'visible' );
for (i = 0; i < 10; i++) {
for ( q = 0; q < 3; q++ ) {
for ( p = 1; p < 3; p++ ) {
dr = hms.substr(q,1) + p + i + '.style.visibility = "'
dt = eval( vartmp[q] )
if ( dt.substr(p-1,1) == i ) {
if( document.all ){
eval( dr + visibilidade + '";' );
}
else{
eval( "document.getElementById( '" + hms.substr(q,1) + p + i + "').style.visibility = '" + visibilidade + "'" );
}
}
else {
if( document.all ){
eval( dr + 'hidden";' );
}
else{
eval( "document.getElementById( '" + hms.substr(q,1) + p + i + "').style.visibility = 'hidden'");
}
}
}
}
}
tempocron = setTimeout( "cronom()", 500 );
}