$(document).ready(function() {
	$('#dvUltFotos').after('<div id="nav">')
	.cycle({ 
		fx:     'shuffle', 
		speed:  'slow', 
		timeout: 7000,
		pager:  '#nav'
	});
});

var offsetfromcursorX=12 //Customize x offset of tooltip
var offsetfromcursorY=10 //Customize y offset of tooltip

var offsetdivfrompointerX=10 //Customize x offset of tooltip DIV relative to pointer image
var offsetdivfrompointerY=14 //Customize y offset of tooltip DIV relative to pointer image. Tip: Set it to (height_of_pointer_image-1).

document.write('<div id="dhtmltooltip"></div>') //write out tooltip DIV
document.write('<img id="dhtmlpointer" src="arrow2.gif">') //write out pointer image

var ie=document.all
var ns6=document.getElementById && !document.all
var enabletip=false
if (ie||ns6)
var tipobj=document.all? document.all["dhtmltooltip"] : document.getElementById? document.getElementById("dhtmltooltip") : ""

var pointerobj=document.all? document.all["dhtmlpointer"] : document.getElementById? document.getElementById("dhtmlpointer") : ""

function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function ddrivetip(thetext, thewidth, thecolor){
if (ns6||ie){
if (typeof thewidth!="undefined") tipobj.style.width=thewidth+"px"
if (typeof thecolor!="undefined" && thecolor!="") tipobj.style.backgroundColor=thecolor
tipobj.innerHTML=thetext
enabletip=true
return false
}
}

function positiontip(e){
if (enabletip){
var nondefaultpos=false
var curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft;
var curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop;
//Find out how close the mouse is to the corner of the window
var winwidth=ie&&!window.opera? ietruebody().clientWidth : window.innerWidth-20
var winheight=ie&&!window.opera? ietruebody().clientHeight : window.innerHeight-20

var rightedge=ie&&!window.opera? winwidth-event.clientX-offsetfromcursorX : winwidth-e.clientX-offsetfromcursorX
var bottomedge=ie&&!window.opera? winheight-event.clientY-offsetfromcursorY : winheight-e.clientY-offsetfromcursorY

var leftedge=(offsetfromcursorX<0)? offsetfromcursorX*(-1) : -1000

//if the horizontal distance isn't enough to accomodate the width of the context menu
if (rightedge<tipobj.offsetWidth){
//move the horizontal position of the menu to the left by it's width
tipobj.style.left=curX-tipobj.offsetWidth+"px"
nondefaultpos=true
}
else if (curX<leftedge)
tipobj.style.left="5px"
else{
//position the horizontal position of the menu where the mouse is positioned
tipobj.style.left=curX+offsetfromcursorX-offsetdivfrompointerX+"px"
pointerobj.style.left=curX+offsetfromcursorX+"px"
}

//same concept with the vertical position
if (bottomedge<tipobj.offsetHeight){
tipobj.style.top=curY-tipobj.offsetHeight-offsetfromcursorY+"px"
nondefaultpos=true
}
else{
tipobj.style.top=curY+offsetfromcursorY+offsetdivfrompointerY+"px"
pointerobj.style.top=curY+offsetfromcursorY+"px"
}
tipobj.style.visibility="visible"
if (!nondefaultpos)
pointerobj.style.visibility="visible"
else
pointerobj.style.visibility="hidden"
}
}

function hideddrivetip(){
if (ns6||ie){
enabletip=false
tipobj.style.visibility="hidden"
pointerobj.style.visibility="hidden"
tipobj.style.left="-1000px"
tipobj.style.backgroundColor=''
tipobj.style.width=''
}
}

document.onmousemove=positiontip

var fonte = 10;
function Faumenta() {
	if (fonte < 16 ) { fonte += 2; }
	document.getElementById('mFonte').style.fontSize = fonte;
}
function Fadiminui() {
	if (fonte > 8 ) { fonte -= 2; }
	document.getElementById('mFonte').style.fontSize = fonte;
}


