/*FILENAME: JS_Repository/check4number.JS*/
/*-- $Name$ --*/
/*-- $Header: C:/CVSRepositories/TSI_WebSite/JS_Repository/check4number.js,v 1.4 2007/07/14 16:11:09 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()... W/--|" + inpstr + "|--");
  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()
