eval(base2.namespace);
eval(base2.JavaScript.namespace);

var bCore = new Base({
    param_string: '',
    
	is_mouse_right_button: function(e) {
		return ( ( e.which && e.which == 3 ) || ( e.button && e.button == 2 ) ) ? true : false;
	},

    replace_html_template_tags: function(contents, tags) {
        for ( var k in tags ) {
            contents = contents.replace(new RegExp('%'+k+'%', "gi"), tags[k]);
        }

        return contents;
    },
	
	parse_ext_querystring: function(url) {
        var params = {
            length: 0
        };
        
        if ( !url ) {
            var url = window.location.href;
        }

        if ( url.indexOf('#') >= 0 ) {
            var uri = url.substring(url.indexOf('#')+1, url.length);
            bCore.param_string = uri;

            var i = ( uri.indexOf('&') >= 0 ) ? 0 : 1;
            var splitted_commands = uri.split('&');

            for ( ; i < splitted_commands.length; ++i ) {
                params[splitted_commands[i].split('=')[0]] = splitted_commands[i].split('=')[1];
            }
            
            params.length = i;
        }

        return params;
	}
});