function confirmar(label,url) {
	var pergunta = confirm(label)
	if (pergunta){
		window.location = url;
	}
	else{ }
}
function ContaCaracteres() {
  intCaracteres = 1000 - document.opcoes.infor.value.length;
  if (intCaracteres > 0) {
    document.opcoes.caracteres_total.value = intCaracteres;
    return true;
  }
  else {
    intMensagem = 1000;
    document.opcoes.caracteres_total.value = 0;
    document.opcoes.infor.value = document.opcoes.infor.value.substr(0,intMensagem)
    return false;
  }
}
var vrs=navigator.appVersion;
var IE=((vrs.indexOf("IE") > -1) || (vrs.indexOf("Mac") > -1)) ;
function gid(v) {
  if ((vrs.indexOf("IE") > -1) || (vrs.indexOf("Mac") > -1) )return document.all[v];
  else return document.getElementById(v);
}
var z=0;
var ext=new Array('jpeg','.jpg','.gif','.png','.bmp');
function trim2(s) { return s.replace(/^\s*|\s*$/g,""); }
function stK(v) {
  if (v.createTextRange) v.caretPos = document.selection.createRange().duplicate();
  cC(v);
}
function parar() {
  gid('fotuxa').src='preview.gif';
  gid('fotuxa').width=500;
  gid('fotuxa').height=375;
  gid('file').focus();
  gid('file').value = '';
}

function in_array(x,y) {
  var z=false;
  for(var i=0;i<y.length;i++) if(y[i] == x) z=true;
  return z;
}

function cC(v) {
  var s = v.value;
  if(s.length > 10005)  {
    alert('O texto do seu post atingiu o limite de 10.000 caracteres.');
    gid('cofoto').value=s.substring(0,10001);
    v.blur();
    return false;
  }
  return true;
}
function finfo() {
  var fl=document.cadastro.file.value;
  var ex=fl.substr(fl.length - 4).toLowerCase();
  if (fl.length < 1) alert('Você deve selecionar a foto antes de prosseguir.\n\nClique em Procurar...');
  else if (in_array(ex,ext)) {
    gid('fotuxa').src='';
    if(fl.charAt(0) == '/') fl=fl.substring(1);
    gid('fotuxa').src="file://"+fl;
  }
  else {
    alert("Você está tentando mandar um arquivo de extensão ."+ex+".\nFormatos de fotos aceitos: JPG, JPEG, GIF e PNG.");
    gid('file').focus();
  }
}

function setsize() {
  if (gid('fotuxa').fileSize > 1024000) {
    alert("A foto que você está tentando enviar possui mais que 1MB.\n\nPor favor, selecione uma foto menor ou edite esta no seu programa gráfico preferido.");
    parar();
    return false;
  }
  var h=gid('fotuxa').height;var v=gid('fotuxa').width;
  if(h > 375 && h > v ) gid('fotuxa').height=375;
  else if(v > 500) gid('fotuxa').width=500;
}
function abre(url, width, height) { window.open(url,"_blank","resizable=no,toolbar=no,status=no,menubar=no,scrollbars=no,width=" + width + ",height=" + height) }
function cores(parm) {
var prog = 'cores.php?escolha=';
abre(prog+parm,145,140);
}
function checkup() {
  var fl=document.cadastro.file.value;
  var ex=fl.substr(fl.length - 4).toLowerCase();
  if (gid('cofoto').length > 10000) {
    alert('O texto do seu post atingiu o limite de 10.000 caracteres.');
    gid('cofoto').focus();
    return false;
  }
  else if(trim2(gid('cofoto').value) == '') {
    alert("Por favor, digite o texto do seu post");
    document.cadastro.cofoto.focus();
    return false;
  }
  else if(!in_array(ex,ext)) { alert("Você está tentando enviar um arquivo de extensão ."+ex+".\nOs formatos aceitos são: JPG, JPEG, GIF e PNG\n"); return false; }
  else {
    window.status='Aguarde, sua foto está sendo enviada...';
    gid('enviar').disabled=true;
    gid('enviar').value='Enviando, aguarde...';
  } 
}
function tavazio(objid) {
    var obj = document.getElementById(objid);
    if (!obj || obj.value == "") { return true; }
    return false;
}
/* Formatação para qualquer mascara */
function formatar(src, mask) {
	var i = src.value.length;
	var saida = mask.substring(0,1);
	var texto = mask.substring(i)
	if (texto.substring(0,1) != saida) { src.value += texto.substring(0,1); }
}
/* 
Exemplos:
CEP
OnKeyPress="formatar(this, '#####-###')"
CPF
OnKeyPress="formatar(this, '###.###.###-##')"
DATA
OnKeyPress="formatar(this, '##/##/####')"
*/

