// findString -- Looks for a sub-string within another longer string
//
// Returns -1 if no match; returns the index of the beginning of the
//  substring within the longer string otherwise
//
// Arguments:
//            targetS - the string to be matched
//            fullS   - the string to be searched for the match
//
// V1.0   11 Oct 1999   Initial release
//
// William K. Walker
// wkwalker@nvdi.com
//
function findString(targetS,fullS)
{
  var imax;
  imax = fullS.length-targetS.length+1
  if (imax < 1) return -1;

  for (var i=0; i<imax; i++)
  {
    if (fullS.substring(i, i+targetS.length) == targetS) return i;
  }
    return -1;
}


