/**
* This funtion sets the focus to the specified fieldName of the specified form.
* This function was written to work with JSF style form field names, i.e., EmployeeForm:firstName.
* @param document The current document from the current page.<b> 
* @param formName The name of the form.<b> 
* @param fieldName The name of the field that gets the focus.
*/
function setFocus(document, formName, fieldName) {
  var focusControl = document.forms[formName].elements[formName+":"+fieldName];

  if (focusControl.type != "hidden" && !focusControl.disabled) {
     focusControl.focus();
  }  
}

