function janela(page,w,h) {
windowprops = "left=100,top=100,width="+w+",height="+h+",margin=0,alwaysLowered=0,alwaysRaised=0,channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=1,status=0,titlebar=1,toolbar=0";
window.open(""+page, 'Popup', windowprops);
}

var browser = navigator.appName
var bookmarkurl="http://www.portalbonito.com.br"
var bookmarktitle="Portal Bonito - O Portal do Paraíso"
function favoritos(){
if(browser=="Netscape"){
alert ("Aperte CTRL+D para adicionar o Portal Bonito no seu bookmark")
}
else if(browser=="Microsoft Internet Explorer"){
window.external.AddFavorite(bookmarkurl,bookmarktitle)}
}

function foto(imagem,w,h)
{
janela = window.open("","","toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,copyhistory=no,scrollbars=no,width="+w+",height="+h);

janela.document.writeln("<html><head><TITLE>Portal Bonito - Clique para fechar</TITLE></head>");
janela.document.writeln("<BODY leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'>");
janela.document.writeln("<a href='javascript:self.close()'><img src='"+imagem+"' border='0' alt='Clique para Fechar'></a>");
janela.document.writeln("</BODY></html>");
}

function video(arquivo)
{
janelav = window.open("","","toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,copyhistory=no,scrollbars=no,width=280,height=280");

janelav.document.writeln("<html><head><title>Portal Bonito - Vídeos</title>");
janelav.document.writeln("<link REL='STYLESHEET' TYPE='text/css' HREF='../inc/style.css'></head>");
janelav.document.writeln("<body><br><p align='center'>Portal Bonito - Vídeos</a>");


janelav.document.writeln("<object id=MediaPlayer classid='CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6'");
janelav.document.writeln("codebase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715");
janelav.document.writeln("standby='Loading Microsoft Windows Media Player components...' type='application/x-oleobject'");
janelav.document.writeln("width='240' height='220'><param name='URL' value='http://www.portalbonito.com.br/videos/asxs/"+arquivo+".asx'>");
janelav.document.writeln("<PARAM NAME='AutoSize' VALUE='false'>");
janelav.document.writeln("			  <PARAM NAME='AutoStart' VALUE='true'>");
janelav.document.writeln("			  <PARAM NAME='AutoRewind' VALUE='false'>");
janelav.document.writeln(" 			  <PARAM NAME='uimode' VALUE='full'>");
janelav.document.writeln("                          <!--Netscape code-->");
janelav.document.writeln("<embed type='application/x-mplayer2' pluginspage='http://www.microsoft.com/windows/windowsmedia/'");
janelav.document.writeln(" src='http://www.portalbonito.com.br/videos/asxs/"+arquivo+".asx'");
janelav.document.writeln(" name=MediaPlayer showcontrols=1 showdisplay=0 showstatusbar=1 width=240 height=220></embed></object>");
janelav.document.writeln("<br><a href='javascript:window.close()'>FECHAR</a>");
janelav.document.writeln("</BODY></html>");
}

function sky_Validator2(theForm)
{

if (theForm.nome.value == "")
  {
    alert("O campo nome é obrigatório!");
    theForm.nome.focus();
    return (false);
  }

if (theForm.email.value == "")
  {
    alert("O campo e-mail é obrigatório!");
    theForm.email.focus();
    return (false);
  }

var email = document.validar.email.value;
if ((email.indexOf("@",0) < 1) || (email.indexOf("@",0) == email.length - 1))
 {
alert("Seu e-mail está incorreto");
theForm.nome.focus();
return (false);
 }

var email = document.validar.email.value;
    var BadChars = "*|,\":<>[]{}`\'';()&$#% ";
    var GoodChars = "@.";
    var posarroba = email.indexOf ('@',0);
    if (email.length < 6){
        alert("E-mail inválido!");
        document.validar.email.value = "";
        document.validar.email.focus();
        return false;
    }
    for (var i = 0; i < email.length; i++){
        if (BadChars.indexOf(email.charAt(i)) != -1){
            alert("E-mail inválido!");
            document.validar.email.value = "";
            document.validar.email.focus();
            return false;
        }
    }
    for (var i = 0; i < GoodChars.length; i++){
        if (email.indexOf(GoodChars.charAt(i)) == -1){
            alert("E-mail inválido!");
            document.validar.email.value = "";
            document.validar.email.focus();
            return false;
        }
        if (email.indexOf(GoodChars.charAt(i),0) == 0){
            alert("E-mail inválido!");
            document.validar.email.value = "";
            document.validar.email.focus();
            return false;
        }
        if (email.lastIndexOf(GoodChars.charAt(i)) > email.length-3){
            alert("E-mail inválido!");
            document.validar.email.value = "";
            document.validar.email.focus();
            return false;
        }
    }
    if (email.lastIndexOf('@') > email.lastIndexOf('.')){
        alert("E-mail inválido!");
        document.validar.email.value = "";
        document.validar.email.focus();
        return false;
    }

    if (email.indexOf ('@.',0) != -1 || email.indexOf ('.@',0) != -1){
        alert("E-mail inválido!");
        document.validar.email.value = "";
        document.validar.email.focus();
        return false;
    }
    if (email.indexOf ('@',posarroba+1) != -1){
        alert("E-mail inválido!");
        document.validar.email.value = "";
        document.validar.email.focus();
        return false;
    }
}