/*

Function to open new browser window containing 1:25000 scale Multimap for six-figure UK grid reference.

The GR should be the only content with HTML link tags. The function should always be called with an argument of 'this' (without quotes).

Example:

     <a href="http://www.multimap.com/" title="Open Multimap in a new window"
     onClick="openMap(this); return false" target="_blank">TR151579</a> 

The script extracts the GR from the content of the link tags (sent as 'this'). The 'href' and 'target' attributes are for those without Javascript, or who have (old browsers with dodgy DOM). The 'return false' within the onClick prevents the default link action when the script is successful.

*/

function openMap(that) {
	gridref = that.childNodes[0].nodeValue;
	url = 'http://www.multimap.com/map/places.cgi?scale=25000&quicksearch=' + gridref + '&search_result=' + gridref;
	window.open(url);
}

