// funcao para mostrar o erro de validacao do email
	function displayEmailInvalido() {
		alert("Email inválido.");
	}
	
	function displayComentarioInvalido() {
		alert("O comentário não pode ser vazio.");
	}
	
	function validaComentario() {
		if(document.formManterComentario.TEXTO_COMENTARIO.value.length == 0) {
			displayComentarioInvalido();
			return false;
		} else {
			return true;
		}
	}

	// Funcao padrao para submeter o form

	var enviado = false;

	function disparaAction( acao ) {
		if ( !enviado ) {
			enviado = true;
			document.formManterComentario.action = acao ;
			document.formManterComentario.submit();
			return false;
		}		
	}
	
	var intLim = 1024; 
	var strErro = "Você ultrapassou o limite de caracteres."; 
	function me_checkLim(obj){			 
		intLng = obj.value.length;			 
		if(intLng > intLim){				 
			obj.value = obj.value.substring(0,intLim)								 
		} 
		else{				 
			document.getElementById('carRest').innerHTML = (intLim - obj.value.length);				 
		} 
	} 		
	
function clickHandler (evt) {
	if (document.layers) {
		return false;
	} else if (evt.stopPropagation) {
		evt.stopPropagation();
		evt.preventDefault();
	} else if (window.event) {
		return false;
	}
}

function stopClickPrevention () {
	if (document.layers) {
		window.releaseEvents(Event.CLICK);
		window.onclick = null;
	} else if (document.all && !document.getElementById) {
		document.onclick = null;
	} else if (document.all) {
		document.detachEvent('onclick', clickHandler);
	} else if (document.addEventListener) {
		document.removeEventListener('click', clickHandler, true);
	}
	for(i=0; i < document.links.length; i++){
		document.links[i].style.cursor="pointer";
	}
}


// function disables links and clicking
function initClickPrevention () {
	if (document.layers) {
		window.captureEvents(Event.CLICK);
		window.onclick = clickHandler;
	} else if (document.all && !document.getElementById) {
		document.onclick = clickHandler;
	} else if (document.all) {
		document.attachEvent('onclick', clickHandler);
	} else if (document.addEventListener) {
		document.addEventListener('click', clickHandler, true);
	}
	for(i=0; i < document.links.length; i++) {
		document.links[i].style.cursor="default";
	}
}