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 FlowMap.txt here

  Hotspot(275,427,3,"Opouteke","Opouteke at Suspension Bridge");
  Hotspot(150,254,3,"Spillway","Whangatane Spillway at Donald Road");
  Hotspot(157,264,3,"Puriri","Tarawhataroa at Puriri Place");
  Hotspot(170,245,3,"Meffin","Te Puhi at Meffin Road");
  Hotspot(156,230,3,"BenGunn","Awanui at Ben Gunn Wharf");
  Hotspot(175,274,3,"Grays","Takahue at Gray's");
  Hotspot(188,267,3,"VicValley","Victoria at Victoria Valley Road");
  Hotspot(271,260,3,"Waiere","Kaeo at Waiare Road");
  Hotspot(255,250,3,"Outlet","Kaeo at Whangaroa Road");
  Hotspot(260,255,3,"Firestation","Kaeo at Fire Station");
  Hotspot(295,280,3,"Rangitane","Rangitane at Stirlings");
  Hotspot(316,332,3,"Waiharakeke","Waiharakeke at Willowbank Moerewa");
  Hotspot(338,311,3,"Veronica","Veronica Channel at Opua");
  Hotspot(243,427,3,"Kaihu","Kaihu at Gorge");
  Hotspot(319,398,3,"Hikurangi","Hikurangi at Moengawahine");
  Hotspot(321,420,3,"Mangakahia","Mangakahia at Titoki Bridge");
  Hotspot(361,367,3,"Waiotu","Waiotu at SH 1 Bridge");
  Hotspot(370,371,3,"Whakapara","Whakapara at Cableway");
  Hotspot(340,419,3,"Waipao","Waipao at Draffins Rd");
  Hotspot(344,399,3,"Wairua","Wairua at Purua");
  Hotspot(343,411,3,"Mangere","Mangere at Knights Rd");
  Hotspot(331,419,3,"WairuaBridge","Wairua at Wairua Bridge");
  Hotspot(335,478,3,"Manganui","Manganui at Permanent Stations");
  Hotspot(270,472,3,"Dargaville","Northern Wairoa at Dargaville");
  Hotspot(378,397,3,"Mangahahuru","Mangahahuru at County Weir");
  Hotspot(348,585,3,"Kaipara","Kaipara Harbour at Pouto Point");
  Hotspot(239,349,3,"Punakitere","Punakitere at Taheke");
  Hotspot(404,386,3,"Ngunguru","Ngunguru at Dugmore's Rock");
  Hotspot(350,430,3,"WaiarohiaLover","Waiarohia at Lover's Lane");
  Hotspot(345,425,3,"Raumanga","Raumanga at Bernard St");
  Hotspot(414,447,3,"MarsdenPoint","Whangarei Harbour at Marsden Point");
  Hotspot(397,457,3,"Ruakaka","Ruakaka at Flyger Rd");
  Hotspot(410,493,3,"Waionehu","Waionehu at McLean Rd");
  Hotspot(399,473,3,"NorthApple","North at Applecross Rd");
  Hotspot(402,490,3,"Waihoihoi","Waihoihoi at St Mary's Rd");
  Hotspot(394,488,3,"Ahurora","Ahurora at Braigh");
  Hotspot(138,207,3,"BigFlat","Selwyn Swamp at Big Flat Road");
  Hotspot(400,422,3,"Hatea","Hatea at Whareora Road");
  Hotspot(255,240,3,"WhangaroaBGFC","Whangaroa Harbour at Big Game Fish Club");
  Hotspot(330,330,3,"Tirohanga","Tirohanga at Below Old Mill");
  Hotspot(387,430,3,"HateaTide","Hatea at Town Basin");
  Hotspot(377,440,3,"Otaika","Otaika at Kays");
  Hotspot(270,460,3,"KaihuTide","Kaihu at Parore Cut");
  Hotspot(360,430,3,"Kirikiri","Kirikiri at Cheviot Street Footbridge");
  Hotspot(295,311,3,"Waiaruhe","Waiaruhe at Puketona");
  Hotspot(275,300,3,"WaimateNorth","Waitangi at Waimate North Road");
  Hotspot(295,290,3,"Puketotara","Puketotara at BOI Golf Club");
  Hotspot(404,397,3,"Kiripaka","Ngunguru at Kiripaka");
  Hotspot(410,540,3,"Hakaru","Hakaru at Topuni Creek farm");


 // End of FlowMap.txt

 html += "</P>"
 var hs = document.getElementById("HotSpots")
 hs.innerHTML = html;
 }

function Hotspot(x, y, z, ShortName, Title)
 {
 var y1 = y - 650 - nspots*10;
 var x1 = x - 10;
 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=10 height=10 alt="' + Title + '" src="/upload/hydro/' + ShortName + '_HotSpot.gif">';
 anchor += '</A></DIV>';

 html += anchor;
 nspots = nspots + 1;
 }

window.onload = init; 
