Mozilla does it somewhat differently:
https://developer.mozilla.org/en/Detecting_device_orientatio...
http://studio.html5rocks.com/samples/orientation/index.html (see VideoPhysicsController.prototype._onTilt() )
http://studio.html5rocks.com/samples/orientation/index.html (see VideoPhysicsController.prototype._onTilt() )