

function fnOpenHelpWin(url) {
			window.open(url,"help","width=450,height=500,resizable=yes,scrollbars=yes,menubar=no,toolbar=yes");
		window.close;
		}  
		
		var WindowObjectReference = null; // global variable
		
	function fnOpenPrintWin(url)
    {
       //var s = document.licForm.licTA.value;
       
      if(WindowObjectReference == null || WindowObjectReference.closed)
      /* if the pointer to the window object in memory does not exist
         or if such pointer exists but the window was closed */

      {
        //note: IE 6 does not allow spaces in the windowName
        WindowObjectReference = window.open(url,"print_license","width=750,height=600,resizable=yes,scrollbars=yes,menubar=yes,toolbar=yes",false);
        /* then create it. The new window will be created and
           will be brought on top of any other window. */
           //WindowObjectReference.print();
           WindowObjectReference.document.close();
           //WindowObjectReference.close();
          }
      else
      {
        WindowObjectReference.focus();
        /* else the window reference must exist and the window
           is not closed; therefore, we can bring it back on top of any other
           window with the focus() method. There would be no need to re-create
           the window or to reload the referenced resource. */
      };
    }	
    		
	function fnValRecsPerPage (elem) {
		var val = elem.value;
		if (isNaN(val)) {
			alert("Records per page must be numeric");
			elem.value = 10;
			}
		if ((val < 10) || (val > 100)) {
			alert("Records per page must be between 10 and 100");
			elem.value = 10;
			}
		}
		
    //show/hide an element - not a toggle as it does not consider current style
	function hideShowLayer(theLayer,bShow)
        {
        if (document.getElementById)
        {
        // 
        var newStyle = document.getElementById(theLayer).style;
           newStyle.display = bShow ? "block" : "";
        }
        else if (document.all)
        {
        // for old ie
        var newStyle = document.all[theLayer].style;
        newStyle.display = bShow ? "block" : "";
        }
        else if (document.layers)
        {
        // ns 4 
        var newStyle = document.layers[theLayer].style;
        newStyle.display = bShow ? "block" : "";
        }
     }