HM_UserAgent = navigator.userAgent;

      HM_DOM = (document.getElementById) ? true : false;

      HM_NS4 = (document.layers) ? true : false;

       HM_IE = (document.all) ? true : false;

      HM_IE4 = HM_IE && !HM_DOM;

      HM_Mac = (navigator.appVersion.indexOf("Mac") != -1);

     HM_IE4M = HM_IE4 && HM_Mac;



HM_Opera = (window.opera) ? true : false;

HM_Chrome = (window.chrome) ? true : false;



if(HM_Opera) {

    HM_BrowserPattern = /Opera(\/| )(\d+.*)/;

    HM_VersionSupported = 7;

}



HM_Konqueror = (HM_UserAgent.indexOf("Konqueror")!=-1);

if(HM_Konqueror) {

    HM_BrowserPattern = /(Konqueror\/)(\d+.*)/;

    HM_VersionSupported = 3;

}



if(HM_Opera || HM_Konqueror) {

    if (HM_UserAgent.match) {

       HM_Matches = HM_UserAgent.match(HM_BrowserPattern);

       if (HM_Matches&&HM_Matches[2]) {

          HM_BrowserVersion = parseFloat(HM_Matches[2]);

       } else HM_BrowserVersion = 0;

       HM_IsMenu = (HM_BrowserVersion >= HM_VersionSupported);

    } else {

       HM_BrowserVersion = 0;

       HM_IsMenu = false;

    }

} else {

    HM_BrowserVersion = 0;

    HM_IsMenu = !HM_IE4M && (HM_DOM || HM_NS4 || HM_IE4 );

}



if(window.event + "" == "undefined") event = null;

function HM_f_PopUp(){return false};

function HM_f_PopDown(){return false};

popUp = HM_f_PopUp;

popDown = HM_f_PopDown;



HM_GL_MenuWidth          = 150;

HM_GL_FontFamily         = "Arial,sans-serif";

HM_GL_FontSize           = 9;

HM_GL_FontBold           = false;

HM_GL_FontItalic         = false;

HM_GL_FontColor          = "black";

HM_GL_FontColorOver      = "white";

HM_GL_BGColor            = "transparent";

HM_GL_BGColorOver        = "transparent";

HM_GL_ItemPadding        = 3;



HM_GL_BorderWidth        = 1;

HM_GL_BorderColor        = "red";

HM_GL_BorderStyle        = "solid";

HM_GL_SeparatorSize      = 1;

HM_GL_SeparatorColor     = "yellow";



HM_GL_ImageSrc = "HM_More_black_right.gif";

HM_GL_ImageSrcLeft = "HM_More_black_left.gif";



HM_GL_ImageSrcOver = "HM_More_white_right.gif";

HM_GL_ImageSrcLeftOver = "HM_More_white_left.gif";



HM_GL_ImageSize          = 5;

HM_GL_ImageHorizSpace    = 5;

HM_GL_ImageVertSpace     = 5;



HM_GL_KeepHilite         = false;

HM_GL_ClickStart         = false;

HM_GL_ClickKill          = 0;

HM_GL_ChildOverlap       = 40;

HM_GL_ChildOffset        = 10;

HM_GL_ChildPerCentOver   = null;

HM_GL_TopSecondsVisible  = .5;

HM_GL_ChildSecondsVisible = .3;

HM_GL_StatusDisplayBuild = 1;

HM_GL_StatusDisplayLink  = 1;

HM_GL_UponDisplay        = null;

HM_GL_UponHide           = null;



HM_GL_RightToLeft        = false;

HM_GL_CreateTopOnly      = true;

HM_GL_ShowLinkCursor     = true;



HM_GL_ScrollEnabled = true;

HM_GL_ScrollOver=true;

HM_GL_ScrollBarHeight = 16;

HM_GL_ScrollBarColor = "lightgrey";

HM_GL_ScrollImgSrcTop = "HM_More_black_top.gif";

