
function change_class(obj_id,set_class) {
	obj_change = document.getElementById(obj_id);
	if(obj_change) {
		obj_change.className = set_class;
	}
}

function replaceAll(look_in,from,to) {
    var idx = look_in.indexOf( from );

    while ( idx > -1 ) {
        look_in = look_in.replace( from, to ); 
        idx = look_in.indexOf( from );
    }

    return look_in;
}

function js4html(orig_str) {
	new_str = replaceAll(orig_str,'"','&quot;');
	return(new_str);
}

function hide_element(element_name) {
  element_obj = $(element_name);
  if(element_obj) {
    element_obj.style.display = 'none';
  }
}

function show_element_inline(element_name) {
  dropdown_obj = $(element_name);
  if(element_obj) {
    element_obj.style.display = 'inline';
  }
}

function show_element_block(element_name) {
  element_obj = $(element_name);
  if(element_obj) {
    element_obj.style.display = 'inline';
  }
}
