/* [nodename, id, name, navigationtext, href, isnavigation, childs[], templatename] */

if (typeof(decodeURIComponent) == 'undefined') {
  decodeURIComponent = function(s) {
    return unescape(s);
  }
}

function jdecode(s) {
    s = s.replace(/\+/g, "%20")
    return decodeURIComponent(s);
}

var POS_NODENAME=0;
var POS_ID=1;
var POS_NAME=2;
var POS_NAVIGATIONTEXT=3;
var POS_HREF=4;
var POS_ISNAVIGATION=5;
var POS_CHILDS=6;
var POS_TEMPLATENAME=7;
var POS_TARGET=8;
var theSitetree=[ 
	['PAGE','701',jdecode('Home'),jdecode(''),'/701.html','true',[],'',''],
	['PAGE','752',jdecode('About+us'),jdecode(''),'/752/index.html','true',[ 
		['PAGE','28601',jdecode('About+NZRA'),jdecode(''),'/752/28601.html','true',[],'','']
	],'',''],
	['PAGE','815',jdecode('What+is+Acupuncture'),jdecode(''),'/815.html','true',[],'',''],
	['PAGE','36101',jdecode('The+Treatment'),jdecode(''),'/36101.html','true',[],'',''],
	['PAGE','794',jdecode('Conditions+Treated'),jdecode(''),'/794/index.html','true',[ 
		['PAGE','69001',jdecode('Allergy'),jdecode(''),'/794/69001.html','true',[],'',''],
		['PAGE','34201',jdecode('Acupuncture+%26+Men'),jdecode(''),'/794/34201.html','true',[],'',''],
		['PAGE','37201',jdecode('Weight+Loss'),jdecode(''),'/794/37201.html','true',[],'',''],
		['PAGE','55001',jdecode('Stop+Smoking'),jdecode(''),'/794/55001.html','true',[],'',''],
		['PAGE','65401',jdecode('Cancer'),jdecode(''),'/794/65401.html','true',[],'',''],
		['PAGE','37222',jdecode('Pain'),jdecode(''),'/794/37222.html','true',[],'',''],
		['PAGE','37243',jdecode('Emotional+Problems'),jdecode(''),'/794/37243.html','true',[],'',''],
		['PAGE','82501',jdecode('Insomnia'),jdecode(''),'/794/82501.html','true',[],'',''],
		['PAGE','93501',jdecode('Headache'),jdecode(''),'/794/93501.html','true',[],'',''],
		['PAGE','37801',jdecode('Stress'),jdecode(''),'/794/37801.html','true',[],'',''],
		['PAGE','155901',jdecode('Immune+System'),jdecode(''),'/794/155901.html','true',[],'','']
	],'',''],
	['PAGE','79901',jdecode('Infertility+%26+IVF'),jdecode(''),'/79901/index.html','true',[ 
		['PAGE','110401',jdecode('Male+Infertility'),jdecode(''),'/79901/110401.html','true',[],'','']
	],'',''],
	['PAGE','22101',jdecode('Pregnancy'),jdecode(''),'/22101/index.html','true',[ 
		['PAGE','79922',jdecode('Labour+'),jdecode(''),'/22101/79922.html','true',[],'',''],
		['PAGE','79943',jdecode('Breech+Baby'),jdecode(''),'/22101/79943.html','true',[],'',''],
		['PAGE','79964',jdecode('Miscarriage'),jdecode(''),'/22101/79964.html','true',[],'',''],
		['PAGE','79985',jdecode('Morning+Sickness'),jdecode(''),'/22101/79985.html','true',[],'',''],
		['PAGE','116701',jdecode('Post+Natal+Care'),jdecode(''),'/22101/116701.html','true',[],'','']
	],'',''],
	['PAGE','98101',jdecode('Gynaecology'),jdecode(''),'/98101/index.html','true',[ 
		['PAGE','98122',jdecode('Menopause'),jdecode(''),'/98101/98122.html','true',[],'',''],
		['PAGE','98143',jdecode('PMS'),jdecode(''),'/98101/98143.html','true',[],'',''],
		['PAGE','98164',jdecode('PCOS'),jdecode(''),'/98101/98164.html','true',[],'',''],
		['PAGE','100101',jdecode('Endometriosis'),jdecode(''),'/98101/100101.html','true',[],'',''],
		['PAGE','98185',jdecode('Period+Pain'),jdecode(''),'/98101/98185.html','true',[],'',''],
		['PAGE','98206',jdecode('Irregular+Periods'),jdecode(''),'/98101/98206.html','true',[],'','']
	],'',''],
	['PAGE','173701',jdecode('Reflexology'),jdecode(''),'/173701.html','true',[],'',''],
	['PAGE','19101',jdecode('ACC+Treatments'),jdecode(''),'/19101.html','true',[],'',''],
	['PAGE','151501',jdecode('Tai+Chi%2FQigong'),jdecode(''),'/151501.html','true',[],'',''],
	['PAGE','149801',jdecode('Costs'),jdecode(''),'/149801.html','true',[],'',''],
	['PAGE','20301',jdecode('Testimonials'),jdecode(''),'/20301.html','true',[],'',''],
	['PAGE','878',jdecode('Find+Us'),jdecode(''),'/878.html','true',[],'',''],
	['PAGE','24401',jdecode('FAQ'),jdecode(''),'/24401.html','true',[],'',''],
	['PAGE','13801',jdecode('Gallery'),jdecode(''),'/13801.html','true',[],'',''],
	['PAGE','74101',jdecode('Site+Map'),jdecode(''),'/74101.html','true',[],'',''],
	['PAGE','85701',jdecode('Links'),jdecode(''),'/85701/index.html','true',[ 
		['PAGE','175801',jdecode('Alterations'),jdecode(''),'/85701/175801.html','true',[],'','']
	],'','']];