HM_GL_ScrollImgSrcBot = "HM_More_black_bot.gif";

HM_GL_ScrollImgWidth = 9;

HM_GL_ScrollImgHeight = 5;

HM_GL_ScrollBothBars = true;

HM_MacN7=(HM_Mac&&

         (HM_UserAgent.indexOf('Netscape/7')!=-1))

         ?true:false;

HM_GL_ScrollInterval = (HM_MacN7) ? 100 : 20;



HM_GL_HoverTimeTop  = 0;

HM_GL_HoverTimeTree = 0;



HM_GL_ImageDir = "scripts/";

HM_ScriptDir   = HM_GL_ImageDir;

Nodirect = "";

var LocationMap=document.getElementById('LocationMap');

var MainLocationMap=document.getElementById('MainLocationMap');

HM_IsFireFox = (HM_UserAgent.indexOf("Firefox")!=-1);

// The following function is included to illustrate the JS 

// expression handling of the left_position and top_position 

// parameters. You may delete if you have no use for it


function HM_f_CenterMenu(topmenuid) {

	var MinimumPixelLeft = 0;

	var TheMenu = HM_DOM ? HM_MenusTarget.document.getElementById(topmenuid) : HM_MenusTarget[topmenuid];

	var TheMenuWidth = HM_DOM ? parseInt(TheMenu.style.width) + ((HM_IEnoDTD || HM_OperaQuirk) ? 0 : HM_BorderWidth * 2) : HM_IE4 ? TheMenu.style.pixelWidth : TheMenu.clip.width;

	var TheWindowWidth = HM_IE ? (HM_DOM ? HM_Canvas.clientWidth : HM_MenusTarget.document.body.clientWidth) : HM_MenusTarget.innerWidth;

	return Math.max(parseInt((TheWindowWidth-TheMenuWidth) / 2),MinimumPixelLeft);

}



if(HM_IsMenu) {

	HM_BrowserString = HM_NS4 ? "NS4" : HM_DOM ? "DOM" : "IE4";

	document.write("<SCR" + "IPT LANGUAGE='JavaScript1.2' SRC='" + HM_ScriptDir + "HM_Arrays.js' TYPE='text/javascript'><\/SCR" + "IPT>");

	if(LocationMap){

	document.write("<SCR" + "IPT LANGUAGE='JavaScript1.2' SRC='" + Nodirect + "Contact_Locations.php' TYPE='text/javascript'><\/SCR" + "IPT>");

	}

	if(MainLocationMap){

    var Branch=document.getElementById('SelectedLocation').value;

	document.write("<SCR" + "IPT LANGUAGE='JavaScript1.2' SRC='" + Nodirect + "Main_Contact_Locations.php?Branch="+Branch+"' TYPE='text/javascript'><\/SCR" + "IPT>");

	}

	document.write("<SCR" + "IPT LANGUAGE='JavaScript1.2' SRC='" + HM_ScriptDir + "HM_Script"+ HM_BrowserString +".js' TYPE='text/javascript'><\/SCR" + "IPT>");

}

currentwidth=getWidth();

if(LocationMap){

if(HM_IsFireFox){

	document.getElementById('SignupSpacer').height=12;

}

MM_preloadImages('images/Maps/Bay_Plenty.jpg','images/Maps/HawkesBay.jpg','images/Maps/Manawatu.jpg','images/Maps/Marlborough.jpg','images/Maps/Canterbury_Two.jpg','images/Maps/Canterbury_One.jpg','images/Maps/Sth_Canterbury.jpg','images/Maps/Nth_Otago.jpg','images/Maps/Central_Otago.jpg','images/Maps/Southland_Two.jpg','images/Maps/Southland_One.jpg','images/Maps/Wairarapa.jpg')

}

