///////////////////////////
//div control
function show_hide_object(obj_id,new_state)
	{
	var new_display_state = new_state ? "block" : "none";
	var obj = document.getElementById(obj_id);
	if (!obj) {obj = document.forms[0][obj_id];}
	
	obj.style.display = new_display_state;
	}

///////////////////////////
//disable control
function disable_enable_object(obj_id,new_state,do_focus)
	{
	var new_disabled_state = new_state ? true : false;
	var obj = document.getElementById(obj_id);
	if (!obj) {obj = document.forms[0][obj_id];}

	obj.disabled = new_disabled_state;

	//change class
	if (obj.type == "text")
		{if (new_disabled_state) {obj.className = "text_field_disabled";}
		else {obj.className = "text_field";}
		}
	
	if (do_focus && !new_disabled_state)
		{obj.focus();}
	}
///////////////////////////
