(function() {
	addEventListener("load", function() { setTimeout(hideURLbar, 0); detectOrientation();  }, false);
	window.onorientationchange = function() { detectOrientation(); }

	function hideURLbar(){
		window.scrollTo(0,1);
	}
	
	function detectOrientation(){
		var orientation = window.orientation;
		if(orientation==90 || orientation==-90){
			document.body.setAttribute("orient","landscape");
		}
		else{
			document.body.setAttribute("orient","portrait");
		}
		hideURLbar();
	}
})();