<!--
function onmouseover_classi(questo) {
	questo.style.background = '#7aa1e2';
	if(questo.value == questo.name) return;
	questo.value = questo.name; 
	questo.focus();
	insert_comment_xmlhttprequest(questo.name,document.form_commenti.commento.value);
}

function onmouseout_classi(questo) {
	questo.style.background = '#fff';
}

function click_classi(class_name) {
	document.form_commenti.commento.value = trim(document.form_commenti.commento.value);
	if(trim(document.form_commenti.commento.value) == '' || document.form_commenti.commento.value == 'Inserisci un commento...')
		select_comment_xmlhttprequest(class_name);
	else
		insert_comment_xmlhttprequest(class_name,document.form_commenti.commento.value);
	
	document.form_commenti.commento.focus();
}


/**
*
* Javascript trim, ltrim, rtrim
* http://www.webtoolkit.info/
*
*
**/

function trim(str, chars) {
    return ltrim(rtrim(str, chars), chars);
}

function ltrim(str, chars) {
    chars = chars || "\\s";
    return str.replace(new RegExp("^[" + chars + "]+", "g"), "");
}

function rtrim(str, chars) {
    chars = chars || "\\s";
    return str.replace(new RegExp("[" + chars + "]+$", "g"), "");
}
//-->
