source: trunk/npemap.org.uk/static/inc/by-decade/allmaps-footer.shtml @ 716

Last change on this file since 716 was 716, checked in by Nick Burch, 10 years ago

Turn the by-decade bits largely into shtml includes

File size: 880 bytes
Line 
1<p>
2For more information, or to view our latest maps, please
3 <a href="/">visit the site homepage</a>.
4</p>
5
6<a href="#" id="link">
7<img src="thumbnail.jpg" style="border: none" />
8</a>
9</body>
10
11<script type="text/javascript">
12// The X offset
13// (The number of pixels that were trimmed from the left of the thumbnail
14//   image, when it was created to start at 0,0)
15var xOffset = 77;
16
17function click(e) {
18       
19  e = YAHOO.util.Event.getEvent(e);
20  var img = YAHOO.util.Event.getTarget(e);
21  var imgPos = YAHOO.util.Dom.getXY(img);
22        var x = xOffset + YAHOO.util.Event.getPageX(e) - imgPos[0];
23        var y = img.height-(YAHOO.util.Event.getPageY(e) - imgPos[1]);
24
25        var s6x = Math.round(x/6);
26        var s6y = Math.round(y/6);
27
28        window.location=("map.html#" + s6x + "," + s6y + ",3");
29
30        YAHOO.util.Event.stopEvent(e);
31}
32
33  YAHOO.util.Event.addListener("link", "click", click);
34
35</script>
36
37</html>
Note: See TracBrowser for help on using the repository browser.