function focusByID(id) {
	obj=document.getElementById(id);
	obj.focus();
}

function checkUncheckAll(FormName, FieldName, theElement) {
	var objCheckBoxes = document.forms[FormName].elements[FieldName];
	if(!objCheckBoxes)
		return;
	var countCheckBoxes = objCheckBoxes.length;
	if(!countCheckBoxes)
		objCheckBoxes.checked = CheckValue;
	else
		// set the check value for all check boxes
		for(var i = 0; i < countCheckBoxes; i++)
			objCheckBoxes[i].checked = theElement.checked;
}

/**
 * Count the number of lines selected in a menu list.
 * The element is identified by the value passed to it.
 */
function countSelectedElements(menuObject) {
  var list = menuObject;
  var count = 0;
  for (i=0; i<list.length; i++) {
    
    if (list[i].selected) {
      count++;
    }
       
  }
  
    var counter = document.getElementById("clientCount");
    //alert (counter.innerHTML);
    //alert(count);
    counter.innerHTML=count;       
}