/**
* @author iioriatti
* @version 1.0
* @class This generic Class build one Html container object 
* @param{HtmlDivElement} par_oHtmlContainer Div Element container of this Sinfo_HtmlContainer.
*/ 
Sinfo_HtmlContainer = function (par_oHtmlContainer)
{
   var oHtmlContainer = document.createElement('div');
      par_oHtmlContainer.appendChild(oHtmlContainer);

   var sClassPrefix = "Sinfo_";

   /**
   * This attribute return the type of the object.
   * @property
   * @type String
   */
   this.type = 'Sinfo_HtmlContainer';
   
   /**
   * This attribute return the HtmlDivElement of the Sinfo_HtmlContainer instance.
   * @property
   * @type HtmlDivElement
   */
   this.Container = oHtmlContainer;

  
   /**
   * <b>display
   * This method provide to hide and display the container
   * @param (String) block = Show the Container 
   *                 none = hide the container.
   */
   /**
   * This method provide to hide and display the container
   * @param {String} par_sValue <b>block = </b>Show the Container; <b>none</b> = hide the container.
   */
   this.display = function (par_sValue)
	     {
            oHtmlContainer.style.display = par_sValue;
	     }
   /**
   * This method provide to write one string in the Container
   * @param {String} par_sText
   * @return
   */
   this.write = function (par_sText)
         {
            oHtmlContainer.innerHTML = par_sText;
	     }

   /**
   * This method return the content of the Container
   * @return {String} 
   */
   this.text = function ()
         {
            return oHtmlContainer.innerHTML;
	     }

   /**
   * This method provide to add one className in the Container "class" attribute.
   * @param {String} par_sClassName New className to add.
   */
   this.addClassName = function (par_sClassName)
         {
            oHtmlContainer.className += " " + sClassPrefix+par_sClassName + " ";         
         }

   /**
   * This method provide to remove one className in the Container "class" attributes.
   * @param {String} par_sClassName className to remove.
   */
   this.removeClassName = function (par_sClassName)
         {
            oHtmlContainer.className = replace(oHtmlContainer.className, " " + sClassPrefix + par_sClassName, ""); 
         }       

   /**
   * This method provide to destroy the object
   */
   this.destroy = function ()
         {
            par_oHtmlContainer.removeChild(oHtmlContainer);
	     }
}

