function validateRequiredField(fieldID, labelID) {
  var field = getElementByIdBrowserSafe(field);
  var text = getElementByIdBrowserSafe(label);

  if(field.value == null || field.value == "") {
    text.style.color = red;
    return false;
  }
  
  return true;
}

function getElementByIdBrowserSafe(id) {
  if (document.getElementById) {
    // This is the way the standards work.
    return document.getElementById(id);
  }
  else if (document.all) {
    // This is the way old msie versions work.
    return document.all[id];
  }
  else if (document.layers) {
    // This is the way nn4 works.
    return document.layers[id];
  }
}
