function showPhoto(photo, w, h, text) {
  //
  if (photo != 'empty') {
    //
    var winl = (screen.width - w) / 2;
    var wint = (screen.height - h) / 2;
    h = h + 100; // Texto.
    //
    PhotoWin = window.open('', 'Foto', 'width='+w+', height='+h+', top='+wint+', left='+winl+', scrollbars=auto, resizable=yes');
    PhotoWin.document.write('<html><link href="css/site.css" rel="stylesheet" type="text/css"><body bgcolor="#F0F0F0" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"><img src="'+photo+'" border="0"><div id=photoframe style="Z-INDEX: 50; LEFT: 0px; OVERFLOW-Y: scroll; WIDTH: 100%; POSITION: relative; TOP: 0px; HEIGHT: 100px; filter: chroma (color=#C8D3D9)" allowtransparency="true" class="scroll"><table border="0" cellpadding="8" align="center" valign="middle" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-weight: bold"><tr><td>'+text+'</td></tr></table></div></body></html>');
    //
  }
  //
}

function checkContactForm(dsEmail, dsMensagem) {
  //
  if (!(checkEmail(dsEmail))) {
    window.alert('Digite um e-mail de contato para enviar o formulário.');
    event.returnValue=false; // Evitando submeter o formulário no ENTER.
  }
  else
  //
  if (dsMensagem == '') {
    window.alert('Digite a sua mensagem e clique em "Enviar".');
    event.returnValue=false; // Evitando submeter o formulário no ENTER.
  }
  //
}

function checkEmail(email) {
  //
  var filter = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
  //
  if (filter.test(email))
    return true;
  else
    return false;
  //
}

