
	window.onload = function initialLoad(){
		updateOrientation();
	}
	
	function updateOrientation(){
		var contentType = "show_";
		switch(window.orientation){
			case 0:
			contentType += "normal";
			break;
			
			case -90:
			contentType += "right";
			break;
			
			case 90:
			contentType += "left";
			break;
			
			case 180:
			contentType += "flipped";
			break;
		}
	document.getElementById("page_wrapper").setAttribute("class", contentType);
	}
	
	window.addEventListener("load", function() {
	 				setTimeout(loaded, 100)
	 }, false);
	
	function loaded() {
	  	document.getElementById("page_wrapper").style.visibility = "visible";
	  	window.scrollTo(0, 1); // pan to the bottom, hides the location bar 
	}
