It's my personal (and unfounded) opinion that the best way to do this is with an .htaccess file with this in it:
Redirect permanent /
http://www.redirecttohere.com/
ErrorDocument 400
http://www.redirecttohere.com/
ErrorDocument 401
http://www.redirecttohere.com/
ErrorDocument 403
http://www.redirecttohere.com/
ErrorDocument 404
http://www.redirecttohere.com/
I think javascript redirects are only useful for redirecting a single page.
Matt