
window.onresize=resizeWrap;
function handleError() {
	return true;
}
window.onerror = handleError;
		
function resizeWrap(){	
	if (window.innerHeight) {
		windowHeight = window.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientHeight) {
		windowHeight = document.documentElement.clientHeight;
	}
	else if (document.body) {
		windowHeight = document.body.clientHeight;
	}
	mainHeight = document.getElementById("wrap").offsetHeight;
	
	if (windowHeight > mainHeight){
		document.getElementById("wrap").style.height = windowHeight+ "px";
	}
}
