function check_email1 ( email )
{
var len = email.length;
if(len==0)
return "Your e-mail address can not be a blank!\n";
for(var i=0;i<len;i++)
{ var c= email.charAt(i);
if(!((c>="A"&&c<="Z")||(c>="a"&&c<="z")||(c>="0"&&c<="9")||(c=="-")||(c=="_")||(c==".")||(c=="@")))
return "Your e-mail address is the only figure in English letters and symbols'-','_' and other symbols are not used !\n";
}
if((email.indexOf("@")==-1)||(email.indexOf("@")==0)||(email.indexOf("@")==(len-1)))
return "Your e-mail address incomplete !\n";
if((email.indexOf("@")!=-1)&&(email.substring(email.indexOf("@")+1,len).indexOf("@")!=-1))
return "Your e-mail address incomplete !\n";
if((email.indexOf(".")==-1)||(email.indexOf(".")==0)||(email.lastIndexOf(".")==(len-1)))
return "Your e-mail address incomplete !\n";
return "";
}

function check_null ( column, name )
{
if( column.length == 0 )
return name + " can not be a blank !\n";
return "";
}
function check_select ( select, name )
{
if( select.options[0].selected == true )
return name + " must choose !\n";
return "";
}
function check_radio ( radio, name )
{
var error = true;
for( i=0; i <radio.length; i++ )
if( radio[i].checked == true ) {
error = false;
break;
}
if( error == true )
return name + "must choose !\n";
return "";
}
function check_passwd ( pw1, pw2 )
{
if( pw1 == '' ) {
return ("密码不可以空白!\n");
}
for( var idx = 0 ; idx <pw1.length ; idx++ ) {
	if( pw1.charAt(idx) == ' ' || pw1.charAt(idx) == '\"' ) {
		return ("密码不可以含有空白或双引号!\n");
	}
	if(!((pw1.charAt(idx) >= "a" && pw1.charAt(idx) <= "z")||(pw1.charAt(idx) >= "0" && pw1.charAt(idx) <= "9"))){
        return "请输入限用英文，数字组合的密码!\n";
    }
}	
if( pw1.length < 6 || pw1.length > 12 )
return( "密码长度只能 6 到 12 个字母!\n" );
if( pw1 != pw2 )
return("密码二次输入不一样,请重新输入!\n");
return "";
}
function check_nan( num ,name )
{
	if( Math.round( new Number(num) ) < 1 ) 
		return name + "不能设定小于1!\n";
	else
		return "";
}

function check_number_YN( number , name )
{
var error = false;
if( number.length <= 0 )
return name + "Not a blank !\n";
for( idx = 0 ; idx <number.length ; idx++ ) {
if( !( number.charAt(idx)>= '0' && number.charAt(idx) <= '9' ) ) {
error = true;
break;
}
}

if( error == true )
return name + "Only figures, the other symbols are not used !\n";
else
return "";
}