// checks an entry against a parallel, duplicate entry to
// confirm that correct data has been entered
// Parallel field name must be the main field name plus "_xcfm"
function isConfirmed() {
   var inputStr = gField.value;
   // flag for whether field under test is primary (true) or confirmation field
   var primary = (gField.name.indexOf("_xcfm") == -1);
   if (primary) {
      // clear the confirmation field if primary field is changed
      var xcfmField =  window.frames[gFrame.name].document.forms[0].elements[gField.name + "_ xcfm"];
      var xcfmValue = xcfmField.value;
      if (inputStr != xcfmValue) {
         xcfmField.value = "";
         return true;
      }
   } else {
      var xcfmField = window.frames[gFrame.name].document.forms[0].elements[gField.name.substring(0,(gField.name.length-5))];
      var xcfmValue = xcfmField.value;
      if (inputStr != xcfmValue) {
         alert("The main and confirmation entry field contents do not match. Both fields must have EXACTLY the same content to be accepted by the database.");
         gField.focus();
         gField.select();
         return false;
      }
   }
   return true;
}
