Replaced onresize by onorientationchange to avoid useless refreshes