function ismaxlength(obj,maxLenght)
{
	var mlength=maxLenght;
	if (obj.getAttribute && obj.value.length>mlength)
		alert("Hai raggiunto il massimo di caratteri consentito")
	obj.value=obj.value.substring(0,mlength);
	document.getElementById(obj.name + '_counter').value = mlength - obj.value.length;
}

