	//Browser
	var detect = navigator.userAgent.toLowerCase();
	var OS, browser, version, thestring, place;
	if (checkIt('konqueror')) {
	browser = "Konqueror";
	OS = "Linux";
	} else if (checkIt('safari')) browser = "Safari";
	else if (checkIt('omniweb')) browser = "OmniWeb";
	else if (checkIt('netscape')) browser = "Netscape";
	else if (checkIt('k-meleon')) {
	browser = "K-Meleon";
	var rv = detect.match(/k-meleon ([\w.]+)/);
	if (rv) {
	rv = rv[0];
	version = rv.substr(3);
	}
	}
	else if (checkIt('opera')) browser = "Opera";
	else if (checkIt('webtv')) browser = "WebTV";
	else if (checkIt('icab')) browser = "iCab"
	else if (checkIt('msie')) browser = "Internet Explorer";
	else if (!checkIt('compatible')) {
	browser = "Netscape Navigator"
	version = detect.charAt(8);
	if (typeof(navigator.product) != "undefined") {
	browser = "Mozilla";
	rv = navigator.userAgent.match(/([Mozilla ]?Fire\w+)\/([\w|\+.]+)/);
	if (rv) {
	browser += rv[1];
	version = rv[2];
	} else {
	rv = navigator.userAgent.match(/rv:([\w|\+.]+)/);
	if (rv) {
	rv = rv[0];
	version = rv.substr(3);
	}
	}
	}
	}else browser = "Unknown Browser";
	if (!version) {
	version = detect.charAt(place + thestring.length);
	}
	var browsername = "";
	if (browser)
	browsername += browser;
	if (version)
	browsername += " " + version;
	if (writeToPage()){
		document.writeln("<span class='sideMenuSystemInfoPart'>Browser:</span><br><span class='sideMenuSystemInfoDetail'>");
		(browsername) ? document.writeln(browsername) : document.writeln("Unable to detect!");
		document.writeln("</span><div style='padding-top:8px'></div>");
	}
	
	// OS
	var i_win;
	var v_win;
	var agt=navigator.userAgent.toLowerCase();
	if (agt.indexOf("win")!=-1 || agt.indexOf("16bit")!=-1)
	i_win = true;
	if (i_win) {
	if (agt.indexOf("wince")!=-1 || agt.indexOf("windows ce")!=-1)
	v_win = "Windows CE";
	if (agt.indexOf("win95")!=-1 || agt.indexOf("windows 95")!=-1)
	v_win = "Windows 95";
	if (agt.indexOf("win98")!=-1 || agt.indexOf("windows 98")!=-1)
	v_win = "Windows 98";
	if (agt.indexOf("win 9x 4.90")!=-1)
	v_win = "Windows ME";
	if (agt.indexOf("winnt")!=-1 || agt.indexOf("windows nt")!=-1)
	v_win = "Windows NT";
	if (agt.indexOf("windows nt 5.0")!=-1)
	v_win = "Windows 2000";
	if (agt.indexOf("windows nt 5.1")!=-1)
	v_win = "Windows XP";
	if (agt.indexOf("windows nt 5.2")!=-1)
	v_win = "Windows Server 2003";
	if (agt.indexOf("windows nt 6.0")!=-1)
	v_win = "Windows Vista";

	if (!v_win)
	v_win = "Unknown Windows";
	}
	if (!OS) {
	if (checkIt('linux')) OS = "Linux";
	else if (checkIt('x11')) OS = "Unix";
	else if (checkIt('mac')) OS = "Mac"
	else if (checkIt('win')) OS = "Windows"
	else OS = "Unknown OS";
	}
	if (writeToPage()) document.writeln("<span class='sideMenuSystemInfoPart'>Operating System:</span><br><span class='sideMenuSystemInfoDetail'>");
	if (i_win){
		if (writeToPage()) document.writeln(v_win);
	}else{
		if (writeToPage()){
			document.writeln(v_win);
			(typeof(navigator.oscpu) != "undefined" && navigator.oscpu != "") ? document.writeln(navigator.oscpu) : document.writeln(OS);
		}
	}
	if (writeToPage()) document.writeln("</span>");

function checkIt(string){
	place = detect.indexOf(string) + 1;
	thestring = string;
	return place;
}

/* CMTBC - this file is used in newly rebranded pages where content should not be written via this file, 
	determine whether to write to the page or not based on the presence of an ID */
function writeToPage(){
	return (getBrandingVersion() == "oldBlue") ? true : false;
}

function getBrandingVersion(){
	if (document.getElementById('myeircomHeader') != null)
		return "originalRebranding";
	else if (document.getElementById('headerLogoWrapper') != null)
		return "originalPortalRebranding";
	else if (document.getElementById('sideMenu') != null)
		return "oldBlue";
	else
		return "unknown";
}