//------------------------- Check Function For 後面的字元 --------------------------//START
    //--------------------- English -----------------------------------------//START
    function RADIO_prefix(item_value)
    {
        if(document.getElementById('prefix_hidden'))
        {
            document.getElementById('prefix_hidden').value = item_value;
            //document.getElementById('prefix').checked = true;
        }//end of if(document.all.prefix_hidden)
        else
        {
            return true;
        }//end of if(document.all.prefix_hidden) else
    }//end of function RADIO_prefix()
    
    function chkhiddenForLabel(ObjNm,text_prefix,text_description,text_postfix,obj2)
    {
        if(obj2)
        {
            obj2.innerHTML = "";
        }//end of if(obj2)
        if(ObjNm)
        {
            if (ObjNm.value=="" || ObjNm.value=="undefined" )
            {
                if(obj2)
                {
                    obj2.innerHTML = text_prefix + text_description + text_postfix;
                }//end of if(obj2)
                return false;
            }//end of if (ObjNm.value=="" || ObjNm.value=="undefined")
            else
            {
                return true;
            }//end of if (ObjNm.value=="" || ObjNm.value=="undefined") else
        }//end of if(ObjNm)
    }//end of function chkhiddenForLabel(ObjNm,text_prefix,text_description,text_postfix,obj2)

    function chkForLabel(ObjNm,text_prefix,text_description,text_postfix,obj2)
    {
        if(obj2)
        {
            obj2.innerHTML = "";
        }//end of if(obj2)
        if(ObjNm)
        {
            if (ObjNm.value=="" || ObjNm.value.length==0)
            {
                if(obj2)
                {
                    obj2.innerHTML = text_prefix + text_description + text_postfix;
                }//end of if(obj2)
                return false;
            }//end of if (ObjNm.value=="" || ObjNm.value.length==0)
            else
            {
                return true;
            }//end of if (ObjNm.value=="" || ObjNm.value.length==0) else
        }//end of if(ObjNm)
    }//end of function chkForLabel(ObjNm,text_prefix,text_description,text_postfix,obj2)

    //check email
    function chkeForLabel(ObjNm,text_prefix,text_description,text_postfix,obj2)
    {
        var a=0,b=0
        if(obj2)
        {
            obj2.innerHTML = "";
        }//end of if(obj2)
        for (i=0;i<ObjNm.value.length;i++)
        {
            if (ObjNm.value.substring(i,i+1)=='@')
            {
                a++;
            }
            if (ObjNm.value.substring(i,i+1)=='.')
            {
                b++;
            }
        }
        if (ObjNm.value.length == 0)
        {
            return true;
        }
        if (!(a=1 && b>0 && ObjNm.value.length>6))
        {
            if(obj2)
            {
                obj2.innerHTML = text_prefix + text_description + text_postfix;
            }//end of if(obj2)
            return false;
        } 
        else 
        {
            return true;
        }
    }//end of function chkeForLabel(ObjNm,text_prefix,text_postfix,obj2)
    
    function chkselect(chkObj,error_message,displayObj)
    {
  		displayObj.innerHTML=""
      if(chkObj.value=="-1" || chkObj.value==-1)
      {
          displayObj.innerHTML=error_message;
          return false;
      }//end of if(chkObj.value=="-1" || chkObj.value==-1)
      else
      {
          return true;
      }//end of if(chkObj.value=="-1" || chkObj.value==-1)
    }
    //--------------------- English -----------------------------------------//END
	//-------------------------------------------------------------//
    //  Name     : chk_email_char()
    //  Function : to sure the input is safe 
    //  Modifty  : Wallace,LSky
    //-------------------------------------------------------------//
    function chk_email_char(e)
    {
        var str = window.event ? e.keyCode : e.which;
        if(48 <= str && 57 >= str) // digitel
        {
            return true;
        }//end of if(48 <= str && 57 >= str)
        else
        {
            if(97 <= str && 122 >= str)  //a-z
            {
                return true;
            }//end of if(97 <= str && 122 >= str)
            else
            {
                if(65 <= str && 90 >= str)   //A-Z
                {
                    return true;
                }//end of if(65 <= str && 90 >= str)
                else
                {
                    if(42 <= str && 47 >= str)   //加減乘除
                    {
                        return true;
                    }//end of if(42 <= str && 44 >= str)
                    else
                    {
                        switch(str)
                        {
                            //case 39://'
                            //case 32://[space]
                            //case 47:///
                            //    return true;
                            //case 34://"
                            //case 91://[
                            //case 93://]
                            //case 123://{
                            //case 125://}
                            //case 40://(
                            //case 41://)
                            //case 60://<
                            //case 62://>
                            case 64://@
                                return true;
                                break;
                            case 35://#
                            case 124://|
                            case 33://!
                            case 63://?
                            case 59://;
                            case 58://:
                            case 61://=
                            case 37://%
                            case 38://&
                                return false;
                                break;
                            case 46://.
                                return true;
                                break;
                            case 44://,
                                return false;
                                break;
                            case 95://_
                            case 13://
                                return true;
                                break;
                            default:
                                return false;
                                break;
                        }//end of switch(str)
                    }//end of if(42 <= str && 44 >= str) else
                }//end of if(65 <= str && 90 >= str) else
            }//end of if(97 <= str && 122 >= str) else
            return false;
        }//end of if(48 <= str && 57 >= str) else
    }//end of function chk_email_char()
	//-------------------------------------------------------------//
    //  Name     : chk_char()
    //  Function : to sure the input is safe 
    //  Modifty  : Wallace,LSky
    //-------------------------------------------------------------//
    function chk_char(e)
    {
        var str = window.event ? e.keyCode : e.which;
        if(48 <= str && 57 >= str) // digitel
        {
            return true;
        }//end of if(48 <= str && 57 >= str)
        else
        {
            if(97 <= str && 122 >= str)  //a-z
            {
                return true;
            }//end of if(97 <= str && 122 >= str)
            else
            {
                if(65 <= str && 90 >= str)   //A-Z
                {
                    return true;
                }//end of if(65 <= str && 90 >= str)
                else
                {
                    if(42 <= str && 47 >= str)   //加減乘除
                    {
                        return true;
                    }//end of if(42 <= str && 44 >= str)
                    else
                    {
                        switch(str)
                        {
                            case 39://'
                                return false;
                                break;
                            case 32://[space]
                            //case 47:///
                            //    return true;
                            //case 34://"
                            case 91://[
                            case 93://]
                            case 123://{
                            case 125://}
                            case 40://(
                            case 41://)
                            case 60://<
                            case 62://>
                            case 64://@
                            case 35://#
                            case 124://|
                            case 33://!
                            case 63://?
                            case 59://;
                            case 58://:
                            case 61://=
                            case 37://%
                            case 38://&
                            case 46://.
                            case 44://,
                            case 95://_
                            case 13://
                                return true;
                                break;
                            default:
                                return false;
                                break;
                        }//end of switch(str)
                    }//end of if(42 <= str && 44 >= str) else
                }//end of if(65 <= str && 90 >= str) else
            }//end of if(97 <= str && 122 >= str) else
            return false;
        }//end of if(48 <= str && 57 >= str) else
    }//end of function chk_char()
    //-------------------------------------------------------------//
    //  Name     : chk_char_email()
    //  Function : to sure the input is safe 
    //  Modifty  : Wallace,LSky
    //-------------------------------------------------------------//
    function chk_char_email(e)
    {
        var str = window.event ? e.keyCode : e.which;
        if(48 <= str && 57 >= str) // digitel
        {
            return true;
        }//end of if(48 <= str && 57 >= str)
        else
        {
            if(97 <= str && 122 >= str)  //a-z
            {
                return true;
            }//end of if(97 <= str && 122 >= str)
            else
            {
                if(65 <= str && 90 >= str)   //A-Z
                {
                    return true;
                }//end of if(65 <= str && 90 >= str)
                else
                {
                    if(42 <= str && 44 >= str)   //加減乘除
                    {
                        return true;
                    }//end of if(42 <= str && 44 >= str)
                    else
                    {
                        switch(str)
                        {
                            case 64://@
                            case 44://,
                            case 95://_
                            case 46://.
                                return true;
                                break;
                            case 47:///
                            case 91://[
                            case 93://]
                            case 123://{
                            case 125://}
                            case 40://(
                            case 41://)
                            case 60://<
                            case 62://>
                            case 32://[space]
                            case 35://#
                            case 124://|
                            case 33://!
                            case 63://?
                            case 59://;
                            case 58://:
                            case 61://=
                            case 39://'
                            case 34://"
                            //case 37://%
                            case 38://&
                                return false;
                                break;
                            case 13://
                                return true;
                                break;
                            default:
                                return false;
                                break;
                        }//end of switch(str)
                    }//end of if(42 <= str && 44 >= str) else
                }//end of if(65 <= str && 90 >= str) else
            }//end of if(97 <= str && 122 >= str) else
            return false;
        }//end of if(48 <= str && 57 >= str) else
    }//end of function chk_char_email()
    //-------------------------------------------------------------//
    //  Name     : chk_int()
    //  Function : to sure the input is safe 
    //  Modifty  : Wallace,LSky
    //-------------------------------------------------------------//
    function chk_int(e)
    {
        var str = window.event ? e.keyCode : e.which;
        if(48 <= str && 57 >= str) // digitel
        {
            return true;
        }//end of if(48 <= str && 57 >= str)
        else
        {
            switch(str)
            {
                case 45:
                case 43:
                case 32:
                case 95:
                case 101:
                case 120:
                case 116:
                case 69:
                case 88:
                case 84:
                    return true;
                    break;
                default:
                    return false;
                    break;
            }//end of switch(str)
        }//end of if(48 <= str && 57 >= str) else
        return false;
    }//end of function chk_int()
    
    function check_radio(obj){
      for(i = 0;i < obj.length;i++){
        if(obj[i].checked)
          return true;
      }
      return false;
    }
//------------------------- Check Function For 後面的字元 --------------------------//END

