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"
else if (!checkIt('compatible'))
{
	browser = "Netscape Navigator"
	version = detect.charAt(8);
}
else browser = "An unknown browser";

if (!version) version = detect.charAt(place + thestring.length);

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 = "an unknown operating system";
}

function checkIt(string)
{
	place = detect.indexOf(string) + 1;
	thestring = string;
	return place;
}

function resizeWindow() {
	
	if (window.screen.height <= 768) {
		document.body.style.overflow = 'scroll';
		window.moveTo(0,0);
		window.resizeTo(screen.availWidth,screen.availHeight);
	} else {
	
	var w = window.innerWidth;
	var h = window.innerHeight;
	var t0 = window;
	var tw = 848;
	var th = 738;
	
	t0 = document.body || window;
	
	if (browser == "Internet Explorer") {
		var tw = 868;
		var th = 741;
		window.resizeBy(tw - t0.offsetWidth, th - t0.offsetHeight);
	}

	else if (browser == "Safari") {
		
		var tw = 847;
		var th = 737;
		
		if (window.innerWidth < 840) {
			var tw = 831;
			var th = 720;
		}
		
		window.resizeBy(tw - t0.offsetWidth, th - t0.offsetHeight);
	}
	
	else {
		window.resizeBy(tw - t0.offsetWidth, th - t0.offsetHeight);
		window.resizeBy(tw - t0.offsetWidth, th - t0.offsetHeight);
	}
	}
		
}