var ns6=document.getElementById&&!document.all
var ie=document.all

function show_text(thetext, whichdiv){
	if (ie) eval("document.all."+whichdiv).innerHTML=linktext[thetext]
	else if (ns6) document.getElementById(whichdiv).innerHTML=linktext[thetext]
	document.images.show.src = "./horoscopo/img/"+thetext+".jpg";
}

function reset(whichdiv){
	if (ie) eval("document.all."+whichdiv).innerHTML=' '
	else if (ns6) document.getElementById(whichdiv).innerHTML=' '
}


var isNN = (navigator.appName.indexOf("Netscape")!=-1);
function autoTab(input,len, e) {
var keyCode = (isNN) ? e.which : e.keyCode; 
var filter = (isNN) ? [0,8,9] : [0,8,9,16,17,18,37,38,39,40,46];
if(input.value.length >= len && !containsElement(filter,keyCode)) {
input.value = input.value.slice(0, len);
input.form[(getIndex(input)+1) % input.form.length].focus();
}
function containsElement(arr, ele) {
var found = false, index = 0;
while(!found && index < arr.length)
if(arr[index] == ele)
found = true;
else
index++;
return found;
}
function getIndex(input) {
var index = -1, i = 0, found = false;
while (i < input.form.length && index == -1)
if (input.form[i] == input)index = i;
else i++;
return index;
}
return true;
}
function Tecla(e)
{
	if (document.all) // Internet Explorer
		var tecla = event.keyCode;
	else if(document.layers) // Nestcape
		var tecla = e.which;
		if (tecla > 47 && tecla < 58) // numeros de 0 a 9
			return true;
		else
			{
				if (tecla != 8) // backspace
					event.keyCode = 0;
					//return false;
				else
					return true;
			}
}
//visu. mala-.
function mostrastatus(parm) { 
  window.status = parm;
  return true;
}
//entrevista com cileno
function entcileno(qual) { Abre("entcileno.php?parte="+qual,170,190); }
//entrevista casulo
function entcasulo() {
  Abre("entcasulo.php",240,240);
}
//entrevista planta e raiz
function entplanta() {
  Abre("vidplanta.php",240,240);
}
// videop planta e raiz
function vidplanta() {
  alert("Vídeo ainda não disponível!");
}
// ver comentario da entrevisda
function VerComEnt(qual) {
  var prog = 'ver_comentario.php?id='
  window.open(prog+qual,"Comentario","resizable=no,toolbar=no,status=no,menubar=no,scrollbars=yes,top=100,left=200,width=450,height=200")
}
// comentar entrevista
function coment(aidi) {
  var ent = 'coment.php?ent=' + aidi;
  Abre(ent,290,274);
}
// enviar entrevista por e-mail
function envent(aidi) {
  var ent = 'envent.php?ent=' + aidi;
  Abre(ent,250,260);
}
// imprimir entrevista
function impent(aidi) {
  var ent = 'impent.php?ent=' + aidi;
  Abre(ent,600,500);
}
// tutorial do hotmail 
function TutoHotmail(width, height) { window.open("tutohotmail/tutohotmail.php","_blank","resizable=no,toolbar=no,status=no,menubar=no,scrollbars=yes,width=" + width + ",height=" + height) }
// funçao pra abrir janela com a url, largura e altura especificada, sem barra de rolagem
function Abre(url, width, height) { window.open(url,"_blank","resizable=no,toolbar=no,status=no,menubar=no,scrollbars=no,width=" + width + ",height=" + height) }
// funçao pra abrir janela com barra de rolagem
function Abre2(url, width, height) { window.open(url,"_blank","resizable=no,toolbar=no,status=no,menubar=no,scrollbars=yes,width=" + width + ",height=" + height) }
// abrir janela de recuperar senha
function recuperarsenha() {
Abre("recuperarsenha.php",208,200);
}
function Vota(formID, hei) {
	var formularios = document.forms.length;
	for(i=0;i<formularios;i++) {
		if(document.forms[i].name==formID) {  var formulario = i; break; }
	}
	var num_respostas = document.forms[formulario].opcao.length;
	var enqid = document.forms[formulario].enqid.value;
	var resposta = num_respostas;
	var respostas = "";
	for(i=0;i<num_respostas;i++) {
		if(document.forms[formulario].opcao[i].checked) {
	    resposta = i;
	    if(respostas) { respostas=respostas + "&"; }
	    else { respostas=respostas + "?"; }
	    respostas=respostas + "opcao=" + document.forms[formulario].opcao[i].value; 
	  }
	}
	if(resposta==num_respostas) { alert("Escolha uma opção!");	}
	else { Abre("enquete.php" + respostas + "&enqid=" + enqid,460,hei); }
}
function vertheme(oq) {
  posicao_w = '750';
  posicao_h = '450';
  posicao_x = (screen.width) ? (screen.width-posicao_w)/2 : 0;
  posicao_y = (screen.height) ? (screen.height-posicao_h)/2 : 0;
  window.open("vertheme.php?oq="+oq,"_blank","resizable=no,toolbar=no,status=no,menubar=no,scrollbars=no,top="+posicao_y+",left="+posicao_x+",width="+posicao_w+",height="+posicao_h);
}
function avisocaracteres(oq) {
    var prog = 'avisocaracteres.php';
    window.open(prog,"Aviso","resizable=no,toolbar=no,status=no,menubar=no,scrollbars=yes,top=100,left=100,width=320,height=250")
}
function CupomLaguna(aidi) {
    var prog = 'lagunacupom.php?id=' + aidi;
    window.open(prog,"Cupom","resizable=no,toolbar=no,status=no,menubar=no,scrollbars=yes,top=100,left=100,width=560,height=320")
}
function VerFotoEv(foto,w,h,evid) {
	posicao_w = w + 95;
	posicao_h = h + 80;
	posicao_x = (screen.width) ? (screen.width-posicao_w)/2 : 0;
	posicao_y = (screen.height) ? (screen.height-posicao_h)/2 : 0;
	posicao_y = posicao_y-10
	var prog = 'verfotoev.php?img=' + foto + '&evid=' + evid;
	window.open(prog,"_blank","resizable=no,toolbar=no,status=no,menubar=no,scrollbars=no,top="+posicao_y+",left="+posicao_x+",width="+posicao_w+",height="+posicao_h);
}
function VerFoto(foto,w,h,evid) {
	//posicao_w = w+20;
	//posicao_h = h+10;
	posicao_w = w;
	posicao_h = h;
	posicao_x = (screen.width) ? (screen.width-posicao_w)/2 : 0;
	posicao_y = (screen.height) ? (screen.height-posicao_h)/2 : 0;
	posicao_y = posicao_y-10
	var prog = 'verfoto.php?img='
	var prog2 = '&evid='
	window.open(prog+foto+prog2+evid,"_blank","resizable=no,toolbar=no,status=no,menubar=no,scrollbars=no,top="+posicao_y+",left="+posicao_x+",width="+posicao_w+",height="+posicao_h);
}
function noticia(oq) {
    var prog = 'noticias.php?id=' + oq;
    window.open(prog,"Status","resizable=no,toolbar=no,status=no,menubar=no,scrollbars=yes,top=100,left=200,width=450,height=300")
}
function DetalheEvento(qual) {
    var prog = 'detalhevento.php?id='
    window.open(prog+qual,qual,"resizable=no,toolbar=no,status=no,menubar=no,scrollbars=yes,top=100,left=200,width=430,height=300")
}
function IsNumber(numero) {
  var ValidChars = "0123456789";
  var IsNumber = true;
  var Char;
  for (i = 0; i < numero.length && IsNumber == true; i++) { 
    Char = numero.charAt(i);
    if (ValidChars.indexOf(Char) == -1) {
      IsNumber = false;
    }
  }
  return IsNumber;
}

