if (!window.RichFaces) {
	window.RichFaces = {};
}

RichFaces.navigatorType = function () {
	if (navigator.userAgent.toLowerCase().indexOf("msie") >= 0 ||
			navigator.userAgent.toLowerCase().indexOf("explorer") >= 0)
		return "MSIE";
	if (navigator.userAgent.toLowerCase().indexOf("firefox") >= 0 ||
			navigator.userAgent.toLowerCase().indexOf("iceweasel") >= 0)
		return "FF";
	if (navigator.userAgent.toLowerCase().indexOf("opera") >= 0)
		return "OPERA";
	if (navigator.userAgent.toLowerCase().indexOf("netscape") >= 0)
		return "NETSCAPE";
	if (navigator.userAgent.toLowerCase().indexOf("safari") >= 0)
		return "SAFARI";
	if (navigator.userAgent.toLowerCase().indexOf("konqueror") >= 0)
		return "KONQUEROR";
	return "OTHER";
}

RichFaces.getOperaVersion = function () {
	var index = navigator.userAgent.toLowerCase().indexOf("opera");
	if (index == -1) return;
	return parseFloat(navigator.userAgent.toLowerCase().substring(index+6));
}
