/*************************************
*** ┌┈┈┈┈┈┈┈┈┈┈┈┈┈┐ ***
*** ┊  Powered By Ma.Hong.Tao  ┊ ***
*** ┊  Last Modify 2007-12-18  ┊ ***
*** └┈┈┈┈┈┈┈┈┈┈┈┈┈┘ ***
*** ┌┈┈┈┈┈┈┈┈┈┈┈┈┈┐ ***
*** ┊mahongtao_2000@hotmail.com┊ ***
*** └┈┈┈┈┈┈┈┈┈┈┈┈┈┘ ***
*************************************/
//返回字符长度
function len(s)
{
	if(s==null)
		return 0;
	else
		return s.replace(/[^\x00-\xff]/g,"**").length;
}
//验证是否是双字节
function isDoubleFont(s)
{
	if(s.search(/[^\x00-\xff]/)!=-1)
		return true;
	else
		return false;
}
//验证合法邮箱
function isEmail(s)
{
	if (s.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1)
		return true;
	else
		return false;
}
//验证整数
function isInt(s)
{
	if(s.search(/^[0-9]+$/)!=-1)
		return true;
	else
		return false;
}
//验证身份证号码
function isIdCard(s)
{
	if((s.search(/^[1-9]([0-9]{16}|[0-9]{13})[xX0-9]$/)!=-1)||(s.length==13))
		return true;
	else
		return false;
}
//验证精度小数
function isDecimal(s)
{
	return !isNaN(s);
}