if(MainLocationMap){

MM_preloadImages('images/MainMaps/Bay_Plenty.jpg','images/MainMaps/HawkesBay.jpg','images/MainMaps/Manawatu.jpg','images/MainMaps/Marlborough.jpg','images/MainMaps/Canterbury_Two.jpg','images/MainMaps/Canterbury_One.jpg','images/MainMaps/Sth_Canterbury.jpg','images/MainMaps/Nth_Otago.jpg','images/MainMaps/Central_Otago.jpg','images/MainMaps/Southland_Two.jpg','images/MainMaps/Southland_One.jpg','images/MainMaps/Wairarapa.jpg')

}

//Pagespacing

var Spacing=document.getElementById('BrSpacer');

if(Spacing){

var topLoc=calmenutop('BrSpacer');

topLoc=eval(topLoc+24);

var botLoc=calmenutop('FooterJoiner');

var contentHeight=eval(botLoc-topLoc-93);

document.getElementById('InformationContainer').height=contentHeight;

}

//HP Height Adjustments

var LeftColSpacer=document.getElementById('LeftColumnSpacerTop');

if(LeftColSpacer){

TopCaptionSpacerHeight=document.getElementById('TopCaptionSpacer').height;

LocationDetailsHeight=document.getElementById('LocationContainer').height;



//Height of Left Menu column***********************

var BotSpacerLoc=calmenutop('LeftColumnSpacerBot');

var TopSpacerLoc=calmenutop('LeftColumnSpacerTop');

TopSpacerLoc=eval(TopSpacerLoc-24);

LColHeight=eval(BotSpacerLoc-TopSpacerLoc);

//alert(LColHeight);

//**********************************************

//Height of middle column***********************

var MidBotSpacerLoc=calmenutop('LastSpacer');

MidBotSpacerLoc=eval(MidBotSpacerLoc-8)

MidColHeight=eval(MidBotSpacerLoc-TopSpacerLoc);

//alert(MidColHeight);

//**********************************************

//Height of location 

var EnquiryImageLoc=calmenutop('EnquiryImage');

EnquiryImageLoc=eval(EnquiryImageLoc-46);

var LocBotSpace=calmenutop('MapBotSpacer');

RColHeight=eval(LocBotSpace-EnquiryImageLoc);

//alert(RColHeight);

//********************************************

//Adjustment to Top Caption Image

if(MidColHeight>LColHeight){

MidColadjustmentNeeded=eval(MidColHeight-LColHeight);

TopcaptionHeight=eval(TopCaptionSpacerHeight-MidColadjustmentNeeded);

document.getElementById('TopCaptionSpacer').height=TopcaptionHeight;

}

//Adjustment to Location Panel

if(RColHeight>LColHeight){

LocColadjustmentNeeded=eval(RColHeight-LColHeight);

LocationPanelHeight=eval(LocationDetailsHeight-MidColadjustmentNeeded);

document.getElementById('LocationContainer').height=LocationPanelHeight;

}

}



var ProductID;

PageIDMenu=new Array();

PageIDMenu[0]="Home";

PageIDMenu[1]="Pumping";

PageIDMenu[2]="Irrigation";

PageIDMenu[3]="Filtration";

PageIDMenu[4]="Stockwater";

PageIDMenu[5]="Monitoring";

PageIDMenu[6]="Maintenance";

if(ProductID){

document.getElementById(PageIDMenu[ProductID]).className="primaryOn";

}

var SectionID;

PageIDMenu=new Array();

PageIDMenu[0]="Home";

PageIDMenu[1]="Agriculture";

PageIDMenu[2]="Horticulture";

PageIDMenu[3]="Council";

PageIDMenu[4]="Residential";

PageIDMenu[5]="Contact";

if(SectionID){

document.getElementById(PageIDMenu[SectionID]).className="menuOn";

}

var SubsectionID

PageIDMenu=new Array();

PageIDMenu[0]="Home";

PageIDMenu[1]="Projects";

PageIDMenu[2]="Employment";

PageIDMenu[3]="About";



if(SubsectionID){

document.getElementById(PageIDMenu[SubsectionID]).className="secondaryOn";

}

scrollspeed=0;



//end

