<!--

/* Browser information collection */

function browser_info(){
	get_platform();
	get_browser();
	get_version();
	get_windowheight();
	get_windowwidth();
	}





// 1 determine the platform
function get_platform(){
	var agt = navigator.userAgent.toLowerCase(); // os (and some other junk)

	this.mac68K  = ((agt.indexOf("Mac_68000")!=-1) ||(agt.indexOf("68K")!=-1));
	this.powerpc = ((agt.indexOf("mac_powerpc")!=-1) ||(agt.indexOf("ppc")!=-1));
	this.win3_1  = ((agt.indexOf("Windows 3.1")!=-1));
	this.win95   = ((agt.indexOf("win95")!=-1) ||(agt.indexOf("windows 95")!=-1));
	this.win98   = ((agt.indexOf("win98")!=-1) ||(agt.indexOf("windows 98")!=-1));
	this.winnt   = ((agt.indexOf("winnt")!=-1) ||(agt.indexOf("windows nt")!=-1));

	this.win32 = this.win95 || this.winnt || this.win98 || navigator.platform == "Win32" || (agt.indexOf("win32")!=-1);
	
	platform = "unknown";
	
	if((this.powerpc > 0) || (this.mac68K > 0)){
		platform = "mac";
		}
	else if((this.win32 > 0) || (this.win3_1 > 0)){
		platform = "win";
		}
	}





// 2 determine the browser
function get_browser(){
	browser = navigator.appName; // browser

	if(browser == "Microsoft Internet Explorer"){
		browser = "ie";
		}
	else if(browser == "Netscape"){
		browser = "ns";
		}
	else{
		browser = "unknown";
		}	
	}





// 3 determine the version
function get_version(){
	version= parseInt(navigator.appVersion); // version
	}





// 4 determine the window height
function get_windowheight(){
	get_browser();
	
	if(browser == "ie"){
		windowheight = document.body.offsetHeight;
		}

	else if(browser == "ns"){
		windowheight = window.innerHeight;
		}
	}
	




// 5 determine the window width
function get_windowwidth(){
	get_browser();

	if(browser == "ie"){
		windowwidth = document.body.offsetWidth;
		}

	else if(browser == "ns"){
		windowwidth = window.innerWidth;
		}
	}