function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}




hoje = new Date()
dia = hoje.getDate()
dias = hoje.getDay()
mes = hoje.getMonth()
ano = hoje.getFullYear()

if (dia < 10)
		dia = "0" + dia

function CriaArray (n) {
this.length = n }

NomeDia = new CriaArray(7)
NomeDia[0] = "Domingo"
NomeDia[1] = "Segunda"
NomeDia[2] = "Terça"
NomeDia[3] = "Quarta"
NomeDia[4] = "Quinta"
NomeDia[5] = "Sexta"
NomeDia[6] = "Sá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"
//
function WriteDate() {
	document.write (dia + " de " + NomeMes[mes] + " de " + ano)
}

var er = new RegExp(/^[A-Za-z0-9_\-\.]+@[A-Za-z0-9_\-\.]{2,}\.[A-Za-z0-9]{2,}(\.[A-Za-z0-9])?/);
try {
	ajax = new ActiveXObject("Microsoft.XMLHTTP");
} catch(e) {
	try {
		ajax = new ActiveXObject("Msxml2.XMLHTTP");
	} catch(ex) {
		try {
			ajax = new XMLHttpRequest();
		} catch(exc) {
			alert("Esse browser não tem recursos para uso do Ajax");
			ajax = null;
		}
	}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function validaBusca(){
	busca   = document.getElementById("busca").value;
	tamanho = document.getElementById("busca").value.length;
	if (busca == "" || tamanho < 3 ){
		alert("Deve preencher a busca ou mais que 3 caracteres!");
		 document.getElementById("busca").focus();
		return false;
	}
	
	document.buscaConteudo.submit();
	return true;
}

