var kOryxIdent = "266bbf6d";
if (typeof kOryxStatsURL == 'undefined') { var kOryxStatsURL = "/oryx/"; }
/*
	Oryx statistics software
	Copyright (c) 2008 Dan Wright, All rights reserved
	http://danwright.info/oryx/about/
*/

var Oryx = {};
Oryx.stuff = {};

Oryx.record = function() {
	var now = new Date();
	var info = "stamp=" + now.getTime();
	for (var thing in Oryx.stuff)
		{ if (typeof Oryx.stuff[thing] == "function") info += "&" + Oryx.stuff[thing](); }
	var oryxStats = (typeof kOryxStatsURL != "undefined") ? kOryxStatsURL : "/oryx/";
	document.writeln("<script src=\""+oryxStats+"?stats&"+info+"\" type=\"text/javascript\" language=\"javascript\"></script>");
};

Oryx.stuff.screenInfo = function() {
	return "screen="+screen.width+"x"+screen.height;
};

Oryx.stuff.windowInfo = function() {
	var w=0,h=0;
	if (typeof window.innerWidth != "undefined")
		{ w=window.innerWidth; h=window.innerHeight; }
	else if (document.documentElement && typeof document.documentElement.offsetWidth != "undefined" && document.documentElement.offsetWidth != 0)
		{ w=document.documentElement.offsetWidth; h=document.documentElement.offsetHeight; }
	else if (document.body && typeof document.body.offsetWidth != "undefined")
		{ w=document.body.offsetWidth; h=document.body.offsetHeight; }
	return "window="+w+"x"+h;
};

Oryx.stuff.resourceInfo = function() {
	if (typeof OryxDocumentName == 'undefined') { OryxDocumentName = document.title; }
	return "url=" + encodeURIComponent(document.URL) + "&referer=" + encodeURIComponent(document.referrer) + "&title=" + encodeURIComponent(OryxDocumentName);
};

Oryx.stuff.ident = function() {
	return "id=" + ((typeof kOryxIdent != "undefined")
		? kOryxIdent : "");
};

/* html5.js */
Oryx.stuff.dom2 = function() {
	return "d2="+(document.implementation && document.implementation.hasFeature("HTML","2.0")?"1":"0");
}

Oryx.stuff.localStorage = function() {
	return "h5ls="+(typeof localStorage != "undefined" && typeof localStorage.setItem != "undefined"?"1":"0");
}

Oryx.stuff.sessionStorage = function() {
	return "h5ss="+(typeof sessionStorage != "undefined" && typeof sessionStorage.setItem != "undefined" ?"1":"0");
}

Oryx.stuff.database = function() {
	return "h5db="+(typeof openDatabase == "function" ? "1":"0");
}
Oryx.record();

