My knowledge of Javascript is pretty limited. I know enough to tweak the occasional image gallery or slideshow script, and that's about it, so this may be a pretty stupid question, but I'm going to go ahead and ask anyway, because that's how I learn.

I've just been asked to do a complete revamp of a site built by somebody else. I've been taking a look to see what's there, and found a (to me) very odd construction. There are a series of small images, which one clicks for the larger image - except that it doesn't work like that and I've never seen this technique anywhere. The HTML reads
<a href="javascript:openImage('Images/Garden.jpg')"><img alt="garden" src="ImagesGardenSml.html"></a>
The .html file referenced in the <img> tag contains
<meta http-equiv="refresh" content="0;url=http://**.***.***.**/" />
<script LANGUAGE="JavaScript">
followed by a vast array of numbers, in groups of three, commented out in the HTML. There is a separate file for each image, but the content is identical, as far as I can see.

Clicking the small image opens the URL in a new window. There are no images, just a series of links. I've checked the IP address of the URL in hpHosts Online, and it's associated with a long list of dodgy sites.

My question is basically: was this ever a genuine method to display a large image, or has the site been hacked at some point, or what?