function check_email1 ( email )
{
var len = email.length;
if(len==0)
return "Your contact mailbox choice spare email, therefore the spare email may not the 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 electronic mail address only can be the numeral, English letter \n and '-', mark and so on '_', other marks all cannot use!\n";
}
if((email.indexOf("@")==-1)||(email.indexOf("@")==0)||(email.indexOf("@")==(len-1)))
return "Your electronic mail address is illegal !\n";
if((email.indexOf("@")!=-1)&&(email.substring(email.indexOf("@")+1,len).indexOf("@")!=-1))
return "Your electronic mail address is illegal !\n";
if((email.indexOf(".")==-1)||(email.indexOf(".")==0)||(email.lastIndexOf(".")==(len-1)))
return "Your electronic mail address incompletely !\n";
return "";
}

function check_null ( column, name )
{
if( column.length == 0 )
return name + " Cannot be the blank !\n";
return "";
}
function check_check ( column, name )
{
if( name == true )
return name + " Was already redundant, please choose another group of material number !\n";
return "";
}
function check_select ( select, name )
{
	if(select.value == -1)
		return name + " Must choose !\n";
	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 ("Password Cannot be the blank !\n");
}
for( var idx = 0 ; idx <pw1.length ; idx++ ) {
	if( pw1.charAt(idx) == ' ' || pw1.charAt(idx) == '\"' ) {
		return ("The password may not include the blank or the double quote !\n");
	}
	if(!((pw1.charAt(idx) >= "a" && pw1.charAt(idx) <= "z")||(pw1.charAt(idx) >= "0" && pw1.charAt(idx) <= "9"))){
        return "Please input limits with English, the digital combination password!\n";
    }
}	
if( pw1.length < 6 || pw1.length > 12 )
return( "The password length can only 6 to 12 letters !\n" );
if( pw1 != pw2 )
return("The password two inputs are dissimilar, please resume load! \ n");
return "";
}
function check_nan( num ,name )
{
	if( Math.round( new Number(num) ) < 1 ) 
		return name + "Cannot establish is smaller than 1!\n";
	else
		return "";
}

function check_number_YN( number , name )
{
var error = false;
if( number.length <= 0 )
return name + "Cannot be the 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 + "Can only be the digit, other marks cannot use !\n";
else
return "";
}

function check_mobilephone ( number )
{
var error = false;
if( number.length <= 0 )
return "Your mobile phone has not filled in !\n";
if( number.length >= 24 )
return "Your mobile phone has the question !\n";
for( idx = 0 ; idx <number.length ; idx++ ) {
if( !( number.charAt(idx)>= '0' && number.charAt(idx) <= '9' ) && number.charAt(idx)!='-' && number.charAt(idx)!='+' ) {
error = true;
break;
}
}

if( error == true )
return "Your mobile phone can only be a digit, other marks cannot use !\n";
else
return "";
}

<!-- 欄位驗證長度不得少於6字元及超過10字元，且只限英文、數字，不能包含有空白或雙引號 -->
function check_account ( account, min_length, word_length, name )
{
	<!--參數1:欄位值,如:document.all.member_id.value; 參數2:欄位最小長度; 參數3:欄位限制的長度; 參數4:顯示訊息的名稱,如:"帳號"-->
	if( account == '' ) 
	{
		return (name + "Cannot be the blank !\n");
	}
	
	for( var idx = 0 ; idx <account.length ; idx++ ) 
	{
		if( account.charAt(idx) == ' ' || account.charAt(idx) == '\"' ) 
		{
			return ( name + "May not include the blank or the double quote !\n");
		}
		if(!((account.charAt(idx) >= "a" && account.charAt(idx) <= "z")||(account.charAt(idx) >= "0" && account.charAt(idx) <= "9")))
		{
			return "Please input limits with English, the digital combination " + name + "!\n";
    	}
	}	
	if( account.length > word_length )
		return( name + "The length cannot surpass " + word_length + "Character !\n" );
		
	if( account.length < min_length )
		return( name + "The length cannot be short in " + min_length + "Character !\n" );

	return "";
}