// conta caracteres
function charCount(counterID,counterValue) {
if (document.getElementById) {
	var exibeResultado = document.getElementById(counterID);
		exibeResultado.innerHTML = "<b>" +counterValue+"</b> caracteres disponíveis";
	}
}

// valida formulário
function cleitorSave() {
var clTitulo = document.cleitorForm.clTitulo;
var clTexto = document.cleitorForm.clTexto;
var clRock = document.cleitorForm.clRock;
var clPop = document.cleitorForm.clPop;

if (clTitulo.value=='') {
	document.getElementById("CLEB").style.display = 'block';
	document.getElementById("CLEBText").innerHTML = 'Por favor, preencha o campo título.';
	clTitulo.style.backgroundColor='#ffffcd';
	window.self.location = '#CLEB';
	clTitulo.focus();
	return false;
	} else {
		document.getElementById("CLEB").style.display = 'none';
		document.getElementById("CLEBText").innerHTML = '';
		clTitulo.style.backgroundColor='';
	}
if (clTexto.value=='') {
	document.getElementById("CLEB").style.display = 'block';
	document.getElementById("CLEBText").innerHTML = 'Por favor, preencha o campo texto.';
	clTexto.style.backgroundColor='#ffffcd';
	window.self.location = '#CLEB';
	clTexto.focus();
	return false;
	} else {
		document.getElementById("CLEB").style.display = 'none';
		document.getElementById("CLEBText").innerHTML = '';
		clTexto.style.backgroundColor='';
	}
if (clRock.checked==false && clPop.checked==false) {
	document.getElementById("CLEB").style.display = 'block';
	document.getElementById("CLEBText").innerHTML = 'Por favor, indique ao menos uma opção em segmentação.';
	window.self.location = '#CLEB';
	clRock.focus();
	return false;
	} else {
		document.getElementById("CLEB").style.display = 'none';
		document.getElementById("CLEBText").innerHTML = '';
	}
	document.cleitorForm.submit();
}