rem: var match = new RegExp("^.*\\/((?:.*\\/){"+xooki.config.level+"}[^\\/]*)(?:\\.\\w+)$", "g").exec(window.location.toString()); 
add: var match = new RegExp("^.*\\/((?:.*\\/){"+xooki.config.level+"}[^\\/]*)(?:\\.\\w+)(?:\\?.+)?$", "g").exec(window.location.toString()); 
context: (function() {    ////////////////////////////////////////////////////////////////////////////    ////////////////// config init    ////////////////////////////////////////////////////////////////////////////    initConfigProperty = function(prop, value, defaultValue) {        if (typeof this[prop] == "undefined") {            if (typeof value == "undefined") {                this[prop] = defaultValue;            } else if (typeof value == "function") {                this[prop] = value();            } else {                this[prop] = value;            }        }    };    xooki.config = {};    xooki.c = xooki.config;    if (typeof xookiConfig != "undefined") {xooki.util.mix(xookiConfig, xooki.config);}    xooki.c.initProperty = initConfigProperty;    xooki.c.initProperty("level", 0);    xooki.c.initProperty("root", function() {    	root = window.location.toString();    	// remove trailing parts of the URL to go the root depending on level    	for (var i=0; i < xooki.c.level + 1; i++) {    		root = root.substring(0, root.lastIndexOf('/'));    	}    	return root + '/';    });    var globalConfig = xooki.json.loadURL(u("config.json"));    if (globalConfig != null) {        xooki.util.mix(globalConfig, xooki.config, false);    }    xooki.c.initProperty("defaultInputFormat", "xooki");    xooki.c.initProperty("xookiInputFormat", ["xooki"]);    xooki.c.initProperty("allowEdit", document.location.toString().substr(0,5) == "file:");        xooki.input.format.define("xooki", ["code", "url", "xookiLinks", "jira", "lineBreak"]);        xooki.c.path = (typeof xooki.c.path != "undefined")?xooki.c.path:{};    xooki.c.path.initProperty = initConfigProperty;    xooki.c.path.initProperty("install", "xooki");    xooki.c.path.initProperty("messages", xooki.p("messages.json"));    xooki.c.path.initProperty("template", "template.html");    xooki.c.path.initProperty("printTemplate", "printTemplate.html");    xooki.c.path.initProperty("toc", "toc.json");    xooki.c.path.initProperty("blankPageTpl", xooki.p("blankPageTpl.html"));            xooki.c.css = (typeof xooki.c.css != "undefined")?xooki.c.css:{};                xooki.c.messages = xooki.json.loadURL(cu("messages"));     xooki.c.browser = {        NS: (window.Event) ? 1 : 0    };        // action    // TODO: better handle action extraction    xooki.c.action = window.location.search == '?action=print'?'print':xooki.c.action;        ////////////////////////////////////////////////////////////////////////////    ////////////////// TOC init    ////////////////////////////////////////////////////////////////////////////    xooki.toc = xooki.json.loadURL(cu("toc"));    xooki.toc.pages = {}; // to store a by id map of pages objects	(function(page, parent, index) {        xooki.toc.pages[page.id] = page;                page.meta = {            parent: parent,            index: index        };        if (typeof page.children == 'undefined') {            page.children = [];        } else {            for (var i=0; i<page.children.length; i++) {                arguments.callee(page.children[i], page, i); // recurse            }        }    })(xooki.toc, null, 0);		var match = new RegExp("^.*\\/((?:.*\\/){"+xooki.config.level+"}[^\\/]*)(?:\\.\\w+)$", "g").exec(window.location.toString());	var curPageId;	if (match == null || match[1] == '') {		curPageId = "index";	} else {		curPageId = match[1];	}	xooki.page = xooki.toc.pages[curPageId];	if (xooki.page == null) {		xooki.warn(t('page id not found in TOC: ${0}',curPageId));	} else {		if (typeof xooki.config.title == 'undefined') {			xooki.config.title = xooki.page.title;		}			}	xooki.config.page = xooki.page;	    ////////////////////////////////////////////////////////////////////////////    ////////////////// main template loading + head output    ////////////////////////////////////////////////////////////////////////////	xooki.template = {};    xooki.template.source = xooki.url.loadURL(xooki.c.action == "print"?cu("printTemplate"):cu("template"));	if(xooki.template.source != null) {		xooki.template.head = xooki.template.source.match(/<head>([^]*)<\/head>/im)[1];		        var head = xooki.string.processTemplate(xooki.template.head, xooki.config);		head = head.replace(/href="([^\\$:"]+)"/g, 'href="'+xooki.c.root+'$1"');		document.write(head);		var body = xooki.template.source.match(/<body>([^]*)<\/body>/im)[1];		body = body.replace(/href="([^\\$:"]+)"/g, 'href="'+xooki.c.root+'$1"');		xooki.template.body = body.replace(/src="([^\\$:"]+)"/g, 'src="'+xooki.c.root+'$1"');			}	    ////////////////////////////////////////////////////////////////////////////    ////////////////// includes    ////////////////////////////////////////////////////////////////////////////    xooki.url.include(xooki.u("tree/simpletreemenu.js"));    if (xooki.c.useTrimPath) {        xooki.url.include(xooki.u("trimpath/template.js"));    }    if (xooki.c.allowEdit) {        xooki.url.include(xooki.u("xookiEdit.js"));    }    for (var k in xooki.c) {        if (typeof xooki.c[k] == "string" || typeof xooki.c[k] == "number" || typeof xooki.c[k] == "boolean") {            xooki.debug(k+": "+xooki.c[k]);        }    }})();
meta: 2968	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/2968/1a410417e7d124143f7cf7795e03d3eb6676c7bb/xooki.js/clean/xooki.js