var detect = navigator.userAgent.toLowerCase();
var OS,browser,version,total,thestring;

if (checkIt('konqueror')) {
	browser = "Konqueror";
	OS = "Linux";
} else if (checkIt('safari')) { 
	browser = "Safari";
} else if (checkIt('omniweb')) { 
	browser = "OmniWeb";
} 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";
	window.onresize = setContentHeight;
	window.onload = setContentHeight;
} else if (!checkIt('compatible')) {
	browser = "Netscape Navigator"
	version = detect.charAt(8);
} else { 
	browser = "An unknown browser";
}

// browser, os check
function checkIt(string) {
	place = detect.indexOf(string) + 1;
	thestring = string;
	return place;
}

function setContentHeight() {
	if (document.documentElement.clientWidth > 753)
		browserHeight = document.documentElement.clientHeight;
	else 
		browserHeight = document.documentElement.clientHeight;		
	document.getElementById('for_layout').style.height = browserHeight + "px";
	document.getElementById('td_content').style.height = browserHeight - 167 + "px";
	document.getElementById('menu').style.height = 29 + "px";
	
}