﻿	function showBusyLayer() {
		var busyLayer = document.getElementById("busy_layer")
		if (busyLayer != null) {
			busyLayer.style.visibility = "visible";
			// Would be nicer to have something like window.height, but that does not work with all browsers. 
			busyLayer.style.height = "607";
			
			//window.setTimeout("hideBusyLayer()", 3000);
		}
	}
	
	function hideBusyLayer() {
		var busyLayer = document.getElementById("busy_layer")
		if (busyLayer != null) {
			busyLayer.style.visibility = "hidden";
			busyLayer.style.height = "0px";
		}
	}
	
	//showBusyLayer();
	//window.onload=hideBusyLayer;
  

  lastLen = 0;
  function checkLength(widget, maxLength, counterId)
  /**
   * Check the the content's length of the given widget, using a given maximum
   * length and a given counter to display the number of remaining characters.
   */  
  

  {
    len = widget.value.length;
/*
    if (len == lastLen)
      return;

    if (len > maxLength)
    {
      widget.value = widget.value.substring(0, maxLength);

      count = 0;
    }
    else*/
      count = maxLength - len;

    document.getElementById(counterId).innerHTML = count;

    lastLen = len;
  }
