function onload4cache(CSRF_stop) {

    if ( -1 == window.location.search.indexOf('usrcch=') ) {

        JsHttpRequest.query(

            '/users/ajax_is_auth.php',

            {
                'CSRF_stop': CSRF_stop
            },

            function(result, errors) {
                if ( result ) {

                    if (
                        result['intIsUbcEnbl']
                    &&
                        result['boolIsAuth']
                    &&
                        result['usrcch'] != ''
                    ) {

                        var newHref = window.location.href;

                        if (
                            -1 == window.location.href.indexOf('?')
                        ) {
                            if (
                                'jobcast.com.ua' == window.location.href.substr(-14)
                            ) {
                                newHref += '/';
                            } // if
                            newHref += ('?usrcch=' + result['usrcch']);
                        } // if
                        else {
                            newHref += ('&usrcch=' + result['usrcch']);
                        } // else

                        JsHttpRequest.query(

                            '/users/ajax_redirect_log.php',

                            {
                            },

                            function(result, errors) {
                            },

                            true

                        );

                        location.replace(newHref);

                    } // if
                } // if
            },

            true

        );

    } // if

} // function

