// $Revision: 3870 $

function TWriter(id, zIndex)
{
  if(id == undefined || zIndex == undefined)
  {
    alert("TWriter(id, zIndex): exception - id == undefined || zIndex == undefined");
    return;
  }

  this.ID = id;
  this.ZIndex = zIndex;
  this.GenerateDiv = GenerateDiv;
  this.Write = write;
  this.Clear = Clear;
  this.Show = Show;
  this.Hide = Hide;
  
  this.GenerateDiv();
  
  function GenerateDiv()
  {
    Write("<div id=\'" + this.ID + "\' style=\'z-index: " + this.ZIndex + "\'>" + "</div>");
  }
  
  function write(str)
  {
    document.getElementById(this.ID).innerHTML += str;
  }
  
  function Clear()
  {
    document.getElementById(this.ID).innerHTML = "";
  }
  
  function Show()
  {
    document.getElementById(this.ID).style.display = "";
  }
  
  function Hide()
  {
    document.getElementById(this.ID).style.display = "none";
  }  
}