if (window.ColdFusion) ColdFusion.required['Username']=true;

if (window.ColdFusion) ColdFusion.required['Password']=true;


    _CF_checkloginform = function(_CF_this)
    {
        //reset on submit
        _CF_error_exists = false;
        _CF_error_messages = new Array();
        _CF_error_fields = new Object();
        _CF_FirstErrorField = null;
 
        //form element Username required check
        if( !_CF_hasValue(_CF_this['Username'], "TEXT", false ) )
        {
            _CF_onError(_CF_this, "Username", _CF_this['Username'].value, "Username is required!");
            _CF_error_exists = true;
        }
 
        //form element Password required check
        if( !_CF_hasValue(_CF_this['Password'], "PASSWORD", false ) )
        {
            _CF_onError(_CF_this, "Password", _CF_this['Password'].value, "Password is required!");
            _CF_error_exists = true;
        }
 
 
        //display error messages and return success
        if( _CF_error_exists )
        {
            if( _CF_error_messages.length > 0 )
            {
                // show alert() message
                _CF_onErrorAlert(_CF_error_messages);
                // set focus to first form error, if the field supports js focus().
                if( _CF_this[_CF_FirstErrorField].type == "text" )
                { _CF_this[_CF_FirstErrorField].focus(); }
 
            }
            return false;
        }else {
            return true;
        }
    }
