var globule = new Array();
var match, key, val, offset, end, items;
globule["policy"] = "unknown";
if(document.cookie.length > 0 &&
(offset = document.cookie.indexOf("GLOBULETRACE=")) != -1) {
offset += "GLOBULETRACE=".length;
if((end = document.cookie.indexOf(";", offset)) == -1)
end = document.cookie.length;
if(document.cookie.indexOf("\"") == offset) {
offset += 1;
end -= 1;
}
items = unescape(document.cookie.substring(offset,end)).split(",+");
for(var i=0; i -1) {
val=""+(val.substring(0,pos)+" "+val.substring(pos+1,val.length));
}
globule[key] = val;
} else if((match = /(\w+)\(([^\)]+)\)/.exec(items[i]))) {
globule[match[1]] = match[2];
} else
globule[items[i]] = 1;
}
} else {
globule["globule"] = 0;
}
if(globule["globule"]) {
document.write("This document was delivered to you with replication policy " + globule["policy"] + " by server " + globule["servedby"] + " as a " + (globule["method"]=="fetch" ? "uncached" : "cached") + " result.");
document.write("Other Globule traces are:
");
for(var n in globule) {
document.write(n + " = " + globule[n] + "\n");
}
document.write("
\n");
} else
document.write("No globule information as the server does not seem to be Globule enabled or configured such not to pass this information.");