//Função Maxsize para TextArea
//Acionada pelos eventos onKeyPress e onPaste
// parametros : intMax	= tamanho maximo do campo
// objElement	= ref ao elemento

function maxSize(intMax, objElement)
{
	var strText = '';
	var intTam = 0;

	if (objElement != null)
	{
		strText = objElement.value

		intTam = (strText.length + 1)

		if (window.event.type == 'paste')
		{	
			intTam = clipboardData.getData('Text').length + strText.length
		}
		

		if ( intTam > intMax)
		{
			window.event.returnValue = false;			
			return		
		}
	}
}
