<!--
function pop(page,w,h){
	strTamanho = "width="+ w +",height="+ h
	window.open(page,'pop','scrollbars=no,'+strTamanho);
}
//-->
/*
Script Adicionar ao favoritos
*/
var bookmarkurl="http://www.sbadvogadosassociados.com"
var bookmarktitle="SB Advogados Associados"
function addbookmark(){
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}
//-->
function vogalAcentuada(s) {
	ls = s.toLowerCase();
	if ((ls.indexOf("á")>=0) || (ls.indexOf("à")>=0) || (ls.indexOf("ã")>=0) || (ls.indexOf("â")>=0) || (ls.indexOf("é")>=0) || (ls.indexOf("í")>=0) || (ls.indexOf("ó")>=0) || (ls.indexOf("õ")>=0) || (ls.indexOf("ô")>=0) || (ls.indexOf("ú")>=0) || (ls.indexOf("ü")>=0))
		return true;
}

function verificaEmail(s) {
	
	if (s.length <= 0)
		{
		return false;
		}
	// { } ( ) < > [ ] | \ /
	if ((s.indexOf("{")>=0) || (s.indexOf("}")>=0) || (s.indexOf("(")>=0) || (s.indexOf(")")>=0) || (s.indexOf("<")>=0) || (s.indexOf(">")>=0) || (s.indexOf("[")>=0) || (s.indexOf("]")>=0) || (s.indexOf("|")>=0) || (s.indexOf("\"")>=0) || (s.indexOf("/")>=0) )
		{
		return false;
		}
	if (vogalAcentuada(s))
		{
		return false;
		}
	// & * $ % ? ! ^ ~ ` ' "
	if ((s.indexOf("&")>=0) || (s.indexOf("*")>=0) || (s.indexOf("$")>=0) || (s.indexOf("%")>=0) || (s.indexOf("?")>=0) || (s.indexOf("!")>=0) || (s.indexOf("^")>=0) || (s.indexOf("~")>=0) || (s.indexOf("`")>=0) || (s.indexOf("'")>=0) )
		{
		return false;
		}
	// , ; : = #
	if ((s.indexOf(",")>=0) || (s.indexOf(";")>=0) || (s.indexOf(":")>=0) || (s.indexOf("=")>=0) || (s.indexOf("#")>=0) )
		{
		return false;
		}
	// procura se existe apenas um @
	if ( (s.indexOf("@") < 0) || (s.indexOf("@") != s.lastIndexOf("@")) )
		{
		return false;
		}
	// verifica se tem pelo menos um ponto após o @
	if (s.lastIndexOf(".") < s.indexOf("@"))
		{
		return false;
		}
	return true;
}

function verifica(){

if (!verificaEmail(document.form1.emailamigo.value))
		{
		alert("O formato do email do seu amigo está incorreto");
		document.form1.emailamigo.focus();
		return false;
		}	
if (!verificaEmail(document.form1.email.value))
		{
		alert("O formato do seu mail está incorreto");
		document.form1.email.focus();
		return false;
}	

if (document.form1.nome.value == "")
		{
		alert("Preencha seu nome");
		document.form1.nome.focus();
		return false;
		}
		
if (document.form1.email.value == "")
		{
		alert("Preencha seu email");
		document.form1.email.focus();
		return false;
		}
if (document.form1.nomeamigo.value == "")
		{
		alert("Preencha o nome do seu amigo");
		document.form1.nomeamigo.focus();
		return false;
		}


}
// JavaScript que escreve a Data no HTML


	hoje = new Date()
	dia = hoje.getDate()
	dias = hoje.getDay()
	mes = hoje.getMonth()
	ano = hoje.getYear()

		  hora = hoje.getHours()

	if (dia < 10)


		dia = "0" + dia


	if (ano < 2000)


		ano = "2" + ano - "100"


	function CriaArray (n) {

	this.length = n }


	NomeDia = new CriaArray(7)


	NomeDia[0] = "Domingo"

	NomeDia[1] = "Segunda-feira"

	NomeDia[2] = "Ter&ccedil;a-feira"

	NomeDia[3] = "Quarta-feira"

	NomeDia[4] = "Quinta-feira"

	NomeDia[5] = "Sexta-feira"

	NomeDia[6] = "S&aacute;bado"

	NomeMes = new CriaArray(12)

	NomeMes[0] = "Janeiro"

	NomeMes[1] = "Fevereiro"

	NomeMes[2] = "Mar&ccedil;o"

	NomeMes[3] = "Abril"

	NomeMes[4] = "Maio"

	NomeMes[5] = "Junho"

	NomeMes[6] = "Julho"

	NomeMes[7] = "Agosto"

	NomeMes[8] = "Setembro"

	NomeMes[9] = "Outubro"

	NomeMes[10] = "Novembro"

	NomeMes[11] = "Dezembro"

//#################################################
//################ Funcão que retorna a data
//#################################################
// parametros :
//dsize=tamanho da font * dface=tipo da fonte * dcolor=cor da font 

function WriteDate(dsize,dface,dcolor){

	document.write ("Barcarena,&nbsp;" + dia + " de " + NomeMes[mes] + " de " + ano+ "&nbsp;")
}

 // final da function

