function counterUpdate(opt_countedTextBox, opt_countBody, opt_maxSize) { 
	//Função para contar caracteres em um textarea
	var countedTextBox = opt_countedTextBox ? opt_countedTextBox : "counttxt"; 
	var countBody = opt_countBody ? opt_countBody : "countBody"; 
	var maxSize = opt_maxSize ? opt_maxSize : 1024; 
	
	var field = document.getElementById(countedTextBox); 
	
	if (field && field.value.length >= maxSize) { 
		field.value = field.value.substring(0, maxSize); 
	} 
	var txtField = document.getElementById(countBody); 
	if (txtField) { 
		txtField.innerHTML = field.value.length; 
	} 
} 

function abrepopup(pagina,width,height,top,left,resizable,menubar,scrollbars,titlebar){
	var param = 'width='+width+',height='+height+',top='+top+',left='+left+',resizable='+resizable+',menubar='+menubar+',scrollbars='+scrollbars+',titlebar='+titlebar;
	window.open(pagina,'popup',param);	
}
