function goToURL(goToLocation){
    eval("document.location.href = '" + goToLocation + "'");
}
function testa_file()
{
alert("Clique no botão \"Procurar\" para informar o nome do arquivo.");
return false;
}
function abrePop(pagina,largura,altura){
	centroLeft = (screen.width / 2) - (largura / 2);
	centroTop = (screen.height / 2) - (altura / 2);
	pop=window.open(pagina, "pop", "width=" + largura + " ,height=" + altura + " ,top=" + centroTop + " ,left=" + centroLeft + ",scrollbars=no");
}

function isEmpty(text){
   var enter1 = "\n",
       enter2 = "\r",
       espaco = " ",
       tab = "\t";

   if (text =="") return true;
   if (text ==0) return true;

   //A verifica se o caracter selecionada possui valor vahlido
   for (var indice = 0; indice < text.length; indice++){
      if (text.charAt(indice) != espaco && 
         text.charAt(indice) != tab &&
         text.charAt(indice) != enter1 && 
         text.charAt(indice) != enter2 )
         return false;
   }
   return true;
}

function envia_form(){
if (isEmpty(document.forms[0].form_nome.value)){
   alert ("Por favor, informe o NOME");
   document.forms[0].form_nome.focus();
   return false;
}

if (isEmpty(document.forms[0].form_email.value)){
   alert ("Por favor, informe o EMAIL");
   document.forms[0].form_email.focus();
   return false;
}

if (document.forms[0].form_email.value.indexOf('@', 0) == -1 || document.forms[0].form_email.value.indexOf('.', 0) == -1){
   alert ("Por favor, informe um EMAIL válido");
	document.forms[0].form_email.value = '';
   document.forms[0].form_email.focus();   
   return false;
}

if (isEmpty(document.forms[0].form_mensagem.value)){
   alert ("Por favor, informe a SUA MENSAGEM");
   document.forms[0].form_mensagem.focus();
   return false;
}

return true;
}

function MM_displayStatusMsg(msgStr) { //v1.0
  status=msgStr;
  document.MM_returnValue = true;
}

function MM_setTextOfTextfield(objName,x,newText) { //v3.0
  var obj = MM_findObj(objName); if (obj) obj.value = newText;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
