/* [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','113012',jdecode('Welcome'),jdecode(''), jdecode('%2F113012.html'), 'true',[],'',''],
	['PAGE','55812',jdecode('Course+Dates'),jdecode(''), jdecode('%2F55812.html'), 'true',[],'',''],
	['PAGE','82912',jdecode('About+Me'),jdecode(''), jdecode('%2F82912.html'), 'true',[],'',''],
	['PAGE','67912',jdecode('Contact+Me'),jdecode(''), jdecode('%2F67912.html'), 'true',[],'',''],
	['PAGE','55412',jdecode('How+to+Find+Me'),jdecode(''), jdecode('%2F55412.html'), 'true',[],'',''],
	['PAGE','2078',jdecode('Courses+%26+Events'),jdecode(''), jdecode('%2F2078.html'), 'true',[],'',''],
	['PAGE','122112',jdecode('Master+energy+%26+2012'),jdecode(''), jdecode('%2F122112.html'), 'true',[],'',''],
	['PAGE','70412',jdecode('Spirit+Guides'),jdecode(''), jdecode('%2F70412.html'), 'true',[],'',''],
	['PAGE','2114',jdecode('Spiritual+Page'),jdecode(''), jdecode('%2F2114.html'), 'true',[],'',''],
	['PAGE','67312',jdecode('Crystal+Healing'),jdecode(''), jdecode('%2F67312.html'), 'true',[],'',''],
	['PAGE','88112',jdecode('Reiki+-+traditional+Dr+Usui'),jdecode(''), jdecode('%2F88112.html'), 'true',[],'',''],
	['PAGE','112112',jdecode('Violet+flame+Reiki'),jdecode(''), jdecode('%2F112112.html'), 'true',[],'',''],
	['PAGE','68512',jdecode('Angels+Reiki'),jdecode(''), jdecode('%2F68512.html'), 'true',[],'',''],
	['PAGE','67512',jdecode('Animal+Reiki'),jdecode(''), jdecode('%2F67512.html'), 'true',[],'',''],
	['PAGE','69212',jdecode('Unicorn+healing'),jdecode(''), jdecode('%2F69212.html'), 'true',[],'',''],
	['PAGE','69412',jdecode('Dolphin+Reiki'),jdecode(''), jdecode('%2F69412.html'), 'true',[],'',''],
	['PAGE','116312',jdecode('Dragon+Crystal+Reiki'),jdecode(''), jdecode('%2F116312.html'), 'true',[],'',''],
	['PAGE','102812',jdecode('Egyptian+Seichem+Reiki'),jdecode(''), jdecode('%2F102812.html'), 'true',[],'',''],
	['PAGE','102833',jdecode('Gold+Ray+Rainbow+Reiki'),jdecode(''), jdecode('%2F102833.html'), 'true',[],'',''],
	['PAGE','119112',jdecode('Golden+Eagle+Reiki'),jdecode(''), jdecode('%2F119112.html'), 'true',[],'',''],
	['PAGE','126212',jdecode('Shell+healing'),jdecode(''), jdecode('%2F126212.html'), 'true',[],'',''],
	['PAGE','89412',jdecode('Regression+dream+therapy'),jdecode(''), jdecode('%2F89412.html'), 'true',[],'',''],
	['PAGE','109912',jdecode('Children+%26%23x27%3BCrystal+Angel%26%23x27%3B'),jdecode(''), jdecode('%2F109912.html'), 'true',[],'',''],
	['PAGE','86812',jdecode('Elementals+%26+fairies'),jdecode(''), jdecode('%2F86812.html'), 'true',[],'',''],
	['PAGE','107612',jdecode('Tarot+%26+angel+cards'),jdecode(''), jdecode('%2F107612.html'), 'true',[],'',''],
	['PAGE','2378',jdecode('Healing%2C+Aura+%26+Orbs'),jdecode(''), jdecode('%2F2378.html'), 'true',[],'',''],
	['PAGE','67012',jdecode('My+services+%26+fees'),jdecode(''), jdecode('%2F67012.html'), 'true',[],'',''],
	['PAGE','2105',jdecode('Publicity+%26+FAQs'),jdecode(''), jdecode('%2F2105.html'), 'true',[],'',''],
	['PAGE','2387',jdecode('Testimonials+'),jdecode(''), jdecode('%2F2387.html'), 'true',[],'',''],
	['PAGE','78612',jdecode('Well+being+TIPS'),jdecode(''), jdecode('%2F78612.html'), 'true',[],'',''],
	['PAGE','64333',jdecode('Photo+album'),jdecode(''), jdecode('%2F64333.html'), 'true',[],'',''],
	['PAGE','2087',jdecode('+Links'),jdecode(''), jdecode('%2F2087.html'), 'true',[],'','']];
var siteelementCount=32;
theSitetree.topTemplateName='Angkor';
theSitetree.paletteFamily='AD73CE';
theSitetree.keyvisualId='6878';
theSitetree.keyvisualName='kv_6878.jpg';
theSitetree.fontsetId='11212';
theSitetree.graphicsetId='12033';
theSitetree.contentColor='662F85';
theSitetree.contentBGColor='BD8ADB';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'hostway',
  product: 'WSCSYSSSSLYTC245'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Angkor',
				paletteFamily: 	'AD73CE',
				keyvisualId: 	'6878',
				keyvisualName: 	'kv_6878.jpg',
				fontsetId: 		'11212',
				graphicsetId: 	'12033',
				contentColor: 	'662F85',
				contentBGColor: 'BD8ADB',
				a_color: 		'BD8ADB',
				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['7008']=webappMappings['7008-10224']={
webappId:    '7008',
documentId:  '67912',
internalId:  '10224',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-0e81f8f3ea74f57519e59716f4028a9d']={
webappId:    '7060',
documentId:  '64333',
internalId:  '0e81f8f3ea74f57519e59716f4028a9d',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78612',
internalId:  '',
customField: '20110816-032452'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '113012',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67512',
internalId:  '',
customField: '20111024-100915'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55812',
internalId:  '',
customField: '20120124-084614'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2078',
internalId:  '',
customField: '20120117-031552'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2114',
internalId:  '',
customField: '20110526-071647'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55412',
internalId:  '',
customField: '20100525-075340'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2378',
internalId:  '',
customField: '20110209-051931'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2105',
internalId:  '',
customField: '20110207-105607'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67312',
internalId:  '',
customField: '20111024-100316'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2087',
internalId:  '',
customField: '20120124-144251'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67012',
internalId:  '',
customField: '20111118-062059'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2387',
internalId:  '',
customField: '20110816-034943'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64333',
internalId:  '',
customField: '20101207-055919'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67912',
internalId:  '',
customField: '20110811-032637'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '68512',
internalId:  '',
customField: '20111118-061825'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69212',
internalId:  '',
customField: '20111107-112732'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69412',
internalId:  '',
customField: '20120123-114711'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70412',
internalId:  '',
customField: '20120112-075205'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '122112',
internalId:  '',
customField: '20111207-043631'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82912',
internalId:  '',
customField: '20111011-081539'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '86812',
internalId:  '',
customField: '20111017-153154'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88112',
internalId:  '',
customField: '20120117-031233'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89412',
internalId:  '',
customField: '20110428-042508'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '102812',
internalId:  '',
customField: '20110720-064816'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '102833',
internalId:  '',
customField: '20111005-043954'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '107612',
internalId:  '',
customField: '20110830-065400'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '109912',
internalId:  '',
customField: '20120105-115253'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '112112',
internalId:  '',
customField: '20111005-052652'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '113012',
internalId:  '',
customField: '20120124-084108'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '116312',
internalId:  '',
customField: '20111109-072329'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '119112',
internalId:  '',
customField: '20111109-080119'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '126212',
internalId:  '',
customField: '20120124-084720'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INXE2I';
var companyName   = 'Heavenly+Guidance';
var htmlTitle	  = 'www.heavenlyguidance.co.uk';
var metaKeywords  = '';
var metaContents  = '';
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();
};

