function addPageToHistory(page) {
	/*
	if (navigator.vendor != "Apple Computer, Inc.") {
		var location;
		var hashPos = String(window.location).indexOf("#");
		if (hashPos >= 0) {
			location = String(window.location).substr(0, hashPos);
		} else {
			location = String(window.location);
		}
		if (page != "home" && page.length > 0) {
			window.location = location + "#" + escape(page);
		}
	}
	*/
	var historyFrame = document.getElementById("historyFrame");
	if (historyFrame) {
		historyFrame.src = "history.asp?pageID=" + escape(page);
	}
	return true;
}
function popupWindow(href, page, width, height) {
	setTimeout("popupWindow2('" + href + "','" + page + "'," + width + "," + height + ")", 1);
}
function popupWindow2(href, page, width, height) {
	var winName = (page.length > 0) ? page : "_blank";
	var leftVal = (screen.width - width) >> 1;
	var topVal = (screen.height - height) >> 2;
	var options = "channelmode=no,directories=no,height=" + height + ",innerHeight=" + height + ",innerWidth="
	            + width + ",left=" + leftVal + ",location=no,menuBar=no,resizable=no,scrollbars=yes,status=no,toolbar=no,top="
	            + topVal + ",width=" + width;
	var win = window.open(href, winName, options);
	if (win) {
		win.focus();
	}
	return true;
}
function resizeFlashContent() {
	var innerWidth = 1000;
	var innerHeight = 650;
	if (typeof(window.innerHeight) == "number") {
		//Non-IE
		innerHeight = window.innerHeight;
		innerWidth = window.innerWidth;
	} else if (document.documentElement && document.documentElement.clientHeight) {
		//IE 6+ in 'standards-compliant mode'
		innerHeight = document.documentElement.clientHeight;
		innerWidth = document.documentElement.clientWidth;
	} else if (document.body && document.body.clientHeight) {
		//IE 4 compatible
		innerHeight = document.body.clientHeight;
		innerWidth = document.body.clientWidth;
	}
	var flashContent = document.getElementById("flashContent");
	if (flashContent) {
		var overflow = "hidden";
		if (innerHeight < 650) {
			flashContent.style.height = "650px";
			overflow = "scroll";
		} else {
			flashContent.style.height = "100%";
		}
		if (innerWidth < 1000) {
			flashContent.style.width = "1000px";
			overflow = "scroll";
		} else {
			flashContent.style.width = "100%";
		}
		document.body.style.overflow = overflow;
	}
}
