function edt_textselectid_list_onchange( sel_elm, sel_w_small, txt_id, txt_w_big ) {
	var idx = sel_elm.selectedIndex;
	if (idx) {
		var val = sel_elm.options[idx].value;
		var txt_elm = document.getElementById( txt_id );
		if (val == 'other') { // altro
			txt_elm.style.visibility='visible';
			txt_elm.style.width = txt_w_big+'px';
			sel_elm.style.width = sel_w_small+'px';
		} else {
			txt_elm.style.visibility='hidden';
			txt_elm.style.width = '10px';
			sel_elm.style.width = 'auto';
		}
	}
}


function edt_show_edb( div_id, show ) {
	var elm = document.getElementById( div_id );
	if (show) {
		elm.style.visibility = 'visible';
		if (elm.edt_div_icon_timeout_id) {
			clearTimeout(elm.edt_div_icon_timeout_id);
			elm.edt_div_icon_timeout_id = 0;
		}
	} else {
//		elm.style.visibility = 'hidden';
		elm.edt_div_icon_timeout_id = setTimeout( 'edt_div_icon_timeout("'+div_id+'")', 200 );
	}
	return null;
}
function edt_div_icon_timeout( div_id ) {
	var elm = document.getElementById( div_id );
	elm.style.visibility = 'hidden';
}



function edt_select_onchange_hide( elm_sel, st_divs, arr ) {
	// in st_divs nomi degli elementi da visualizzare/nascondere == 'div1,div2,div3'
	// in arr == Array('10','div1,div2','20','','30','div2,div3') val + elementi da nascondere
	var divs=st_divs.split(',');
	for (var i=0; i<divs.length; i++) {
		var elm = document.getElementById( divs[i] );
		elm.style.display = 'block';
	}
	var idx = elm_sel.selectedIndex;
	var arr_hide = null;
	var val = elm_sel.options[idx].value;
	var found = false;
	for (var i=0; i<arr.length; i+=2) {
		if (arr[i]==val) {
			found = true;
			if (arr[i+1])
				arr_hide=arr[i+1].split(',');
			break;
		}
	}
	if (!found) { // nessun valore selezionato, nascondo tutto
		arr_hide = Array();
		for (var i=0; i<divs.length; i++)
			arr_hide.push(divs[i]);
	}
	for (var i=0; i<divs.length; i++) {
		var display='block';
		if (arr_hide) {
			for (var ih=0; ih<arr_hide.length; ih++) {
				if (arr_hide[ih] == divs[i]) {
					display = 'none';
					break;
				}
			}
		}
		var elm = document.getElementById( divs[i] );
		elm.style.display = display;
	}
}


