/* [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(''), jdecode('%2F701.html'), 'true',[],'',''],
	['PAGE','752',jdecode('About+us'),jdecode(''), jdecode('%2F752%2Findex.html'), 'true',[ 
		['PAGE','28601',jdecode('About+NZRA'),jdecode(''), jdecode('%2F752%2F28601.html'), 'true',[],'','']
	],'',''],
	['PAGE','815',jdecode('What+is+Acupuncture'),jdecode(''), jdecode('%2F815.html'), 'true',[],'',''],
	['PAGE','36101',jdecode('The+Treatment'),jdecode(''), jdecode('%2F36101.html'), 'true',[],'',''],
	['PAGE','794',jdecode('Conditions+Treated'),jdecode(''), jdecode('%2F794%2Findex.html'), 'true',[ 
		['PAGE','69001',jdecode('Allergy'),jdecode(''), jdecode('%2F794%2F69001.html'), 'true',[],'',''],
		['PAGE','34201',jdecode('Acupuncture+%26+Men'),jdecode(''), jdecode('%2F794%2F34201.html'), 'true',[],'',''],
		['PAGE','37201',jdecode('Weight+Loss'),jdecode(''), jdecode('%2F794%2F37201.html'), 'true',[],'',''],
		['PAGE','55001',jdecode('Stop+Smoking'),jdecode(''), jdecode('%2F794%2F55001.html'), 'true',[],'',''],
		['PAGE','65401',jdecode('Cancer'),jdecode(''), jdecode('%2F794%2F65401.html'), 'true',[],'',''],
		['PAGE','37222',jdecode('Pain'),jdecode(''), jdecode('%2F794%2F37222.html'), 'true',[],'',''],
		['PAGE','37243',jdecode('Emotional+Problems'),jdecode(''), jdecode('%2F794%2F37243.html'), 'true',[],'',''],
		['PAGE','82501',jdecode('Insomnia'),jdecode(''), jdecode('%2F794%2F82501.html'), 'true',[],'',''],
		['PAGE','93501',jdecode('Headache'),jdecode(''), jdecode('%2F794%2F93501.html'), 'true',[],'',''],
		['PAGE','37801',jdecode('Stress'),jdecode(''), jdecode('%2F794%2F37801.html'), 'true',[],'',''],
		['PAGE','155901',jdecode('Immune+System'),jdecode(''), jdecode('%2F794%2F155901.html'), 'true',[],'','']
	],'',''],
	['PAGE','79901',jdecode('Infertility+%26+IVF'),jdecode(''), jdecode('%2F79901%2Findex.html'), 'true',[ 
		['PAGE','110401',jdecode('Male+Infertility'),jdecode(''), jdecode('%2F79901%2F110401.html'), 'true',[],'','']
	],'',''],
	['PAGE','22101',jdecode('Pregnancy'),jdecode(''), jdecode('%2F22101%2Findex.html'), 'true',[ 
		['PAGE','79922',jdecode('Labour+'),jdecode(''), jdecode('%2F22101%2F79922.html'), 'true',[],'',''],
		['PAGE','79943',jdecode('Breech+Baby'),jdecode(''), jdecode('%2F22101%2F79943.html'), 'true',[],'',''],
		['PAGE','79964',jdecode('Miscarriage'),jdecode(''), jdecode('%2F22101%2F79964.html'), 'true',[],'',''],
		['PAGE','79985',jdecode('Morning+Sickness'),jdecode(''), jdecode('%2F22101%2F79985.html'), 'true',[],'',''],
		['PAGE','116701',jdecode('Post+Natal+Care'),jdecode(''), jdecode('%2F22101%2F116701.html'), 'true',[],'','']
	],'',''],
	['PAGE','98101',jdecode('Gynaecology'),jdecode(''), jdecode('%2F98101%2Findex.html'), 'true',[ 
		['PAGE','98122',jdecode('Menopause'),jdecode(''), jdecode('%2F98101%2F98122.html'), 'true',[],'',''],
		['PAGE','98143',jdecode('PMS'),jdecode(''), jdecode('%2F98101%2F98143.html'), 'true',[],'',''],
		['PAGE','98164',jdecode('PCOS'),jdecode(''), jdecode('%2F98101%2F98164.html'), 'true',[],'',''],
		['PAGE','100101',jdecode('Endometriosis'),jdecode(''), jdecode('%2F98101%2F100101.html'), 'true',[],'',''],
		['PAGE','98185',jdecode('Period+Pain'),jdecode(''), jdecode('%2F98101%2F98185.html'), 'true',[],'',''],
		['PAGE','98206',jdecode('Irregular+Periods'),jdecode(''), jdecode('%2F98101%2F98206.html'), 'true',[],'','']
	],'',''],
	['PAGE','173701',jdecode('Reflexology'),jdecode(''), jdecode('%2F173701.html'), 'true',[],'',''],
	['PAGE','19101',jdecode('ACC+Treatments'),jdecode(''), jdecode('%2F19101.html'), 'true',[],'',''],
	['PAGE','151501',jdecode('Tai+Chi%2FQigong'),jdecode(''), jdecode('%2F151501.html'), 'true',[],'',''],
	['PAGE','149801',jdecode('Costs'),jdecode(''), jdecode('%2F149801.html'), 'true',[],'',''],
	['PAGE','20301',jdecode('Testimonials'),jdecode(''), jdecode('%2F20301.html'), 'true',[],'',''],
	['PAGE','878',jdecode('Find+Us'),jdecode(''), jdecode('%2F878.html'), 'true',[],'',''],
	['PAGE','24401',jdecode('FAQ'),jdecode(''), jdecode('%2F24401.html'), 'true',[],'',''],
	['PAGE','13801',jdecode('Gallery'),jdecode(''), jdecode('%2F13801.html'), 'true',[],'',''],
	['PAGE','74101',jdecode('Site+Map'),jdecode(''), jdecode('%2F74101.html'), 'true',[],'',''],
	['PAGE','85701',jdecode('Links'),jdecode(''), jdecode('%2F85701%2Findex.html'), 'true',[ 
		['PAGE','181501',jdecode('.'),jdecode(''), jdecode('%2F85701%2F181501.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 prodDef={
  wl_name: 'mitdnz',
  product: 'WSCSYSSSSLYTC22A'
};
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: '20120117-164739'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '752',
internalId:  '',
customField: '20120117-164908'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28601',
internalId:  '',
customField: '20081108-152603'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '815',
internalId:  '',
customField: '20100831-180442'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36101',
internalId:  '',
customField: '20081108-153000'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '794',
internalId:  '',
customField: '20110301-165716'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69001',
internalId:  '',
customField: '20090413-140008'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34201',
internalId:  '',
customField: '20110301-171645'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37201',
internalId:  '',
customField: '20110302-143436'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55001',
internalId:  '',
customField: '20110302-143658'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65401',
internalId:  '',
customField: '20081108-154356'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37222',
internalId:  '',
customField: '20101115-190425'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37243',
internalId:  '',
customField: '20110301-165752'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82501',
internalId:  '',
customField: '20110301-171401'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '93501',
internalId:  '',
customField: '20080414-223713'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37801',
internalId:  '',
customField: '20110301-165827'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79901',
internalId:  '',
customField: '20120117-164958'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '110401',
internalId:  '',
customField: '20111031-174913'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22101',
internalId:  '',
customField: '20120117-165044'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79922',
internalId:  '',
customField: '20111114-183034'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79943',
internalId:  '',
customField: '20111114-183055'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79964',
internalId:  '',
customField: '20110905-193658'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79985',
internalId:  '',
customField: '20111114-182951'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '116701',
internalId:  '',
customField: '20101115-190135'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '98101',
internalId:  '',
customField: '20120117-165148'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '98122',
internalId:  '',
customField: '20111031-175018'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '98143',
internalId:  '',
customField: '20100913-212716'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '98164',
internalId:  '',
customField: '20101115-185349'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '100101',
internalId:  '',
customField: '20110905-193911'
};
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: '20120117-165241'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '878',
internalId:  '',
customField: '20111031-175130'
};
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: '20110321-165003'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '151501',
internalId:  '',
customField: '20110510-220540'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '155901',
internalId:  '',
customField: '20090714-171546'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '181501',
internalId:  '',
customField: '20110301-164452'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
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();
};

