
function detectVersion()
{
	version = parseInt(navigator.appVersion);
	return version;
}

function detectOS()
{
	if(navigator.userAgent.indexOf('Win') == -1) {
		OS = 'Macintosh';
	} else {
		OS = 'Windows';
	}
	return OS;
}

function detectBrowser()
{
	if(navigator.appName.indexOf('Netscape') == -1) {
		browser = 'IE';
	} else {
		browser = 'Netscape';
	}
	return browser;
}

function MakeItSo(){

	var adjWidth;
	var adjHeight;

	if((detectOS() == 'Macintosh') && (detectBrowser() == 'Netscape')) {
		adjWidth = 0;
		adjHeight = 0;
	}
	if((detectOS() == 'Macintosh') && (detectBrowser() == 'IE')) {
		adjWidth = 0;
		adjHeight = 0;
		winOptions = 'fullscreen=yes';
	}
	if((detectOS() == 'Windows') && (detectBrowser() == 'Netscape')) {
		adjWidth = 0;
		adjHeight = 0;
	}
	if(detectVersion() < 4) {
		self.location.href = 'oldbrowser.html';
	} else {
		var winWidth = screen.availWidth - adjWidth;
		var winHeight = screen.availHeight - adjHeight;
		var winSize = 'width=' + winWidth + ',height=' + winHeight;
		var thewindow = window.open(document.location.href, 'Fise', winSize);
		thewindow.moveTo(0,0);
	}
}

function FullScreen(){
	if((detectOS() == 'Windows') && (detectBrowser() == 'IE')) {
		window.open(document.location.href,'Fise','fullscreen=yes');
	} else {
		MakeItSo();
	}
}

function showFullscreenMessage() {
	$('fullscreen_message').style.display = "block";
}

function hideFullScreenMessage() {
	$('fullscreen_message').style.display = "none";
}