/* [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','5995',jdecode('Biography'),jdecode(''),'/5995.html','true',[],'',''],
	['PAGE','5890',jdecode('Thoughts'),jdecode(''),'/5890.html','true',[],'',''],
	['PAGE','9601',jdecode('Neo+Shamanism'),jdecode(''),'/9601.html','true',[],'',''],
	['PAGE','7101',jdecode('Shamanic+work'),jdecode(''),'/7101.html','true',[],'',''],
	['PAGE','5722',jdecode('Readings'),jdecode(''),'/5722.html','true',[],'',''],
	['PAGE','5743',jdecode('Soul+Retrieval'),jdecode(''),'/5743.html','true',[],'',''],
	['PAGE','5764',jdecode('Chakras'),jdecode(''),'/5764.html','true',[],'',''],
	['PAGE','34201',jdecode('Reiki'),jdecode(''),'/34201.html','true',[],'',''],
	['PAGE','33901',jdecode('Astrology+'),jdecode(''),'/33901.html','true',[],'',''],
	['PAGE','33922',jdecode('Dreams'),jdecode(''),'/33922.html','true',[],'',''],
	['PAGE','5785',jdecode('Meditation'),jdecode(''),'/5785.html','true',[],'',''],
	['PAGE','6142',jdecode('Gift+certificates'),jdecode(''),'/6142.html','true',[],'',''],
	['PAGE','5911',jdecode('Animal+Medicine'),jdecode(''),'/5911.html','true',[],'',''],
	['PAGE','6016',jdecode('Events'),jdecode(''),'/6016.html','true',[],'',''],
	['PAGE','6037',jdecode('Press'),jdecode(''),'/6037.html','true',[],'',''],
	['PAGE','30401',jdecode('Recipes'),jdecode(''),'/30401.html','true',[],'',''],
	['PAGE','6058',jdecode('Links'),jdecode(''),'/6058.html','true',[],'',''],
	['PAGE','5806',jdecode('Contact'),jdecode(''),'/5806.html','true',[],'',''],
	['PAGE','7606',jdecode('Guestbook'),jdecode(''),'/7606/index.html','true',[ 
		['PAGE','7601',jdecode('Read+Guestbook'),jdecode(''),'/7606/7601.html','false',[],'','']
	],'',''],
	['PAGE','25001',jdecode('PayPal+'),jdecode(''),'/25001.html','true',[],'','']];
var siteelementCount=22;
theSitetree.topTemplateName='Tendril';
theSitetree.paletteFamily='D9F4D5';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='33093';
theSitetree.graphicsetId='14058';
theSitetree.contentColor='3B8030';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Tendril',
				paletteFamily: 	'D9F4D5',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'33093',
				graphicsetId: 	'14058',
				contentColor: 	'3B8030',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1002']=webappMappings['1002-7606avec10inpt81']={
webappId:    '1002',
documentId:  '7606',
internalId:  '7606avec10inpt81',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33901',
internalId:  '',
customField: '20100425-161430'
};
webappMappings['1501']=webappMappings['1501-12417888']={
webappId:    '1501',
documentId:  '401',
internalId:  '12417888',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33922',
internalId:  '',
customField: '20100503-234021'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34201',
internalId:  '',
customField: '20100503-231445'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30401',
internalId:  '',
customField: '20100314-001246'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20100503-204445'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5995',
internalId:  '',
customField: '20090721-111439'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5890',
internalId:  '',
customField: '20090407-181409'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9601',
internalId:  '',
customField: '20090407-152810'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7101',
internalId:  '',
customField: '20100504-000821'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5722',
internalId:  '',
customField: '20100129-213223'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5743',
internalId:  '',
customField: '20100503-235723'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5764',
internalId:  '',
customField: '20091120-144944'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5785',
internalId:  '',
customField: '20100503-234129'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6142',
internalId:  '',
customField: '20090721-112551'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5911',
internalId:  '',
customField: '20100503-234301'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6016',
internalId:  '',
customField: '20100706-123125'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6037',
internalId:  '',
customField: '20081111-165656'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6058',
internalId:  '',
customField: '20100503-232946'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5806',
internalId:  '',
customField: '20100409-170004'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7606',
internalId:  '',
customField: '20090407-180212'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7601',
internalId:  '',
customField: '20081110-224605'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25001',
internalId:  '',
customField: '20090706-233207'
};
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INPT81';
var companyName   = 'ShaneKnox.com';
var htmlTitle	  = 'Shane+Knox+Intuitive+Advisor%2C+Neo-Shaman%2C+Psychic%2C+Master+Psychic%2C+Psychic+Readings%2C+Spirit+Guides%2C+Animal+Totems%2C+Chakras%2C+Soul+Retrieval%2CCertified+Psychic%2C+Phone+readings%2C+Phone+psychic%2C++';
var metaKeywords  = 'psychic%2C+master+psychic%2C+intuitive%2C+shaman%2C+neo+shaman%2C+spirit+guides%2C+animal+totems%2C+reiki%2C+dream+interpretation%2C+astrology%2C+chakras%2C+tarot%2C+past+lives%2C+ritual%2C+readings%2C+psychic+readings%2C+angels%2C+springfield+mo%2C+springfield%2C+republic+mo%2C+yoga%2C+reiki+master%2C+healing%2C+energy+work%2C+energy%2C+tantra%2C+spiritualist%2C+medicine+man';
var metaContents  = 'psychic%2C+master+psychic%2C+intuitive%2C+shaman%2C+neo+shaman%2C+spirit+guides%2C+animal+totems%2C+reiki%2C+dream+interpretation%2C+astrology%2C+chakras%2C+tarot%2C+past+lives%2C+ritual%2C+readings%2C+psychic+readings%2C+angels%2C+springfield+mo%2C+springfield%2C+republic+mo%2C+yoga%2C+reiki+master%2C+healing%2C+energy+work%2C+energy%2C+tantra%2C+spiritualist%2C+medicine+man';
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();
};
