var html;
var nspots;
function init()
  {
  // Place all the hotspots on the map using JavaScript.
  // I have had enough of Episerver removing my HTML because 
  // it doesn't like it.  Method is to build a string that
  // has the html for all the hot spots, and then use DTHML
  // to render it.
  html = "<P>";
  nspots = 0;

  // Insert RainMap.txt here

  Hotspot(180,276,3,"TeRore","Takahue at Te Rore");
  Hotspot(194,267,3,"Mangakawa","Te Puhi at Mangakawakawa Trig");
  Hotspot(269,271,3,"Kaeo","Kaeo at Bramleys");
  Hotspot(169,310,3,"Kohe","Rotokakahi at Kohe Road");
  Hotspot(285,322,3,"Ohaeawai","Waitangi at Ohaeawai");
  Hotspot(183,364,3,"Opononi","Hokianga Harbour at Opononi Omapere");
  Hotspot(239,400,3,"Tutamoe","Waima at Tutamoe");
  Hotspot(273,404,3,"Brookvale","Opouteke at Brookvale");
  Hotspot(284,480,3,"DargavilleAuto","Northern Wairoa at Dargaville Wharf");
  Hotspot(399,312,3,"Opua","Veronica Channel at Opua");
  Hotspot(384,332,3,"TeKapua","Oakura Bay at Te Kapua Street");
  Hotspot(372,361,3,"Puhipuhi","Whakapara at Puhipuhi");
  Hotspot(347,387,3,"Okarika","Okarika at Rowland Road Hikurangi Swamp");
  Hotspot(385,400,3,"Glenbervie","Hatea at Glenbervie Forest HQ");
  Hotspot(405,385,3,"Polerain","Ngunguru at Dugmore's Rock");
  Hotspot(380,418,3,"Office","Waiarohia at Water Street NRC");
  Hotspot(415,448,3,"Marsden","Whangarei Harbour at Marsden Point");
  Hotspot(400,465,3,"Wilson","Waiwarawara at Wilson's Dam");
  Hotspot(399,501,3,"Brynderwyn","Waihoihoi at Brynderwyn");
  Hotspot(326,523,3,"Wallace","Awaroa at Wallace Road Ruawai");
  Hotspot(385,512,3,"Maungaturoto","Paparoa at Maungaturoto");
  Hotspot(366,518,3,"Taylors","Paparoa at Taylors");
  Hotspot(421,516,3,"Tara","Tara at Tara");
  Hotspot(348,583,3,"Pouto","Kaipara Harbour at Pouto Point");
  Hotspot(290,240,3,"Weta","Touwai at Weta Trig");
  Hotspot(220,230,3,"Oruru","Oruru at Bowling Club");
  Hotspot(326,361,3,"WaiharakekeRain","Waiharakeke at Okaroro Road Motatau");
  Hotspot(347,418,3,"WaipaoRain","Waipao at Draffin Road");
  Hotspot(360,465,3,"Waikokopa","Waikokopa at McDonnell Road Springfield");
  Hotspot(284,300,3,"WiroaRd","Waitangi at Wiroa Road");
  Hotspot(320,347,3,"Ngapipito","Otiria at Ngapipito");
  Hotspot(320,300,3,"BOIGolfClub","Kerikeri at BOI Golf Club");
  Hotspot(421,553,3,"Topuni","Hakaru at Topuni Creek Farm");
  Hotspot(169,267,3,"LamerRd","Tarawhataroa at Lamer Rd");





  // End of RainMap.txt


  html += "</P>"
  var hs = document.getElementById("HotSpots")
  hs.innerHTML = html;
  }

function Hotspot(x, y, z, ShortName, Title)
  {
  var y1 = y - 650 - nspots*28;
  var x1 = x - 28;

  var anchor;
  anchor =  '<DIV><A title="' + Title + '" style="z-index: ' + z + '; position: relative; ';
  anchor += 'left: ' + x1 + 'px; top: ' + y1 + 'px" ';
  anchor += 'href="Graphs/?Site=' + ShortName + '">';
  anchor += '<IMG width=40 height=28 alt="' + Title + '" src="/upload/hydro/' + ShortName + '_HotSpot.gif">';
  anchor += '</A></DIV>';

  html += anchor;
  nspots = nspots + 1;
  }

window.onload = init;