var siteelementCount=43;
theSitetree.topTemplateName='Movement';
theSitetree.paletteFamily='003390';
theSitetree.keyvisualId='1819';
theSitetree.keyvisualName='kv_dummy.jpg';
theSitetree.fontsetId='291';
theSitetree.graphicsetId='353';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='003390';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Movement',
				paletteFamily: 	'003390',
				keyvisualId: 	'1819',
				keyvisualName: 	'kv_dummy.jpg',
				fontsetId: 		'291',
				graphicsetId: 	'353',
				contentColor: 	'FFFFFF',
				contentBGColor: '003390',
				a_color: 		'003390',
				b_color: 		'000000',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '701',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '701',
internalId:  '',
customField: '20100719-223949'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '752',
internalId:  '',
customField: '20100713-220349'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28601',
internalId:  '',
customField: '20081108-152603'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '815',
internalId:  '',
customField: '20100425-190910'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36101',
internalId:  '',
customField: '20081108-153000'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '794',
internalId:  '',
customField: '20100621-191801'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69001',
internalId:  '',
customField: '20090413-140008'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34201',
internalId:  '',
customField: '20081108-153946'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37201',
internalId:  '',
customField: '20100421-203135'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55001',
internalId:  '',
customField: '20100503-172200'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65401',
internalId:  '',
customField: '20081108-154356'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37222',
internalId:  '',
customField: '20081216-153952'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37243',
internalId:  '',
customField: '20100128-135942'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82501',
internalId:  '',
customField: '20090413-135640'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '93501',
internalId:  '',
customField: '20080414-223713'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37801',
internalId:  '',
customField: '20090923-180602'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79901',
internalId:  '',
customField: '20100719-224029'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '110401',
internalId:  '',
customField: '20100517-212059'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22101',
internalId:  '',
customField: '20100713-220545'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79922',
internalId:  '',
customField: '20100517-212250'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79943',
internalId:  '',
customField: '20100517-212341'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79964',
internalId:  '',
customField: '20100517-212433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79985',
internalId:  '',
customField: '20100621-191701'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '116701',
internalId:  '',
customField: '20100517-212635'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '98101',
internalId:  '',
customField: '20100719-224051'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '98122',
internalId:  '',
customField: '20100719-224118'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '98143',
internalId:  '',
customField: '20100517-213104'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '98164',
internalId:  '',
customField: '20100517-213157'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '100101',
internalId:  '',
customField: '20100517-213240'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '98185',
internalId:  '',
customField: '20100517-213417'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '98206',
internalId:  '',
customField: '20090128-160732'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19101',
internalId:  '',
customField: '20100502-210854'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20301',
internalId:  '',
customField: '20090128-160934'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '149801',
internalId:  '',
customField: '20100502-211115'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '878',
internalId:  '',
customField: '20090128-161122'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24401',
internalId:  '',
customField: '20100425-191135'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13801',
internalId:  '',
customField: '20090128-161333'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74101',
internalId:  '',
customField: '20090519-181025'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85701',
internalId:  '',
customField: '20100425-191239'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '173701',
internalId:  '',
customField: '20100603-144858'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '151501',
internalId:  '',
customField: '20100609-181928'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '155901',
internalId:  '',
customField: '20090714-171546'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '175801',
internalId:  '',
customField: '20100616-181149'
};
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INEPFB';
var companyName   = '+Auckland+Acupuncture+Centre+';
var htmlTitle	  = 'Auckland+Acupuncture+Centre+Ltd+%28The+Original%29';
var metaKeywords  = 'acupuncture%2C+accupuncture%2C+chinese+medicine%2C+';
var metaContents  = 'Auckland+Acupuncture+Centre+223+balmoral+Rd+mt+Eden%2C+Member+of+the+New+Zealand+Register+of+Acupuncturists%2C+ACC+treatment+provider.';
theSitetree.getById = function(id, ar) {
	if (typeof(ar) == 'undefined'){
		ar = this;
	}
	for (var i=0; i < ar.length; i++) {
		if (ar[i][POS_ID] == id){
			return ar[i];
		}
		if (ar[i][POS_CHILDS].length > 0) {
			var result=this.getById(id, ar[i][POS_CHILDS]);
			if (result != null){
				return result;
			}
		}
	}
	return null;
};

