function WinPopUpOpen(targetUrl, windowName, x, y, escala, scroll, tool, localiz, barramenu, barstatus)
  {
  var windowFeatures = "width=" + x + ", height=" + y + ", top=30, left=30, resizable=" + escala + ", scrollbars=" + scroll + ", toolbar=" + tool + ", location=" + localiz + ", menubar=" + barramenu + ", status=no";
  windowPesquisa = window.open(targetUrl, windowName, windowFeatures);
  windowPesquisa.focus();
  }

var vazio = false;
// espaco, tab, enter, recuo
var whitespace = " \t\n\r";

function VerificaEmail (s)
  {
  if (VerificaVazio(s))
    if (VerificaEmail.arguments.length == 1) return vazio;
    else return (VerificaEmail.arguments[1] == true);
  if (VerificaEspacos(s)) return false;
  var i = 1;
  var sLength = s.length;
  while (i < sLength && s.charAt(i) != "@") i++;
  if (i >= sLength || s.charAt(i) != "@") return false;
  else i += 2;
  while (i < sLength && s.charAt(i) != ".") i++;
  if (i >= sLength - 1 || s.charAt(i) != ".") return false;
  else return true;
  }

function VerificaVazio(s)
  {
  return ((s == null) || (s.length == 0))
  }

function VerificaEspacos(s)
  {
  var i,c,j = 0;
  if (VerificaVazio(s)) return true;
  for (i = 0; i < s.length; i++)
    {
    c = s.charAt(i);
    if (whitespace.indexOf(c) == -1) j++;
    }
  if (j == i) return false;
  else return true;
  }

function janela(param,w,h,nome)
  {
  var nomearq=param;
  var windowvar = window.open(nomearq,nome,"scrollbars=yes,location=no,directories=no,status=no,menubar=no,resizable=no,toolbar=no,width="+ w + ",height="+h );
  }