AuthorUtils = {
    getHttpParam: function(name){
        name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
        var regexS = "[\\?&]" + name + "=([^&#]*)";
        var regex = new RegExp(regexS);
        var results = regex.exec(window.location.href);
        if (results != null) {
            return results[1];
        } else return null;
    },
    getBaseUrl: function(){
        var base = location.href;
        if (base.indexOf('?') != -1) {
            base = base.substring(0, base.indexOf('?'));
        }
        if (base.search(".htm") != -1) {
            var tail = base.substring(base.lastIndexOf('/') + 1);
            base = base.replace(tail, '');
        }
        if (base.charAt(base.length - 1) != '/') {
            base += '/';
        }
        return base;
    },
    getAbsoluteResourcePath: function(resourcePath){
        resourcePath = resourcePath || "resources/";
        return AuthorUtils.getBaseUrl() + resourcePath;
    }
};
