function viewportWidth() {
	if(window.innerWidth) return window.innerWidth;
	if(window.document.documentElement.clientWidth) return document.documentElement.clientWidth;
        return window.document.body.clientWidth;
}

function viewportHeight() {
	if(window.innerHeight) return window.innerHeight;
	if(window.document.documentElement.clientHeight) return document.documentElement.clientHeight;
        return window.document.body.clientHeight;
}

function setScrSizeCookies() {
	//alert("old cookie val: " + document.cookie + "new width: " + wWidth);
	document.cookie = 'wSize=wWidth=' + viewportWidth() + '&wHeight=' + viewportHeight() + ';';
};
