/* [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','401',jdecode('Home'),jdecode(''),'/401.html','true',[],'',''],
	['PAGE','704',jdecode('Who+are+we'),jdecode(''),'/704/index.html','true',[ 
		['PAGE','17101',jdecode('Lynda+Millar'),jdecode(''),'/704/17101.html','true',[],'',''],
		['PAGE','17122',jdecode('Stefanie+Bath'),jdecode(''),'/704/17122.html','true',[],'','']
	],'',''],
	['PAGE','15901',jdecode('Why+people+like+us'),jdecode(''),'/15901.html','true',[],'',''],
	['PAGE','15301',jdecode('How+we+can+help'),jdecode(''),'/15301/index.html','true',[ 
		['PAGE','494',jdecode('Life+Coaching'),jdecode(''),'/15301/494.html','true',[],'',''],
		['PAGE','35701',jdecode('NLP+%26+Hypnotherapy+'),jdecode(''),'/15301/35701.html','true',[],'',''],
		['PAGE','515',jdecode('Massage'),jdecode(''),'/15301/515.html','true',[],'',''],
		['PAGE','15322',jdecode('Reflexology'),jdecode(''),'/15301/15322.html','true',[],'',''],
		['PAGE','536',jdecode('Reiki+%26+Energy+Healing'),jdecode(''),'/15301/536.html','true',[],'','']
	],'',''],
	['PAGE','7401',jdecode('Training+Courses'),jdecode(''),'/7401/index.html','true',[ 
		['PAGE','18801',jdecode('Indian+Head+Massage'),jdecode(''),'/7401/18801.html','true',[],'',''],
		['PAGE','18822',jdecode('Hot+Stone+Massage'),jdecode(''),'/7401/18822.html','true',[],'',''],
		['PAGE','18843',jdecode('Lomi+Lomi+%28Kahuna%29+'),jdecode(''),'/7401/18843.html','true',[],'',''],
		['PAGE','18864',jdecode('Reiki+Level+1'),jdecode(''),'/7401/18864.html','true',[],'',''],
		['PAGE','28801',jdecode('Reiki+Level+2+'),jdecode(''),'/7401/28801.html','true',[],'',''],
		['PAGE','18885',jdecode('Karuna+Reiki'),jdecode(''),'/7401/18885.html','true',[],'','']
	],'',''],
	['PAGE','34901',jdecode('Latest+News%2FSpecial+Offers+blog'),jdecode(''),'/34901.html','true',[],'',''],
	['PAGE','641',jdecode('Training+Schedule+2010'),jdecode(''),'/641.html','true',[],'',''],
	['PAGE','683',jdecode('Contact'),jdecode(''),'/683/index.html','true',[ 
		['PAGE','452',jdecode('Opening+hours'),jdecode(''),'/683/452.html','true',[],'','']
	],'','']];
var siteelementCount=22;
theSitetree.topTemplateName='Ocean';
theSitetree.paletteFamily='92C3E5';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='33083';
theSitetree.graphicsetId='14052';
theSitetree.contentColor='00386f';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Ocean',
				paletteFamily: 	'92C3E5',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'33083',
				graphicsetId: 	'14052',
				contentColor: 	'00386f',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7050']=webappMappings['7050-1121']={
webappId:    '7050',
documentId:  '34901',
internalId:  '1121',
customField: 'language:en;country:US;'
};
webappMappings['1501']=webappMappings['1501-10346607']={
webappId:    '1501',
documentId:  '401',
internalId:  '10346607',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20091029-061328'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '704',
internalId:  '',
customField: '20090224-070942'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17101',
internalId:  '',
customField: '20091029-061505'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17122',
internalId:  '',
customField: '20090902-051136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15901',
internalId:  '',
customField: '20090713-201700'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15301',
internalId:  '',
customField: '20090224-062538'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '494',
internalId:  '',
customField: '20090304-172353'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '515',
internalId:  '',
customField: '20090224-065537'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15322',
internalId:  '',
customField: '20091201-152022'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '536',
internalId:  '',
customField: '20090127-001504'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7401',
internalId:  '',
customField: '20090212-044907'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18801',
internalId:  '',
customField: '20090729-174800'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18822',
internalId:  '',
customField: '20090713-205603'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18843',
internalId:  '',
customField: '20090217-183501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18864',
internalId:  '',
customField: '20090713-203923'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18885',
internalId:  '',
customField: '20090217-182218'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '641',
internalId:  '',
customField: '20090617-171737'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '683',
internalId:  '',
customField: '20091029-061939'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '452',
internalId:  '',
customField: '20091029-062616'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28801',
internalId:  '',
customField: '20090713-204629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34901',
internalId:  '',
customField: '20090224-163438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35701',
internalId:  '',
customField: '20090311-054951'
};
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INFTFW';
var companyName   = 'Providing+you+with+the+highest+standards+in+holistic+health+care';
var htmlTitle	  = 'Holistic+Health+Wellington+offers++life+coaching%2C+NLP%2C+Hypnotherapy%2C+massage%2C+energy+healing+%26+Reiki';
var metaKeywords  = 'Holistic+Health+NZ++Holistic+Health+Ltd++Holistic+health+limited++Hawaiian+massage+Wellington++Crystal+Healing+Wellington++Crystal+Massage+Wellington++Lomi+Lomi+Massage+wellington++++Lomi+Lomi+massage+Training++Kahuna+massage+training++Ka+Huna+Massage+Wellington++Kahuna+Massage+wellington++++Relaxation+massage++Swedish+massage++LaStone+++++Indian+Head+Massage+Training++++Hot+Stone+Massage++++Hot+stone+training++++Sacred+Stone+Massage++Sacred+Stone+training++++Reiki+Training+wellington++++Karuna+Training+wellington++++Life+Coaching+Wellington++++NLP++++Hypnotherapy++++Gift+Vouchers+massage++Gift+Vouchers+Lynda+Millar++Lynda+Millar++Lynda+Millar+Good+Morning+TV+';
var metaContents  = 'Wellington+Based+Holistic+Healths+provides+a+range+of+luxurious+massages%2C+spa+treatments%2C+Reiki+healing%2C+Reiki+and+Karuna+Reiki+courses.+Life+Coaching%2C+NLP+and+Hypnotherapy.+Contact+021+510+378+or+lynda%40holistichealthltd.co.nz+www.holistichealthltd.co.nz';
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();
};
