function wssParseUri(sourceUri) {
    var uriPartNames = ["source","protocol","authority","domain","port","path","directoryPath","fileName","query","anchor"],
        uriParts = new RegExp("^(?:([^:/?#.]+):)?(?://)?(([^:/?#]*)(?::(\\d*))?)((/(?:[^?#](?![^?#/]*\\.[^?#/.]+(?:[\\?#]|$)))*/?)?([^?#/]*))?(?:\\?([^#]*))?(?:#(.*))?").exec(sourceUri),
        uri = {};

    for(var i = 0; i < 10; i++) {
        uri[uriPartNames[i]] = (uriParts[i] ? uriParts[i] : "");
    }

    // Always end directoryPath with a trailing backslash if a path was present in the source URI
    // Note that a trailing backslash is NOT automatically inserted within or appended to the "path" key

    if(uri.directoryPath.length > 0) {
        uri.directoryPath = uri.directoryPath.replace(/\/?$/, "/");
    }

    return uri;

}

//var url = document.location;
var url = window.location;
var r = wssParseUri(url);
var cpn;
var cmlc;

var cmlc = DEFAULT_CAT_PREFIX + r.directoryPath;

if (r.fileName == null || r.fileName == '') {
    cpn = /*cmlc +*/ DEFAULT_FILE;
} else {
    cpn = /*cmlc +*/ r.fileName;
}


hbx.pn=cpn;
hbx.mlc=cmlc;

