// This script is Copyright Hawke's Bay Web Pages.
// All rights reserved.

if(document.all || document.layers){
	document.write("<DIV ID='NSbuffer' STYLE='top:0;left:0;width:1;height:1;position:absolute;visibility:hidden;z-index:1;'></DIV>"+
		"<DIV ID='about' STYLE='top:46;left:242px;width:156px;height:120;position:absolute;visibility:hidden;z-index:20;'>"+
			"<TABLE CELLPADDING=1 CELLSPACING=0 BORDER=0 BGCOLOR='#FFFFFF'>"+
			"<TR><TD>"+
				"<TABLE CELLPADDING=7 CELLSPACING=0 BORDER=0 BGCOLOR='#000000' width='156'>"+
				"<TR>"+
				"<TD NOWRAP><FONT FACE='verdana,helvetica,arial'>"+ 
			  	"<A HREF='http://home.ramhb.co.nz/about/#intro' CLASS='dl'>Introduction</A><BR>"+ 
			  	"<A HREF='http://home.ramhb.co.nz/about/#history' CLASS='dl'>History</A><BR>"+ 
				"<A HREF='http://home.ramhb.co.nz/about/#team' CLASS='dl'>The Team</A><BR>"+ 
				"</FONT></TD></TR></TABLE>"+
			"</TD></TR></TABLE>"+
		"</DIV>"+
		"<DIV ID='services' STYLE='top:46;left:294;width:156px;height:240;position:absolute;visibility:hidden;z-index:21;'>"+
			"<TABLE CELLPADDING=1 CELLSPACING=0 BORDER=0 BGCOLOR='#FFFFFF'>"+
			"<TR><TD>"+
				"<TABLE CELLPADDING=7 CELLSPACING=0 BORDER=0 BGCOLOR='#000000' width='156'>"+
				"<TR>"+
				"<TD NOWRAP><FONT FACE='verdana,helvetica,arial'>"+
				"<A HREF='http://home.ramhb.co.nz/services/#connections' CLASS='dl'>Connections</A><BR>"+
				"<A HREF='http://home.ramhb.co.nz/services/#dns' CLASS='dl'>Domain Names</A><BR>"+
				"<A HREF='http://home.ramhb.co.nz/services/#email' CLASS='dl'>Email</A><BR>"+
				"<A HREF='http://home.ramhb.co.nz/services/#servers' CLASS='dl'>Network Servers</A><BR>"+
				"<A HREF='http://home.ramhb.co.nz/services/#programming' CLASS='dl'>Programming</A><BR>"+
				"<A HREF='http://home.ramhb.co.nz/services/#radio' CLASS='dl'>Radio Networking</A><BR>"+
				"<A HREF='http://home.ramhb.co.nz/services/#webdesign' CLASS='dl'>Web Design</A><BR>"+
				"<A HREF='http://home.ramhb.co.nz/services/#hosting' CLASS='dl'>Web Hosting</A><BR>"+
				"</FONT></TD></TR></TABLE>"+
			"</TD></TR></TABLE>"+
		"</DIV>"+
		"<DIV ID='support' STYLE='top:46;left:361;width:156px;height:127;position:absolute;visibility:hidden;z-index:22;'>"+
			"<TABLE CELLPADDING=1 CELLSPACING=0 BORDER=0 BGCOLOR='#FFFFFF'>"+
			"<TR><TD>"+
				"<TABLE CELLPADDING=7 CELLSPACING=0 BORDER=0 BGCOLOR='#000000' width='156'>"+
				"<TR>"+
				"<TD NOWRAP><FONT FACE='verdana,helvetica,arial'>"+
				"<A HREF='http://home.ramhb.co.nz/support/#downloads' CLASS='dl'>Downloads</A><BR>"+
				"<A HREF='http://home.ramhb.co.nz/support/#faqs' CLASS='dl'>FAQ's</A><BR>"+
				"<A HREF='http://home.ramhb.co.nz/support/#trouble' CLASS='dl'>Troubleshooting</A><BR>"+
				"</FONT></TD></TR></TABLE>"+
			"</TD></TR></TABLE>"+
		"</DIV>"+
		"<DIV ID='contact' STYLE='top:46;left:427;width:156px;height:120;position:absolute;visibility:hidden;z-index:23;'>"+
			"<TABLE CELLPADDING=1 CELLSPACING=0 BORDER=0 BGCOLOR='#FFFFFF'>"+
			"<TR><TD>"+
				"<TABLE CELLPADDING=7 CELLSPACING=0 BORDER=0 BGCOLOR='#000000' width='156'>"+
				"<TR>"+
				"<TD NOWRAP><FONT FACE='verdana,helvetica,arial'>"+
				"<A HREF='http://home.ramhb.co.nz/contact/#general' CLASS='dl'>General</A><BR>"+
				"<A HREF='http://home.ramhb.co.nz/contact/#ross' CLASS='dl'>Ross Allan</A><BR>"+
				"<A HREF='http://home.ramhb.co.nz/contact/#joel' CLASS='dl'>Joel Macklow</A><BR>"+
				"<A HREF='http://home.ramhb.co.nz/contact/#mary' CLASS='dl'>Mary Allan</A><BR>"+
				"</FONT></TD></TR></TABLE>"+
			"</TD></TR></TABLE>"+
		"</DIV>"+
		"<DIV ID='search' STYLE='top:46;left:512;width:100px;height:20;position:absolute;visibility:hidden;z-index:24;'>"+
			"<form method='post' action='http://home.ramhb.co.nz/search/search.htm' name='form'><TABLE CELLPADDING=1 CELLSPACING=0 BORDER=0 BGCOLOR='#FFFFFF'><TR><TD>"+
				"<TABLE CELLPADDING=7 CELLSPACING=0 BORDER=0 BGCOLOR='#000000' width='100'><TR><TD>"+
				"<font face='verdana,helvetica,arial' size='1' color='#FFFFFF'>Search</font><br>"+
				"<input type='text' name='words' <% if (eregi('(MSIE.[45])',$HTTP_USER_AGENT)): %>class='find'<% endif %>><input type='hidden' name='config' value='ramhb'>"+
				"</TD></TR></TABLE>"+
			"</TD></TR></TABLE></form>"+
		"</DIV>" )
	}

