// Validate RFP

	function  _CF_checkrfp_form(_CF_this)
    {
        //reset on submit
        _CF_error_exists = false;
        _CF_error_messages = new Array();
        _CF_error_fields = new Object();
        _CF_FirstErrorField = null;

        //form element name required check
        if( !_CF_hasValue(_CF_this['name'], "TEXT", false ) )
        {
            _CF_onError(_CF_this, "name", _CF_this['name'].value, "You must your name.");
            _CF_error_exists = true;
        }

        //form element phone required check
        if( _CF_hasValue(_CF_this['phone'], "TEXT", false ) )
        {
            //form element phone 'TELEPHONE' validation checks
            if (!_CF_checkphone(_CF_this['phone'].value, true))
            {
                _CF_onError(_CF_this, "phone", _CF_this['phone'].value, "You must a valid phone number.");
                _CF_error_exists = true;
            }

        }else {
            _CF_onError(_CF_this, "phone", _CF_this['phone'].value, "You must a valid phone number.");
            _CF_error_exists = true;
        }

        //form element email required check
        if( _CF_hasValue(_CF_this['email'], "TEXT", false ) )
        {
            //form element email 'EMAIL' validation checks
            if (!_CF_checkEmail(_CF_this['email'].value, true))
            {
                _CF_onError(_CF_this, "email", _CF_this['email'].value, "You must a valid email address.");
                _CF_error_exists = true;
            }

        }else {
            _CF_onError(_CF_this, "email", _CF_this['email'].value, "You must a valid email address.");
            _CF_error_exists = true;
        }

        //form element attendees required check
        if( !_CF_hasValue(_CF_this['attendees'], "TEXT", false ) )
        {
            _CF_onError(_CF_this, "attendees", _CF_this['attendees'].value, "You must your total estimated attendees.");
            _CF_error_exists = true;
        }

        //form element rooms required check
        if( !_CF_hasValue(_CF_this['rooms'], "TEXT", false ) )
        {
            _CF_onError(_CF_this, "rooms", _CF_this['rooms'].value, "You must your room needs.");
            _CF_error_exists = true;
        }

        //form element price_from required check
        if( !_CF_hasValue(_CF_this['price_from'], "TEXT", false ) )
        {
            _CF_onError(_CF_this, "price_from", _CF_this['price_from'].value, "You must enter a full price range.");
            _CF_error_exists = true;
        }

        //form element price_to required check
        if( !_CF_hasValue(_CF_this['price_to'], "TEXT", false ) )
        {
            _CF_onError(_CF_this, "price_to", _CF_this['price_to'].value, "You must enter a full price range.");
            _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;
        }
    }
