//FILENAME: JS_Repository/check4number.js//
//-- $Name: Release_7-5 $ --//
//-- $Header: /CVSRepositories/TSI_WebSite/JS_Repository/check4number.js,v 1.5 2009/06/09 21:11:00 TSI Exp $ --//
//=============================================================================================================//
function check4number(inpstr) {
//in inpstr, find at least ONE and ALL numeric digits OR "space" OR "-" to return TRUE.
//this verifies a minimal phone #.
  //alert("Entering check4number().........");
  var inplen = inpstr.length;
  var indx;
  var FwndNumb = false;
  var FwndAlpha =false;
  var result = false;
  var nxtchr;
  for (indx = 0; indx< inplen; indx++) {
    nxtchr =inpstr.charAt(indx);
    //alert("chr=" + nxtchr);
    if (nxtchr >= "0" && nxtchr <= "9" || nxtchr == " " || nxtchr == "-") {
      if(!FwndNumb) {
        if (nxtchr >= "0" && nxtchr <= "9") {
          FwndNumb = true;
        }
      }
    } else {
      FwndAlpha = true;
    }
  }
  if (FwndNumb && !FwndAlpha) {
    result = true;
  }
  //alert("....................check4number() Returning  w/ " + result);
  return result;
} //end of check4number()