/*function playSound() {
<!--
   document.sound.play();
   //document.sound.stop();
// -->    
}*/

var milisegundos = 60000;
var timeCounter = milisegundos/1000; 

function addToBookmark(url, title) {
	// Blogger - Replace with <$BlogItemTitle$> 
	// MovableType - Replace with <$MTEntryTitle$>

 var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;

	// Blogger - Replace with <$BlogItemPermalinkURL$> 
	// MovableType - Replace with <$MTEntryPermalink$>
	// WordPress - <?php bloginfo('url'); ?>

	if(is_chrome)
       window.alert("O Google Chrome nao suporta o recurso de abertura automatica da janela de Adicionar Favorito. " + 
                    "Pressione CTRL+D para adicionar manualmente.");
	else if (window.sidebar) { // Mozilla Firefox Bookmark
		window.sidebar.addPanel(title, url,"");
  }
	else if( window.external ) { // IE Favorite
		window.external.AddFavorite( url, title); 
  }
	else if(window.opera && window.print) { // Opera Hotlist
		window.external.AddFavorite(url, title);
  }
}

/*
function validar() {
  if(document.getElementById("cod").value.length != 13) {
     window.alert("Informe o codigo de rastreamento com 13 digitos.");
     document.getElementById("cod").focus();
     return false;
  }
  return true;
}
*/

function reload() {
<!--
   window.location.reload();
   setTimeout("reload();", milisegundos);
// -->    
}
/*

	$(document).ready(function(){
			var dados = $("#frm").serialize(); //serializando dados do form
			$.ajax({
			   type: "POST", //pode ser post ou get
			   url: "http://manoelcampos.com/sistemas/rastreador/rastreador.php", // url onde será enviado os dados do form via post
			   data: dados, //variável dados que tá recebendo o serialize do form
			   beforeSend: function(){ //antes de enviar coloca uma mensagem de carregando na div result
					$("#result").html("<img src='http://manoelcampos.com/sistemas/rastreador/carregando.gif' border='0' />");
			   },
			   success: function(retorno){ // após processar no processa.php devolve o resultado para a div result
				 $("#result").html(retorno);
			   }
			 });
			return false; //para não submeter o form via action
	});
*/


function dataHoraAtual() {
<!--
   var data = new Date()
   data = data.getDate() + "/" + data.getMonth() + "/" + data.getFullYear() + " " + 
          data.getHours() + ":" +  data.getMinutes() + ":" + data.getSeconds();
   return "Data e Hora: " + data;
// -->
}

function updateTimeCounter() {
<!--
   var text = "<strong>"+dataHoraAtual()+". ";
   if(timeCounter > 0) {
		 text += "Nova consulta em " + timeCounter + ".</strong>";
	   timeCounter--;
   }
   else
		 text += "Realizando nova consulta....</strong>";
   document.getElementById("timeCounterDiv").innerHTML = text;
   setTimeout("updateTimeCounter();", 1000);

// -->    
}

function startup() {
<!--
  document.getElementById("timeCounterDiv").innerHTML = "<strong>"+dataHoraAtual()+".</strong>";
  setTimeout('reload();', milisegundos); 
  setTimeout('updateTimeCounter();', 1000);
// -->    
}

