<!--
    /*------------------------------------------------------------*/
    /*                    Check Function List                     */
    /*                                                            */
    /*    Create Date        : 2004.05.04                         */
    /*    Creator            : Lee Jong Hee                       */
    /*------------------------------------------------------------*/
    //**************************************************************
    //    Function Name      : Check_Zero()
    //    Description        :
    //    Create Date        : 2004.07.29
    //    Last Modify Date   : 
    //    Creator            : Lee Jong Hee
    //**************************************************************
    function Check_Zero(a_oCtl, a_strErrMsg)
    {
        if(a_oCtl.value == 0)
        {
            a_oCtl.focus();
            alert(a_strErrMsg);
            return false;
        }
        return true;
    }
    
    //**************************************************************
    //    Function Name      : Check_Null()
    //    Description        :
    //    Create Date        : 2004.05.04
    //    Last Modify Date   : 
    //    Creator            : Lee Jong Hee
    //**************************************************************
    function Check_Null(a_oCtl, a_strErrMsg)
    {
        if(a_oCtl.value.length < 1)
        {
            a_oCtl.focus();
            alert(a_strErrMsg);
            return false;
        }
        return true;
    }
    
    function Check_Empty(a_oCtl, a_strErrMsg)
    {
        if(a_oCtl.value.length == 0)
        {
            a_oCtl.focus();
            alert(a_strErrMsg);
            return false;
        }
        return true;
    }
    
    //Check whether string s is empty.
    function isEmpty(a_str)
    {
        return ((a_str == null) || (a_str.length == 0))
    }
    
    // Returns true if character c is a digit 
    // (0 .. 9).
    function isDigit (a_str)
    {
        return ((a_str >= "0") && (a_str <= "9"))
    }

    //**************************************************************
    //    Function Name      : Check_Integer()
    //    Description        :
    //    Create Date        : 2004.05.04
    //    Last Modify Date   : 
    //    Creator            : Lee Jong Hee
    //**************************************************************
    function Check_Integer(a_str, a_strErrMsg)
    {
        var iter;
        ///if (isEmpty(a_oCtl)) 
           ///if (Check_Integer.arguments.length == 1) return defaultEmptyOK;
           ///else return (Check_Integer.arguments[1] == true);
    
        // Search through string's characters one by one
        // until we find a non-numeric character.
        // When we do, return false; if we don't, return true.
    
        for (iter = 0; iter < a_str.length; iter++)
        {   
            // Check that current character is number.
            var c = a_str.charAt(iter);
            
            if (!isDigit(c))
            {
                alert(a_strErrMsg);
                return false;
            }
        }
    
        // All characters are numbers.
        return true;
    }
//-->
