/*
 * $Id: validation.js,v 1.1 2006/11/08 16:29:07 ksingh Exp $
 *
 * Utility functions for basic client side validation
 */
function checkDateFormat(field) {
    if (!field.value.match(/^\d{2}\/\d{2}\/\d{4}/i)) {
          alert('The date should be in the format MM/DD/YYYY');
          field.select();
          return false;
     }
     return true;
}

function checkIsNumeric(field, errorMessage) {
    if (!field.value.match(/^\d+/i)) {
          alert(errorMessage);
          field.select();
          return false;
     }
     return true;
}