changes to get working in firefox.
rickroll the user if in an error page
previous and next button is more intelligent