// save window size for duration of session

function Get_Cookie(name) {
	var start = document.cookie.indexOf(name + "=");
	var len = start + name.length + 1;
	if ((!start) && (name != document.cookie.substring(0, name.length)))
		return null;
	if (start == -1)
		return null;
	var end = document.cookie.indexOf(";", len);
	if (end == -1)
		end = document.cookie.length;
	return unescape(document.cookie.substring(len, end));
}

var wWidth = 0;
wWidth = window.innerWidth != null ? window.innerWidth
		: document.documentElement && document.documentElement.clientWidth ? document.documentElement.clientWidth
				: document.body != null ? document.body.clientWidth : null;

var wHeight = 0;
wHeight = window.innerHeight != null ? window.innerHeight
		: document.documentElement && document.documentElement.clientHeight ? document.documentElement.clientHeight
				: document.body != null ? document.body.clientHeight : null;

if (wWidth != Get_Cookie("windowWidth")) {
	document.cookie = "windowWidth=" + wWidth + ";";
	document.cookie = "windowHeight=" + wHeight + ";";
	if (Get_Cookie("windowWidth") && navigator.platform != "Mac")
		window.location.reload(true);
}

