// Java script data for TL NSW side menu
//
// Exports:
//	"menu_nsw" is var array = 
//		[ { url:url-string, title:name-string, level:numeric }, ... ]
//
//	where:
//		"url" is the file portion of the URL;
//		"title" is the menu title to be displayed; and 
//		"level" is the menu level (0=main menu, 1=1st sub-menu, etc.)
//
// Changes (reverse order please):
//	26 May 2006, PAKW, move newsletters to national level
// 	24 Sep 2010, PAKW, add ACT group
//	26 May 2006, PAKW, move newsletters to national level
//	16 Feb 2006, PAKW, reopen state subdomain pages for IE (ok with Mozilla)
//	13 Feb 2006, PAKW, revert to relative links
//	11 Feb 2006, PAKW, upload to Webcity; 
//	5 Feb 2006, PAKW, initial version
//
// Copyright (C) 2006 Paul Williams 
//	Developed for TOUGHLOVE Australia Association Inc.

var root = "..";

var menu_nsw = [
	{url: root + "/about_us.htm", title: "About Us", level: 0},
	{url: root + "/professionals.htm", title: "Professionals", level: 0},
	{url: root + "/materials.htm", title: "Materials", level: 0},
	{url: root + "/donations.htm", title: "Donations", level: 0},
	{url: root + "/stories.htm", title: "Stories", level: 0},
	{url: root + "/faqs.htm", title: "FAQs", level: 0},
	{url: root + "/newsletters/index.htm", title: "Newsletters", level: 0},
	{url: root + "/findgroups.htm", title: "Find groups", level: 0},
	{url: root + "/act/index.htm", title: "A.C.T.", level: 1},

	// start of NSW pages
	{url: "index.htm", title: "N.S.W.", level: 1},
	//{url: "whats_on.htm", title: "What's on", level: 2},
	{url: "groups.htm", title: "Groups", level: 2},
	{url: "contact_us.htm", title: "Contact us", level: 2},
	{url: "payment.htm", title: "Payment", level: 2},
	// end of NSW pages

	{url: root + "/qld/index.htm", title: "Queensland", level: 1},
	{url: root + "/sa/index.htm", title: "S.A.", level: 1},
	{url: root + "/vic/index.htm", title: "Victoria", level: 1},
	{url: root + "/start_a_group.htm", title: "Start a group", level: 1} // no comma
];

// Reopen page if menu script (located in root/common) not found. 
// [Problem is caused when the page is opened in a STATE.toughlove.org.au
// subdomain, which makes the menu script unaccessible. The workaround is
// is to reopen in the parent domain, as toughlove.org.au/STATE.]
var ok;
if (ok == undefined)
{
	var page = location.href.substr(location.href.lastIndexOf("/") + 1);
	window.open("http://toughlove.org.au/nsw/" + page, "_top");
}

