function fw_text(id)
{
  this.elem = document.getElementById(id);
  if (!this.elem)
  {
    alert("unable to find text instance " + id);
  }
}

fw_text.prototype.get_id = function()
{
  return this.elem.getAttribute("id");
}

fw_text.prototype.is_enabled = function() 
{
  return eval(this.elem.getAttribute("iw_enabled"));
}

fw_text.prototype.set_enabled = function(enabled)
{
  if (enabled == this.is_enabled()) 
  {
    return;
  }

  this.elem.setAttribute("iw_enabled", enabled);
  this.elem.setAttribute(fwIsIE ? "className" : "class", 
                         this.elem.getAttribute(enabled ? "iw_cssE" : "iw_cssD"));
  if (!enabled)
  {
    this.elem.setAttribute("readOnly", true);
    this.elem.setAttribute("disabled", true);
  }
  else
  {
    this.elem.removeAttribute("readOnly");
    this.elem.removeAttribute("disabled");
  }
}
