/*FILENAME: JS_Repository/check4digit.JS*/
/*-- $Name$ --*/
/*-- $Header: C:/CVSRepositories/TSI_WebSite/JS_Repository/check4digit.js,v 1.2 2007/07/14 16:11:09 Tsi Exp $ --*/
function check4digit(inpstr) {
//in inpstr, find at least ONE and ALL numeric digits to return TRUE.
//alert("Entering check4digit()...................");
  var inplen = inpstr.length;
  var indx;
  var FwndNumb = false;
  var FwndAlpha =false;
  var rtnValue = false;
  var nxtchr;
  for (indx = 0; indx < inplen; indx++) {
    nxtchr =inpstr.charAt(indx);
    if (nxtchr >= "0" && nxtchr <= "9") {
      if(!FwndNumb) {
        if (nxtchr >= "0" && nxtchr <= "9") {
          FwndNumb = true;
        }
      }
    } else {
      FwndAlpha = true;
    }
  }
  if (FwndNumb && !FwndAlpha) {
    rtnValue = true;
  }
  //alert("check4digit() Exiting..........w/ " + rtnValue);
  return rtnValue;
} //end of check4digit()
