function getWindowWidth(win) {
	if (win == undefined) win = window;
	if (win.innerWidth) {
		return win.innerWidth;
	} else {
		if (win.document.documentElement && win.document.documentElement.clientWidth) {
			return win.document.documentElement.clientWidth;
		}
		return win.document.body.offsetWidth;
	}
}

function getWindowHeight(win) {
	if (win == undefined) win = window;
	if (win.innerHeight) {
		return win.innerHeight;
	} else {
		if (win.document.documentElement && win.document.documentElement.clientHeight) {
			return win.document.documentElement.clientHeight;
		}
		return win.document.body.offsetHeight;
	}
}

function reSize () {
	if (width >= getWindowWidth()+50 || width <= getWindowWidth()-50) {
		location.href = location.href;
	} else if (height >= getWindowHeight()+50 || height <= getWindowHeight()-50) {
		location.href = location.href;
	}
}

if (!window.width || !window.height) {
	window.onresize = reSize;
	width = getWindowWidth();
	height = getWindowHeight();
	width2 = width;
	height2= height;
}