function isMemberNo(s)
{
var patrn=/^[0-9]{1}(\d){8}$/;
if (!patrn.exec(s)) return false
return true
}

function isEmail (theStr) {
var atIndex = theStr.indexOf('@');
var dotIndex = theStr.indexOf('.', atIndex);
var flag = true;
theSub = theStr.substring(0, dotIndex+1)
if ((atIndex < 1)||(atIndex != theStr.lastIndexOf('@'))||(dotIndex < atIndex + 2)||(theStr.length <= theSub.length)) 
{ return(false); }
else { return(true); }
}

function isDigit(s)
{
var patrn=/^[0-9]{1,20}$/;
if (!patrn.exec(s)) return false
return true
}

function isMobile(s)
{
var patrn=/^[+]{0,1}(\d){1,3}[ ]?([-]?((\d)|[ ]){1,12})+$/;
if (!patrn.exec(s)) return false
return true
}

function isBetween (val, lo, hi) {
if ((val < lo) || (val > hi)) { return(false); }
else { return(true); }
}

function isPostalCode(s)
{
var patrn=/^[1-9]{1}(\d){5}$/;
if (!patrn.exec(s)) return false
return true
}