var layerRef;
var layerStyle;
var menuName;
var x=0;
var y=0;

var xLoc=0;
var yLoc=0;

var isXLocked=0;

function mouseMove(e){
	if(document.all && ready == "yes"){
		x=event.x;
		y=event.y;
		menuOff(x,y);
		}
	if(document.layers && ready == "yes"){
		x=e.pageX;
		y=e.pageY;
		menuOff(x,y);
		}}

if (document.all){
	document.onmousemove = mouseMove;
	layerRef = "document.all";
	layerStyle = ".style"; }
if (document.layers){
	document.onmousemove = mouseMove;
	document.captureEvents(Event.MOUSEMOVE);
	layerRef = "document.layers";
	layerStyle = ""; }

function showLayer(layerName){
	eval(layerRef+'["'+layerName+'"]'+layerStyle+'.visibility="visible"') }

function hideLayer(layerName){
	eval(layerRef+'["'+layerName+'"]'+layerStyle+'.visibility="hidden"') 
}

function moveLayer(layerName,top,left){
//      eval(layerRef+'["'+layerName+'"]'+layerStyle+'.top=top')
//      eval(layerRef+'["'+layerName+'"]'+layerStyle+'.left=left') 
}

function rem(){
	if(document.all || document.layers){
	hideLayer("about");
	hideLayer("services");
	hideLayer("support");
	hideLayer("contact");
	hideLayer("search");
	}}

function menuOn(lName){
	if(document.all || document.layers){

	rem();

	yLoc = y;
	xLoc = x;

	menuName = lName;
	moveLayer(lName,yLoc-0,xLoc+0);
	showLayer(lName);

	}}

function menuOff(xcord,ycord){
	if(xcord < xLoc-64){ rem(); }
	if(ycord < yLoc-32){ rem(); }

	if(xcord < xLoc+32 && ycord > yLoc+100){ rem(); }

	if(menuName == "about" && xcord > xLoc+130){ rem(); }
	if(menuName == "about" && ycord > yLoc+65){ rem(); }

	if(menuName == "services" && xcord > xLoc+130){ rem(); }
	if(menuName == "services" && ycord > yLoc+200){ rem(); }

	if(menuName == "support" && xcord > xLoc+130){ rem(); }
	if(menuName == "support" && ycord > yLoc+80){ rem(); }

	if(menuName == "contact" && xcord > xLoc+130){ rem(); }
	if(menuName == "contact" && ycord > yLoc+80){ rem(); }

	if(menuName == "search" && xcord > xLoc+120){ rem(); }
	if(menuName == "search" && ycord > yLoc+80){ rem(); }
	}

	ready = "yes";