theSitetree.getParentById = function(id, ar) {
	if (typeof(ar) == 'undefined'){
		ar = this;
	}
	for (var i=0; i < ar.length; i++) {
		for (var j = 0; j < ar[i][POS_CHILDS].length; j++) {
			if (ar[i][POS_CHILDS][j][POS_ID] == id) {
				// child found
				return ar[i];
			}
			var result=this.getParentById(id, ar[i][POS_CHILDS]);
			if (result != null){
				return result;
			}
		}
	}
	return null;
};

theSitetree.getName = function(id) {
	var elem = this.getById(id);
	if (elem != null){
		return elem[POS_NAME];
	}
	return null;
};

theSitetree.getNavigationText = function(id) {
	var elem = this.getById(id);
	if (elem != null){
		return elem[POS_NAVIGATIONTEXT];
	}
	return null;
};

theSitetree.getHREF = function(id) {
	var elem = this.getById(id);
	if (elem != null){
		return elem[POS_HREF];
	}
	return null;
};

theSitetree.getIsNavigation = function(id) {
	var elem = this.getById(id);
	if (elem != null){
		return elem[POS_ISNAVIGATION];
	}
	return null;
};

theSitetree.getTemplateName = function(id, lastTemplateName, ar) {
	if (typeof(lastTemplateName) == 'undefined'){
		lastTemplateName = this.topTemplateName;
	}
	if (typeof(ar) == 'undefined'){
		ar = this;
	}
	for (var i=0; i < ar.length; i++) {
		var actTemplateName = ar[i][POS_TEMPLATENAME];
		if (actTemplateName == ''){
			actTemplateName = lastTemplateName;
		}
		if (ar[i][POS_ID] == id) {
			return actTemplateName;
		}
		if (ar[i][POS_CHILDS].length > 0) {
			var result=this.getTemplateName(id, actTemplateName, ar[i][POS_CHILDS]);
			if (result != null){
				return result;
			}
		}
	}
	return null;
};

theSitetree.getByXx = function(lookup, xx, ar) {
    if (typeof(ar) == 'undefined'){
    	ar = this;
    }
    for (var i=0; i < ar.length; i++) {
        if (ar[i][xx] == lookup){
        	return ar[i];
        }
        if (ar[i][POS_CHILDS].length > 0) {
        	var result=this.getByXx(lookup, xx, ar[i][POS_CHILDS]);
            if (result != null){
                return result;
               }
        }
    }
    return null;
};

function gotoPage(lookup) {
	if(__path_prefix__ == "/servlet/CMServeRES" && typeof (changePage) == 'function'){
		changePage(lookup);
		return;
	}
	var page = theSitetree.getHREF(lookup);
	if (!page) {
		var testFor = [ POS_NAME, POS_NAVIGATIONTEXT ];
		for (var i=0 ; i < testFor.length ; i++) {
			var p = theSitetree.getByXx(lookup, testFor[i]);
			if (p != null) {
				page = p[POS_HREF];
				break;
			}
		}
	}
	document.location.href = (new URL(__path_prefix__ + page, true, true)).toString();
};
