This code is ideal if you move your site to a new ISP. All you have to do is save the above code as index.shtml and upload it to you old ISP (replacing your old index.shtml). Where it says "put the new URL here" put the FULL URL of your new site ( eg. http://www.mynewsite.com ) and that's all there is to it.
<HTML>
<HEAD>
<TITLE>This
page has moved...</TITLE>
<META HTTP-EQUIV="Refresh"
CONTENT="5; URL=put the new URL
here">
</HEAD>
<BODY>
<H1>This page
has moved!</H1><P>
<H2>Please update your bookmarks
to:<P>
<A HREF="put the new URL here ">new
page</A></H2><P>
You will be transferred
automatically in 5 seconds.<P>
</BODY>
</HTML>
Before you start, I know this isn't javascript but this seems to be the category where most people expect to find it. So here it is :)
Try A Working Example