/* updateOrientation checks the current orientation, sets the body's class attribute to portrait, landscapeLeft, or landscapeRight, 
   and displays a descriptive message on "Handling iPhone or iPod touch Orientation Events".  */
function updateOrientation(){
	var orientation=window.orientation;
	
	switch(orientation){
		case 0: 	document.body.setAttribute("class","portrait"); break;	
		case 90:	document.body.setAttribute("class","landscape"); break;
		case -90:	document.body.setAttribute("class","landscape"); break;
	}
}
window.onorientationchange=updateOrientation;