/* 
	the format of the tree definition file is simple,
	you can find specification in the product documentation at:
	
	http://www.softcomplex.com/products/tigra_tree_menu_pro/docs/#hierarchy
*/

var TREE_ITEMS = [
	['<img name="home" src="images/home.gif" width=133 height=30 border=0 alt="Home">', 'index.php', {'tw' : '_top', 'fn' : '1', 'sb' : 'Home', 'hs' : 'toggleHandler', 'hv' : 'changeImages("home", "images/homeon.gif");', 'hu' : 'changeImages("home", "images/home.gif");'}],
	['<img name="cottages" src="images/cottages.gif" width=133 height=30 border=0 alt="Other Cottages">', '', {'tw' : '_top', 'fn' : '1', 'sb' : 'Other Cottages', 'hs' : 'toggleHandler', 'hv' : 'changeImages("cottages", "images/cottageson.gif");', 'hu' : 'changeImages("cottages", "images/cottages.gif");'},
		['<img name="shearers" src="images/shearers.gif" width=114 height=30 border=0 alt="The Shearers Quarters">', 'http://www.TheShearersQuarters.com', {'tw' : '_top', 'sb' : 'The Shearers Quarters', 'hv' : 'changeImages("shearers", "images/shearerson.gif");', 'hu' : 'changeImages("shearers", "images/shearers.gif");'}],
		['<img name="servants" src="images/servants.gif" width=114 height=30 border=0 alt="The Servants Quarters">', 'http://www.TheServantsQrtrs.com', {'tw' : '_top', 'sb' : 'The Servants Quarters', 'hv' : 'changeImages("servants", "images/servantson.gif");', 'hu' : 'changeImages("servants", "images/servants.gif");'}],
		['<img name="shearingshed" src="images/shearingshed.gif" width=114 height=30 border=0 alt="The Shearing Shed">', 'http://www.TheShearingShed.com', {'tw' : '_top', 'sb' : 'The Shearing Shed', 'hv' : 'changeImages("shearingshed", "images/shearingshedon.gif");', 'hu' : 'changeImages("shearingshed", "images/shearingshed.gif");'}]
	],
	['<img name="l1" src="images/location.gif" width=133 height=30 border=0 alt="Location">', 'location.php', {'tw' : '_top', 'fn' : '1', 'sb' : 'Location', 'hs' : 'toggleHandler', 'hv' : 'changeImages("l1", "images/locationon.gif");', 'hu' : 'changeImages("l1", "images/location.gif");'}],
	['<img name="bookings" src="images/bookings.gif" width=133 height=30 border=0 alt="Bookings">', 'bookings.php', {'tw' : '_top', 'fn' : '1', 'sb' : 'Bookings', 'hs' : 'toggleHandler', 'hv' : 'changeImages("bookings", "images/bookingson.gif");', 'hu' : 'changeImages("bookings", "images/bookings.gif");'}],
	['<img name="whatson" src="images/whatson.gif" width=133 height=30 border=0 alt="What To Do">', '', {'tw' : '_top', 'fn' : '1', 'sb' : 'What To Do', 'hs' : 'toggleHandler', 'hv' : 'changeImages("whatson", "images/whatsonon.gif");', 'hu' : 'changeImages("whatson", "images/whatson.gif");'},
		['<img name="attractions" src="images/attractions.gif" width=114 height=30 border=0 alt="Attractions">', 'attractions.php', {'tw' : '_top', 'sb' : 'Attractions', 'hv' : 'changeImages("attractions", "images/attractionson.gif");', 'hu' : 'changeImages("attractions", "images/attractions.gif");'}],
		['<img name="bushwalking" src="images/bushwalking.gif" width=114 height=30 border=0 alt="Bushwalking">', 'bushwalking.php', {'tw' : '_top', 'sb' : 'Bushwalking', 'hv' : 'changeImages("bushwalking", "images/bushwalkingon.gif");', 'hu' : 'changeImages("bushwalking", "images/bushwalking.gif");'}],
		['<img name="eatingout" src="images/eatingout.gif" width=114 height=30 border=0 alt="Eating Out">', 'eatingout.php', {'tw' : '_top', 'sb' : 'Eating Out', 'hv' : 'changeImages("eatingout", "images/eatingouton.gif");', 'hu' : 'changeImages("eatingout", "images/eatingout.gif");'}],
		['<img name="4x4" src="images/fourx4.gif" width=114 height=30 border=0 alt="4 x 4">', '4x4.php', {'tw' : '_top', 'sb' : '4 x 4', 'hv' : 'changeImages("4x4", "images/fourx4on.gif");', 'hu' : 'changeImages("4x4", "images/fourx4.gif");'}],
		['<img name="fishing" src="images/fishing.gif" width=114 height=30 border=0 alt="Fishing">', 'fishing.php', {'tw' : '_top', 'sb' : 'Fishing', 'hv' : 'changeImages("fishing", "images/fishingon.gif");', 'hu' : 'changeImages("fishing", "images/fishing.gif");'}],
		['<img name="markets" src="images/markets.gif" width=114 height=30 border=0 alt="Markets">', 'markets.php', {'tw' : '_top', 'sb' : 'Markets', 'hv' : 'changeImages("markets", "images/marketson.gif");', 'hu' : 'changeImages("markets", "images/markets.gif");'}]
	],
	['<img name="tariff" src="images/tariff.gif" width=133 height=30 border=0 alt="Tariff">', 'tariff.php', {'tw' : '_top', 'fn' : '1', 'sb' : 'Tariff', 'hs' : 'toggleHandler', 'hv' : 'changeImages("tariff", "images/tariffon.gif");', 'hu' : 'changeImages("tariff", "images/tariff.gif");'}],
	['<img name="guestbook" src="images/guestbook.gif" width=133 height=30 border=0 alt="Guestbook">', 'guestbook.php', {'tw' : '_top', 'fn' : '1', 'sb' : 'Guest Book', 'hs' : 'toggleHandler', 'hv' : 'changeImages("guestbook", "images/guestbookon.gif");', 'hu' : 'changeImages("guestbook", "images/guestbook.gif");'}],
	['<img name="photogallery" src="images/photogallery.gif" width=133 height=30 border=0 alt="Photo Gallery">', 'photogallery.php', {'tw' : '_top', 'fn' : '1', 'sb' : 'Photo Gallery', 'hs' : 'toggleHandler', 'hv' : 'changeImages("photogallery", "images/photogalleryon.gif");', 'hu' : 'changeImages("photogallery", "images/photogallery.gif");'}]
];

function toggleHandler (o_item) {
	// get current block
	var a_curblock = o_item.o_parent.a_children;

	// close all nodes except current
	for (var i = 0; i < a_curblock.length; i++)
		if (a_curblock[i].n_state & 48 && a_curblock[i] != o_item)
			a_curblock[i].open(true);
	TREES['0'].toggle(o_item.n_id);

	// proceed to default handler
	return true;
}

