
  function Block(barElement)
  {
     if(typeof barElement == 'string')
       this.bar = document.getElementById(barElement);
     else if(typeof barElement == 'Object')
       this.bar = barElement;
     else
       this.bar = document.getElementById("bar");
     
     this.show = function()
     {
       if(this.bar) this.bar.style.display = "block";
     };
     
     this.hide = function()
     {
       if(this.bar) this.bar.style.display = "none";
     };
  }

  function InlineBlock(barElement)
  {
     Block.apply(this, arguments);
     
     this.show = function()
     {
       if(this.bar) this.bar.style.display = "inline";
     };
  }
  
  function FileBar(barElement, fileElement, fileNameBar)
  {
     if(typeof barElement == 'string')
       this.bar = document.getElementById(barElement);
     else if(typeof barElement == 'Object')
       this.bar = barElement;
     else
       this.bar = document.getElementById("bar");

     if(typeof fileElement == 'string')
       this.file = document.getElementById(fileElement);
     else if(typeof fileElement == 'Object')
       this.file = fileElement;
     else
       this.file = document.getElementById("file");

     if(fileNameBar)
       this.fileNameBar = fileNameBar;
     
     this.show = function()
     {
       if(this.bar) this.bar.style.display = "block";
     };
     
     this.hide = function()
     {
       if(this.bar) this.bar.style.display = "none";
     };

     this.disable = function()
     {
       if(this.file)
        {
         this.hide();
         if(this.fileNameBar) this.fileNameBar.show(this.file.value);
        }
     };

     this.enable = function()
     {
       this.show();
       if(this.fileNameBar) this.fileNameBar.hide();
     };
  }

  function InfoBar(barElement, textElement)
  {
     if(typeof barElement == 'string')
       this.bar = document.getElementById(barElement);
     else if(typeof barElement == 'Object')
       this.bar = barElement;
     else
       this.bar = document.getElementById("info_bar");
     
     if(typeof textElement == 'string')
       this.textBlock = document.getElementById(textElement);
     else if(typeof textElement == 'Object')
       this.textBlock = textElement;
     else
       this.textBlock = this.bar;
     
     this.show = function(text)
     {
       if(this.bar) this.bar.style.display = "block";
       if(text) this.putText(text);
     };
     
     this.hide = function()
     {
       if(this.bar) this.bar.style.display = "none";
     };

     this.putText = function(text)
     {
       if(this.textBlock) this.textBlock.innerHTML = text;
     };
  }