function validaremail(apelido, email, qual) {
  if (email == "") {
    if (qual == "email") { alert(apelido + ", você não nos informou o seu E-Mail!\rEle é muito importante pois será o seu login."); }
    if (qual == "msn") { alert(apelido + ", você nos informou que usa outro E-Mail no MSN Messenger mas não informou qual seria."); }
    if (qual == "recado") { alert(apelido + ", você não nos informou o seu E-Mail!"); }
    return false;
  }
  if (email.indexOf("@") == -1) { 
    alert(apelido + ", o seu E-Mail não tem '@'."); 
    return false; 
  }
  if (email.indexOf(",") != -1) { 
    alert(apelido + ", o seu E-Mail não pode conter ','.\rÉ um caractere inválido");
    return false; 
  }
  if (email.indexOf("#") != -1) { 
    alert(apelido + ", o seu E-Mail não pode conter '#'.\rÉ um caractere inválido");
    return false; 
  }
  if (email.indexOf("!") != -1) { 
    alert(apelido + ", o seu E-Mail não pode conter '!'.\rÉ um caractere inválido");
    return false; 
  }
  if (email.indexOf(" ") != -1) { 
    alert(apelido + ", o seu E-Mail não pode conter espaços.");
    return false; 
  }
  if (email.length == (email.indexOf("@") + 1) ) {
    alert(apelido + ", você não especificou o seu domnínio\rNão tem nada depois da '@'.");
    return false;
  }
  return true;
}

