
	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("wrapper").setAttribute("class", contentType);
	}
    
window.addEventListener("load", function() { setTimeout(loaded, 100) }, false);
	
function loaded() {
	document.getElementById("wrapper").style.visibility = "visible";
	window.scrollTo(0, 1); // pan to the bottom, hides the location bar
}