var yourBro = []; yourBro.ualc = navigator.userAgent.toLowerCase();//checks for different browsersif( document.all && document.getElementById && navigator.savePreferences && ( yourBro.ualc.indexOf( 'netfront' ) < 0 ) && navigator.appName != 'Blazer' ) { yourBro[0] = 'es5'; yourBro[1] = 'Escape 5'; }else if( navigator.vendor == 'KDE' || ( document.childNodes && ( !document.all || navigator.accentColorName ) && !navigator.taintEnabled ) ) { yourBro[0] = 'kde'; yourBro[1] = 'Konqueror / Safari / OmniWeb 4.5+'; }else if( navigator.__ice_version ) { yourBro[0] = 'ice'; yourBro[1] = 'ICEbrowser'; }else if( window.ScriptEngine && ScriptEngine().indexOf( 'InScript' ) + 1 ) { if( document.createElement ) { yourBro[0] = 'ic3'; yourBro[1] = 'iCab 3+'; } else { yourBro[0] = 'icb'; yourBro[1] = 'iCab 2-'; } }else if( yourBro.ualc.indexOf( 'hotjava' ) + 1 && typeof( navigator.accentColorName ) == 'undefined' ) { yourBro[0] = 'hjv'; yourBro[1] = 'HotJava'; }else if( document.layers && !document.classes ) { yourBro[0] = 'omn'; yourBro[1] = 'Omniweb 4.2-'; }else if( document.layers && !navigator.mimeTypes['*'] ) { yourBro[0] = 'esc'; yourBro[1] = 'Escape 4'; }else if( document.layers ) { yourBro[0] = 'ns4'; yourBro[1] = 'Netscape 4'; }else if( window.opera && document.childNodes ) { yourBro[0] = 'op7'; yourBro[1] = 'Opera 7+'; }else if( yourBro.ualc.indexOf( 'opera' ) + 1 ) { yourBro[0] = 'opr'; yourBro[1] = 'Opera 6-'; }else if( navigator.appName.indexOf( 'WebTV' ) + 1 ) { yourBro[0] = 'wtv'; yourBro[1] = 'WebTV'; }else if( yourBro.ualc.indexOf( 'netgem' ) + 1 ) { yourBro[0] = 'nbx'; yourBro[1] = 'Netgem NetBox'; }else if( yourBro.ualc.indexOf( 'opentv' ) + 1 ) { yourBro[0] = 'otv'; yourBro[1] = 'OpenTV'; }else if( yourBro.ualc.indexOf( 'ipanel' ) + 1 ) { yourBro[0] = 'ipn'; yourBro[1] = 'iPanel MicroBrowser'; }else if( document.getElementById && !document.childNodes ) { yourBro[0] = 'clu'; yourBro[1] = 'Clue browser'; }else if( navigator.product == 'Gecko' ) { yourBro[0] = 'gek'; yourBro[1] = 'Gecko engine (Mozilla, Netscape 6+ etc.)'; }else if( document.getElementById && ( ( yourBro.ualc.indexOf( 'netfront' ) + 1 ) || navigator.appName == 'Blazer' ) ) { yourBro[0] = 'nf3'; yourBro[1] = 'NetFront 3+'; }else if( document.getElementById && document.compatMode ) { yourBro[0] = 'ie6'; yourBro[1] = 'Internet Explorer 6+'; }else if( document.getElementById ) { yourBro[0] = 'ie5'; yourBro[1] = 'Internet Explorer 5+'; }//else if( document.all ) { yourBro[0] = 'ie4'; yourBro[1] = 'Internet Explorer 4'; }else if( document.all ) { yourBro[0] = 'ie'; yourBro[1] = 'Internet Explorer'; }else if( ( yourBro.ualc.indexOf( 'msie' ) + 1 ) && window.ActiveXObject ) { yourBro[0] = 'pie'; yourBro[1] = 'Pocket Internet Explorer'; }else { yourBro[0] = 'oth'; yourBro[1] = 'an unknown browser'; }//perform checks for different operating systemsif( yourBro.ualc.indexOf( 'linux' ) + 1 ) { yourBro[2] = 'lin'; yourBro[3] = 'Linux'; }else if( yourBro.ualc.indexOf( 'x11' ) + 1 ) { yourBro[2] = 'unx'; yourBro[3] = 'Unix'; }else if( yourBro.ualc.indexOf( 'mac' ) + 1 ) { yourBro[2] = 'mac'; yourBro[3] = 'MacOS'; }else if( navigator.platform == 'PalmOS' ) { yourBro[2] = 'plm'; yourBro[3] = 'Palm OS'; }else if( ( navigator.platform == 'WinCE' ) || ( navigator.platform == 'Windows CE' ) || ( navigator.platform == 'Pocket PC' ) ) { yourBro[2] = 'wce'; yourBro[3] = 'Windows CE'; }else if( yourBro.ualc.indexOf( 'win' ) + 1 ) { yourBro[2] = 'win'; yourBro[3] = 'Windows'; }else if( yourBro.ualc.indexOf( 'webtv' ) + 1 ) { yourBro[2] = 'wtv'; yourBro[3] = 'WebTV Platform'; }else if( yourBro.ualc.indexOf( 'netgem' ) + 1 ) { yourBro[2] = 'ngm'; yourBro[3] = 'Netgem'; }else if( yourBro.ualc.indexOf( 'opentv' ) + 1 ) { yourBro[2] = 'otv'; yourBro[3] = 'OpenTV Platform'; }else if( yourBro.ualc.indexOf( 'symbian' ) + 1 ) { 	yourBro[2] = 'sym'; yourBro[3] = 'Symbian'; }else { yourBro[2] = 'oth'; yourBro[3] = 'an unknown operating system'; }function getWindowHeight() {	var windowHeight = 0;	if (typeof(window.innerHeight) == 'number') {		windowHeight = window.innerHeight;	}	else {		if (document.documentElement && document.documentElement.clientHeight) {			windowHeight = document.documentElement.clientHeight;		}		else {			if (document.body && document.body.clientHeight) {				windowHeight = document.body.clientHeight;			}		}	}	return windowHeight;}function setFooter() {	var browser = yourBro[0] //matches win ie'sif (yourBro[2] == "win" && browser.match("ie") == "ie") {		function setFooterWinIE() {				window.onresize = function() {				setFooter();			}			if (document.getElementById) {				var windowHeight = getWindowHeight();				if (windowHeight > 0) {				/*	var containerHeight = document.getElementById('container').offsetHeight;					var contentHeight = document.getElementById('content').offsetHeight;							var containerElement = document.getElementById('container');					var contentElement = document.getElementById('content');											var textHeight = document.getElementById('text').offsetHeight;									var containerTop = document.getElementById('container').offsetTop;					var contentTop = document.getElementById('content').offsetTop;								if (windowHeight - (contentHeight + contentTop + 120) >= 0) {						containerElement.style.height = (windowHeight - contentTop - 88) + 'px';					}					else if (windowHeight - (contentHeight + contentTop + 120) <= 0) {						containerElement.style.height = contentHeight + contentTop - 88 + 'px';					} 				*/				var containerHeight = document.getElementById('container').offsetHeight;					var contentHeight = document.getElementById('content').offsetHeight;					var footerHeight = document.getElementById('footer').offsetHeight;							var containerElement = document.getElementById('container');					var contentElement = document.getElementById('content');											var textHeight = document.getElementById('text').offsetHeight;									var containerTop = document.getElementById('container').offsetTop;					var contentTop = document.getElementById('content').offsetTop;								if (windowHeight - (contentHeight + contentTop + footerHeight + 42) >= 0) {						containerElement.style.height = (windowHeight - footerHeight -42) + 'px';					}					else if (windowHeight - (contentHeight + footerHeight + contentTop + 42) <= 0) {						containerElement.style.height = contentHeight + contentTop + 'px';					}				}			}		}				setFooterWinIE();	}//matches mac ie's	if (yourBro[2] == "mac" && browser.match("ie") == "ie") {		function setFooterMacIE() {				window.onresize = function() {				setFooter();			}			if (document.getElementById) {				var windowHeight = getWindowHeight();				if (windowHeight > 0) {					var containerHeight = document.getElementById('container').offsetHeight;					var contentHeight = document.getElementById('content').offsetHeight;					var footerHeight = document.getElementById('footer').offsetHeight;							var containerElement = document.getElementById('container');					var contentElement = document.getElementById('content');											var textHeight = document.getElementById('text').offsetHeight;									var containerTop = document.getElementById('container').offsetTop;					var contentTop = document.getElementById('content').offsetTop;								if (windowHeight - (contentHeight + contentTop + footerHeight + 77) >= 0) {						containerElement.style.height = (windowHeight - footerHeight -77) + 'px';					}					else if (windowHeight - (contentHeight + footerHeight + contentTop + 77 ) <= 0) {						containerElement.style.height = contentHeight + contentTop + 'px';					}				}			}		}				setFooterMacIE();	}//matches non win non ie browsers	else if (browser.match("ie") == null) {		function setFooterBrowser() { 			window.onresize = function() {				setFooter();			}			if (document.getElementById) {				var windowHeight = getWindowHeight();				if (windowHeight > 0) {					var containerHeight = document.getElementById('container').offsetHeight;					var contentHeight = document.getElementById('content').offsetHeight;					var footerHeight = document.getElementById('footer').offsetHeight;							var containerElement = document.getElementById('container');					var contentElement = document.getElementById('content');											var textHeight = document.getElementById('text').offsetHeight;									var containerTop = document.getElementById('container').offsetTop;					var contentTop = document.getElementById('content').offsetTop;								if (windowHeight - (contentHeight + contentTop + footerHeight + 62) >= 0) {						containerElement.style.height = (windowHeight - footerHeight -62 ) + 'px';					}					else if (windowHeight - (contentHeight + footerHeight + contentTop + 62 ) <= 0) {						containerElement.style.height = contentHeight + contentTop + 'px';					}				}			}		}			setFooterBrowser();	} 	}