<!--
function trim(sString) {
	/*
	while (sString.substring(0,1) == ' ') {
		sString = sString.substring(1, sString.length);
	}
	while (sString.substring(sString.length-1, sString.length) == ' ') {
		sString = sString.substring(0,sString.length-1);
	}
	return sString;
	*/
	return sString.replace(/\s+$|^\s+/g,"");
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function hide_element(element_id) {
	var div_element = document.getElementById(element_id);
	if (div_element) {
		div_element.style.display = 'none';
	}
}
function show_element(element_id) {
	var div_element = document.getElementById(element_id);
	if (div_element) {
		div_element.style.display = 'block';
	}
}
function hide_show_element(element_id)  {
	var div_element = document.getElementById(element_id);
	if (div_element) {
		if (div_element.style.display == 'none') {
			div_element.style.display = 'block';
		}
		else {
			div_element.style.display = 'none';
		}
	}
}
function goto_url(url) {
	window.location.assign(url);
}
function popup(nomefile, larghezza, altezza, x, y)
{
    win_popup = window.open(nomefile, "", "toolbar= 0,location= 0,directories= 0,status= 0,menubar= 0,scrollbars= 0,resizable= 0,marginheight= 0,marginwidth= 1,copyhistory= 0,width=" + (larghezza+30) + ",height=" + (altezza+60));
    x = parseInt(x);
    y = parseInt(y);
    win_popup.moveTo(x, y);
}
function resize_popup(new_width, new_height, doscroll) { //v2.0
	window.resizeTo(new_width,new_height);
}

function select_menu(menu_id, normal_css_class, select_css_class) {
	for (i=0;i<menu_element.length; i++) {
		var div_output = document.getElementById(menu_element[i]); 
		if (div_output) { 
			if (menu_element[i] == menu_id) {
				div_output.className = normal_css_class + ' ' + select_css_class; 
			}
			else {
				div_output.className = normal_css_class; 
			}
		}
	}
}

var menu_element = new Array();

-->

