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;
