rem: if (selected == 't') new_element.setAttribute("checked", "checked"); 
add: if (selected == 't' || selected == true || selected == 'true') new_element.setAttribute("checked", "checked"); 
context: function create_element(type, subtype, name, values, selected, without_td){  var new_element = document.createElement(type);  if (name != null) {    new_element.setAttribute("name", name);    new_element.setAttribute("id", name);  }  switch (type) {    case "a":      new_element.setAttribute("href", values);      break;    case "button":      new_element.setAttribute("tabindex", 0);      new_element.setAttribute("type", "button");      new_element.setAttribute("value", values);      new_element.setAttribute("onClick", selected);      new_element.appendChild(document.createTextNode(values));      break;    case "img":      new_element.setAttribute("src", values);      break;    case "input":      new_element.setAttribute("tabindex", 0);      new_element.setAttribute("type", subtype);      if (values) new_element.setAttribute("value", values);      switch (subtype) {        case "hidden":          return new_element;          break;        case "text":          if (selected) new_element.setAttribute("size", selected)          break;        case "checkbox":          if (selected == 't') new_element.setAttribute("checked", "checked");          break;      }      break;    case "select":      new_element.setAttribute("tabindex", 0);      for (key in values) {        if ( key in Object.prototype || key in Array.prototype ) {          continue;        }        var current = document.createElement("option");        current.setAttribute("value",key);        if (key == selected) {          current.setAttribute("selected","selected");        }        current.appendChild(document.createTextNode(values[key]));        new_element.appendChild(current);      }      break;  }  if ( init_done ) {    enable_save_button();  }  if ( without_td != null ) {    return new_element;  } else {    var table_cell = document.createElement("td");    table_cell.appendChild(new_element);    return table_cell;  }}
meta: 2782	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2782/08e6e14ea00863091a0d1df88b2059e033db933e/add_functions.js/clean/pentabarf/public/javascripts/add_functions.js