var postmaxchars = 1000;

function validate(theform) {
	if (postmaxchars != 0) {
		if (theform.txtMsg.value.length > postmaxchars) {
			alert("Il tuo messaggio e\' troppo lungo.\n\nRiduci il tuo messaggio a " + postmaxchars + " caratteri.\nAttualmente e\' di " + theform.txtMsg.value.length + " caratteri.");
			return false; }
		else { return true; }
	} else { return true; }
}

function checklength(theform) {
	if (postmaxchars != 0) { txtMessage = "\nIl massimo numero di caratteri e\' " + postmaxchars + "."; }
	else { txtMessage = ""; }
	alert("La tua risposta contiene " + theform.txtMsg.value.length + " caratteri." + txtMessage);
}

function addSmile(smile) {
	_ctl0.txtMsg.value = _ctl0.txtMsg.value + smile;
}
