function TextCheck(str){
  if(str.length == 0)
    return false;
  var pattern = /^[a-zA-Z0-9_]*$/;
  return pattern.test(str);
}
function CnCheck(str){
  if(str.length == 0)
    return false;
  var pattern = /^[^\$\^&\|\\'\",?<>]+$/;
  return pattern.test(str);
}
function IsValidPhone(s){
  if(s.length == 0)
    return false;
  var pattern = /^[0-9]{3,4}\-[0-9]{3,8}(\-[0-9]{3,4})?$/;
  return pattern.test(s);
}
function IsValidMobile(s){
  if(s.length == 0)
    return false;
    var pattern = /^1[0-9]{10}$/;
  return pattern.test(s);
}
function truelength(s){
  var length = 0;
  var s = s.split("");
  for(i=0;i<s.length;i++){
    if(s[i].charCodeAt(0) < 299)
      length ++;
    else
      length += 2;}
  return length;
}
function IsValidEmail(strMail){
  if(strMail.length == 0)
    return false;
  var pattern = /^[0-9a-zA-Z]+[0-9a-zA-Z-_]+[\.0-9a-zA-Z-_]*@[0-9a-zA-Z]+((\.|-)[0-9a-zA-Z]+)*\.[a-zA-Z]+$/;
  return pattern.test(strMail);
}
function is_zipcode(strzip)
{
  if (strzip.length == 0)
   return false;
   var pattern =/^[1-9]\d{5}$/;
   return pattern.test(strzip); 
}
//ÓÊÕþ±àÂëÔÊÐíÎª¿ÕÊ±
function is_zipcode22(strzip)
{
  var pattern =/^[1-9]\d{5}$/;
  if (strzip.length > 0)
	return pattern.test(strzip); 
}
