function xText()
{
 bg=new Array;
 bg[1]='bg_pole.gif';
 bg[2]='bg_pole_zolte.gif';
 bg[3]='bg_pole_rozowe.gif';
 bg[4]='bg_pole_biale.gif';
 bg[5]='bg_pole_czerwone.gif';
 bColor=new Array;
 bColor[1]='#fff799';
 bColor[2]='#f3e000';
 bColor[3]='#ffcbd2';
 bColor[4]='#f0f0f0';
 bColor[5]='#ff0000';
 tColor=new Array;
 tColor[1]='#000000';
 tColor[2]='#000000';
 tColor[3]='#000000';
 tColor[4]='#787878';
 tColor[5]='#ffffff';
  
 this.textCreate=function(div_id, input_id, width)
 {
  sHTML='<div style="width: '+width+'px; height: 23px; background-color: #959595">';
  sHTML=sHTML+'<div style="position: absolute; margin-left: 1px; margin-top: 1px; width: '+(width-2)+'px; height: 21px; background-image: url('+root+'graph/bg_textarea.gif)">';
  sHTML=sHTML+'<input id="'+input_id+'" type="text" style="margin-left: 3px; margin-top: 3px; width: '+(width-10)+'px; height: 17px" class="xInput" />';
  sHTML=sHTML+'</div>';
  sHTML=sHTML+'</div>';
  document.getElementById(div_id).innerHTML=sHTML;
 };
 
 this.areaCreate=function(div_id, input_id, width, height)
 {
  sHTML='<div style="width: '+width+'px; height: '+height+'px; background-color: #959595">';
  sHTML=sHTML+'<div style="position: absolute; margin-left: 1px; margin-top: 1px; width: '+(width-2)+'px; height: '+(height-2)+'px; background-image: url('+root+'graph/bg_textarea.gif); background-repeat: repeat-x; background-color: #f2f2f2">';
  sHTML=sHTML+'<textarea id="'+input_id+'" style="margin-left: 3px; margin-top: 3px; width: '+(width-7)+'px; height: '+(height-7)+'px; overflow-y: auto" class="xInput"></textarea>';
  sHTML=sHTML+'</div>';
  sHTML=sHTML+'</div>';
  document.getElementById(div_id).innerHTML=sHTML;
 };
 
 this.textColor=function(id, c)
 {
  document.getElementById(id+'_bg').style.backgroundImage='url('+root+'graph/'+bg[c]+')';
  document.getElementById(id).style.color=tColor[c];
  document.getElementById(id+'_bg').style.backgroundColor=bColor[c];
 };
 
 this.textDisable=function(id)
 {
  this.textColor(id, 4);
  document.getElementById(id).disabled='disabled';
 };
 
 this.textEnable=function(id, c)
 {
  if(c<1) c=1;
  this.textColor(id, c);
  document.getElementById(id).disabled='';
 };
}