function init() {
	if (isOldIE()) {
		var text = document.createTextNode("Your browser is outdated. Please update or use an alternative browser (e.g. Firefox or Chromium).");
		var div = document.createElement("div");
		div.className = "warning";
		div.appendChild(text);
		while (document.body.firstChild)
			document.body.removeChild(document.body.firstChild);
		document.body.appendChild(div);
		return;
	}
	document.body.className = "loaded";
	if (isIE()) return;
	var as = document.getElementsByTagName("a");
	for ( var i = 0; i < as.length; i++) {
		if (as[i].className.match(/\bstandard\b/)) continue;
		as[i].onclick = function() {
			document.body.className = "";
			setTimeout("window.location='" + this.href + "'", 1000);
			return false;
		};
	}
}

function isIE() {
	return navigator.userAgent.toLowerCase().search(/msie/) > -1;
}

function isIE7() {
	return navigator.userAgent.toLowerCase().search(/msie 7/) > -1;
}

function isOldIE() {
	return navigator.userAgent.toLowerCase().search(/msie 6/) > -1
			|| navigator.userAgent.toLowerCase().search(/msie 5/) > -1
			|| navigator.userAgent.toLowerCase().search(/msie 4/) > -1
			|| navigator.userAgent.toLowerCase().search(/msie 3/) > -1
			|| navigator.userAgent.toLowerCase().search(/msie 2/) > -1
			|| navigator.userAgent.toLowerCase().search(/msie 1/) > -1;
}

function navigationListener(newLocation) {
	init();
}

function initNavigation() {
	if (isIE()) return;
	window.dhtmlHistory.create();
	dhtmlHistory.initialize();
	dhtmlHistory.addListener(navigationListener);
}

function loadJs(name) {
	var s = document.createElement('script');
	s.setAttribute("type", "text/javascript");
	s.setAttribute("src", name);
	document.getElementsByTagName("head")[0].appendChild(s);
}

