function Esvazia(valor_campo){
   
if (valor_campo.value == valor_campo.defaultValue)
	valor_campo.value='';
}

function Padrao(valor_campo){

if (valor_campo.value == '')
	valor_campo.value=valor_campo.defaultValue;
}


function textCounter(campo, countcampo, maxlimit){//conta/mostra caracteres restantes e limita o tamanho do campo
    if (campo.value.length > maxlimit) //se passar do limite nao deixa entrar o caracter
        campo.value = campo.value.substring(0, maxlimit);
        //reduz o valor do campo de contadem
    else 
        countcampo.value = maxlimit - campo.value.length;
}
 
 var url
         function Abrir(url)
         {          
                window.open(url,"resp","resizable=no,toolbar=no,status=no,menubar=no,scrollbars=no,width=420,height=240");
         }


		 function abreFoto(src, w, h) {
	window.open("foto.php?img=" + src, "_blank", "width=" + w + ",height=" + h + ",status=0,scrollbars=0");
}

function ajaxInit() {
	var req;
	
	try {
		req = new ActiveXObject("Microsoft.XMLHTTP");
	} catch(e) {
		try {
			req = new ActiveXObject("Msxml2.XMLHTTP");
		} catch(ex) {
			try {
				req = new XMLHttpRequest();
			} catch(exc) {
				req = null;
			}
		}
	}
	
	return req;
}

var $removeEvents = function (object, type)
{
	if (!object.events) return object;
	if (type){
		if (!object.events[type]) return object;
		for (var fn in object.events[type]) object.removeEvent(type, fn);
		object.events[type] = null;
	} else {
		for (var evType in object.events) object.removeEvents(evType);
		object.events = null;
	}
	return object;
};


var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var dayarray=new Array("Domingo","Segunda-feira","Terça-feira","Quarta-feira","Quinta-feira","Sexta-feira","Sábado")
var montharray=new
Array("Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro")


<!-- BE
function blockError(){return true;}
window.onerror = blockError;
//-->

<!-- DS
function disableselect(e){
return false
}
function reEnable(){
return true
}
document.onselectstart=new Function ("return false")

if (window.sidebar){

document.onmousedown=disableselect

document.onclick=reEnable
}
//-->

<!-- BD
if (window.Event) 
document.captureEvents(Event.MOUSEUP); 

function nocontextmenu() 
{ 
event.cancelBubble = true 
event.returnValue = false; 

return false; 
} 

function norightclick(e) 
{ 
if (window.Event) 
{ 
if (e.which == 2 || e.which == 3) 
return false; 
} 
else 
if (event.button == 2 || event.button == 3) 
{ 
event.cancelBubble = true 
event.returnValue = false; 
return false; 
} 

} 
if (document.layers) { 
document.captureEvents(Event.MOUSEDOWN); 
} 
document.oncontextmenu = nocontextmenu; 
document.onmousedown = norightclick; 
document.onmouseup = norightclick; 
//-->