var n, ie, ns6; // browserCheck variables
var ih; // inner height

function browserCheck() {
	if (document.layers) {
		ns6=0; n=1; ie=0;
		}
	else if (document.all) {
		ns6=0; n=0; ie=1;
		}
	else {
		if (navigator.appName == "Netscape" && parseInt(navigator.appVersion) >= 5) {
			ns6=1; n=0; ie=0;
			}
		}
	}

function windowPreset() {
	// if (n || ns6) ih = window.innerHeight;
	// else if (ie) ih = document.body.clientHeight;
	
	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; 
				} 
			} 
		} 
	ih = windowHeight;
	}

function setIdProperty( id, property, value ) {
	var styleObject = document.getElementById( id );
	if (styleObject != null) {
		styleObject = styleObject.style;
		styleObject[ property ] = value;
		}
	}

function setCookie(name, value, expires, path, domain, secure) {
	document.cookie= name + "=" + escape(value) +
		((expires) ? "; expires=" + expires.toGMTString() : "") +
		((path) ? "; path=" + path : "") +
		((domain) ? "; domain=" + domain : "") +
		((secure) ? "; secure" : "");
	}

function readCookie (CookieName) {
	var CookieString = document.cookie;
	var CookieSet = CookieString.split (';');
	var SetSize = CookieSet.length;
	var CookiePieces
	var ReturnValue = "";
	var x = 0;
	
	for (x = 0; ((x < SetSize) && (ReturnValue == "")); x++) {
		CookiePieces = CookieSet[x].split ('=');
		if (CookiePieces[0].substring (0,1) == ' ') {
			CookiePieces[0] = CookiePieces[0].substring (1, CookiePieces[0].length);
			}
		if (CookiePieces[0] == CookieName) {
			return(CookiePieces[1]);
			}
		}
	}

function adjustBannerPosition() {
	browserCheck();
	windowPreset();
	newHeight = (ih - 82);
	document.getElementById("contentpane").style.height=(newHeight + "px");
	setCookie("contentHeight", newHeight);
	}
