<!--
  /**************************************************************************
  * Author: BYW 
  * Created On: 08/07/2007
  * Description: Surrounds an element in a box border and attaches a label on 
  * the upper-left corner
  * of the box.
  *                 - <Label> ---------
  *                 |                 |
  *                 |                 |
  *                 |   <HTML GUI>    |
  *                 |                 |
  *                 -------------------
  */
  
  /**
	*	MAIN FUNCTION
	* @param anElement - Container object element (i.e. DIV, TABLE) to be surrounded by a box.
	* @param aLabel - String to be displayed on the upper-left corner of the box.
	*/
   function createBox(anElement, aLabel, aBackground) {                  
    var divLabel = createDivLabel(aLabel);
		anElement.style.border = '1px solid #000000';
	if(aBackground) {
		divLabel.style.backgroundColor = aBackground;
	}

    if(anElement.firstChild) {
      anElement.insertBefore(divLabel, anElement.firstChild);
    } else {
      anElement.appendChild(divLabel);
    }  
  }
  
  function createDivLabel(aLabel) {
  	var divLabel = document.createElement('div');
  	
    divLabel.innerHTML = aLabel;
    divLabel.style.position = 'absolute';
    divLabel.style.top = '-7px';
    divLabel.style.left = '5px';
    divLabel.style.backgroundColor = '#FFFFFF';  
    divLabel.className = 'BoxLabel';
    
    return divLabel;    
  }
  function createBox2(anElement, aLabel, aBgColor) {                  
    var divLabel = createDivLabel2(aLabel, aBgColor);
    
		anElement.style.border = '1px solid #000000';

    if(anElement.firstChild) {
      anElement.insertBefore(divLabel, anElement.firstChild);
    } else {
      anElement.appendChild(divLabel);
    }
  }
  
  function createDivLabel2(aLabel, aBgColor) {
  	var divLabel = document.createElement('div');
  	
    divLabel.innerHTML = aLabel;
    divLabel.style.position = 'absolute';
    divLabel.style.top = '-8px';
    divLabel.style.left = '27px';
    divLabel.style.backgroundColor = aBgColor;
    divLabel.style.padding = '0px, 0px, 0px, 0px';    
    divLabel.className = 'LabelRequiredBlack';
    
    return divLabel;    
  }
-->