function SubmitCadastro() {
  // apelido
  apelido = document.cadastro.form_apelido.value;
  if (apelido == "") {
    alert("Você esqueceu de informar o seu Apelido!");
    document.cadastro.form_apelido.focus();
    return false;
  }
  if (apelido.indexOf(" ") != -1) { 
    alert("O seu Apelido não pode conter espaços.");
    document.cadastro.form_apelido.focus();
    return false;
  }

  // nome
  if (document.cadastro.form_nome.value == "") {
    alert(apelido + ", você esqueceu de informar o seu Nome!");
    document.cadastro.form_nome.focus();
    return false;
  }

  // email
  if (!validaremail(apelido,document.cadastro.form_email.value,"email")) {
    document.cadastro.form_email.focus();
    return false;
  }

  // msn
  if (document.cadastro.form_msn[0].checked && document.cadastro.form_emailmsn.value != "") {
    alert(apelido + ", você informou que usa o E-Mail " + cadastro.form_email.value + " no MSN Messenger, porém também digitou o E-Mail: '" + cadastro.form_emailmsn.value + "' no campo MSN.\rSe este realmente for seu E-Mail, marque a opção 'Uso outro email no MSN'.");
    document.cadastro.form_emailmsn.focus();
    return false;
  }
  if (document.cadastro.form_msn[1].checked && document.cadastro.form_emailmsn.value != "") {
    alert(apelido + ", você informou que não usa MSN mas digitou o E-Mail: '" + cadastro.form_emailmsn.value + "' no campo do MSN.\rSe este do campo do MSN for realmente seu E-Mail, marque a opção 'Uso outro email no MSN'.");
    document.cadastro.form_emailmsn.focus();
    return false;
  }
  if (document.cadastro.form_msn[2].checked) {
    if (!validaremail(apelido,document.cadastro.form_emailmsn.value,"msn")) {
      document.cadastro.form_emailmsn.focus();
      return false;
    }
  }

  // icq
  if (document.cadastro.form_icq.value != "") {
    if (!IsNumber(document.cadastro.form_icq.value)) {
      alert(apelido + ", a UIN do seu ICQ é inválida!\rInforme somente o número.");
      document.cadastro.form_icq.focus();
      return false;
    }
  }

  // nascimento (dia)
  if (!IsNumber(document.cadastro.form_nascimento_dia.value)) {
    alert(apelido + ", você precisa especificar o DIA do seu nascimento.");
    document.cadastro.form_nascimento_dia.focus();
    return false;
  }
  
  // nascimento (mes)
  if (!IsNumber(document.cadastro.form_nascimento_mes.value)) {
    alert(apelido + ", você precisa especificar o MÊS do seu nascimento.");
    document.cadastro.form_nascimento_mes.focus();
    return false;
  }

  // nascimento (ano)
  if (!IsNumber(document.cadastro.form_nascimento_ano.value)) {
    alert(apelido + ", você precisa especificar o ANO do seu nascimento.");
    document.cadastro.form_nascimento_ano.focus();
    return false;
  }

  // sexo
  if ((document.cadastro.form_sexo.value == "") || (document.cadastro.form_sexo.value == "...")) {
    alert(apelido + ", você esqueceu de informar o seu Sexo!");
    document.cadastro.form_sexo.focus();
    return false;
  }
  
  // estado civil
  if ((document.cadastro.form_civil.value == "") || (document.cadastro.form_civil.value == "...")) {
    alert(apelido + ", você esqueceu de informar o seu Estado Civil!");
    document.cadastro.form_civil.focus();
    return false;
  }

// ERRO DAQUI PRA BAIXO NAO SEI PQ

  // pais
  if (document.cadastro.form_pais.value == "...") {
    alert(apelido + ", você esqueceu de informar o seu País!");
    document.cadastro.form_pais.focus();
    return false;
  }

  // estado
  if ((document.cadastro.form_pais.value == "BR") && (document.cadastro.form_uf.value == "...")) {
    alert(apelido + ", você esqueceu de informar o seu Estado.");
    document.cadastro.form_uf.focus();
    return false;
  }
  if ((document.cadastro.form_pais.value != "BR") && (document.cadastro.form_uf.value != "...")) {
    alert(apelido + ", você selecionou um Estado Brasileiro mas não informou que mora no Brasil.");
    document.cadastro.form_uf.focus();
    return false;
  }

  // cidade
  if (document.cadastro.form_cidade.value == "") {
    if (document.cadastro.form_uf.value == "...") { alert(apelido + ", você esqueceu de informar o seu Estado!\rInforme-o no campo 'Cidade' pois você informou que não reside no Brasil."); }
    else { alert(apelido + ", você esqueceu de informar a sua Cidade!"); }
    document.cadastro.form_cidade.focus();
    return false;
  }

  // senha / confirmaçao
  if (document.cadastro.form_senha.value == "") {
    alert(apelido + ", você não informou a senha.\rEla é muito importante pois será com ela que você efetuará modificações posteriores no seu cadastro.");
    document.cadastro.form_senha.focus();
    return false;
  }
  if (document.cadastro.form_senha_confirmar.value == "") {
    alert(apelido + ", você não confirmou a senha.\rEla é muito importante pois será com ela que você efetuará modificações posteriores no seu cadastro.");
    document.cadastro.form_senha_confirmar.focus();
    return false;
  }
  if (document.cadastro.form_senha.value != document.cadastro.form_senha_confirmar.value) {
    alert(apelido + ", a confirmação da senha não confere.\rSua senha e confirmação são muito importantes pois com sua senha você efetuará modificações posteriores no seu cadastro.");
    document.cadastro.form_senha_confirmar.focus();
    return false;
  }

  // foto
//  fotoext = document.cadastro.file.value.substring(document.cadastro.file.value.lastIndexOf(".") + 1).toLowerCase();
//  if ((fotoext != "") && (fotoext != "jpg") && (fotoext != "jpeg") && (fotoext != "png")) {
//    alert(apelido + ", O tipo de foto que você está tentando enviar é inválido!\rTente arquivos de extensão JPG ou PNG.");
//    document.cadastro.file.focus();
//    return false;
//  }

  // cadastrando
  if (document.cadastro.botao.value = "Cadastrar") {
    document.cadastro.botao.value = "Cadastrando...";
    document.cadastro.botao.disabled = true;
    return true;
  }
  return false;
}
function SubmitRecado() {
  // apelido
  apelido = document.recado.apelido.value;
  if (apelido == "") {
    alert("Você esqueceu de informar o seu Apelido!");
    document.recado.apelido.focus();
    return false;
  }
//  if (apelido.indexOf(" ") != -1) { 
//    alert("O seu Apelido não pode conter espaços.");
//    document.recado.apelido.focus();
//    return false;
//  }

  // nome
  if (document.recado.nome.value == "") {
    alert(apelido + ", você esqueceu de informar o seu Nome!");
    document.recado.nome.focus();
    return false;
  }

  // email
  if (!validaremail(apelido,document.recado.email.value,"recado")) {
    document.recado.email.focus();
    return false;
  }

  // cadastrando
  if (document.recado.botao.value = "Deixar recado") {
    document.recado.botao.value = "Enviando...";
    document.recado.botao.disabled = true;
    return true;
  }
  return true;
}
function whois(id) {
  posicao_w = '750';
  posicao_h = '450';
  posicao_x = (screen.width) ? (screen.width-posicao_w)/2 : 0;
  posicao_y = (screen.height) ? (screen.height-posicao_h)/2 : 0;
  window.open("whois.php?id="+id,"whois_"+id,"resizable=no,toolbar=no,status=yes,menubar=no,scrollbars=no,top="+posicao_y+",left="+posicao_x+",width="+posicao_w+",height="+posicao_h);
}
function ConfirmaBusca() {
  if (document.buscaflog.chave.value.length < 3) {
    alert("A palavra chave deve conter no mínimo 2 dígitos."); 
    document.buscaflog.chave.focus(); return false; 
  }
}