/* [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','32',jdecode('Home'),jdecode(''),'/32.html','true',[],'',''],
	['PAGE','53',jdecode('Animal+Communication+%26+Energywork'),jdecode(''),'/53.html','true',[],'',''],
	['PAGE','62',jdecode('Testimonials'),jdecode(''),'/62.html','true',[],'',''],
	['PAGE','390',jdecode('Classes+%26+Events'),jdecode(''),'/390.html','true',[],'',''],
	['PAGE','28801',jdecode('Schedule+a+Consultation'),jdecode(''),'/28801.html','true',[],'','']];
var siteelementCount=5;
theSitetree.topTemplateName='Angkor';
theSitetree.paletteFamily='879ED6';
theSitetree.keyvisualId='6861';
theSitetree.keyvisualName='kv_6861.jpg';
theSitetree.fontsetId='11212';
theSitetree.graphicsetId='12030';
theSitetree.contentColor='354B86';
theSitetree.contentBGColor='94AAE1';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Angkor',
				paletteFamily: 	'879ED6',
				keyvisualId: 	'6861',
				keyvisualName: 	'kv_6861.jpg',
				fontsetId: 		'11212',
				graphicsetId: 	'12030',
				contentColor: 	'354B86',
				contentBGColor: '94AAE1',
				a_color: 		'94AAE1',
				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['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28801',
internalId:  '',
customField: '20100803-111827'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '32',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32',
internalId:  '',
customField: '20100803-111734'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62',
internalId:  '',
customField: '20100610-080003'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53',
internalId:  '',
customField: '20100610-080003'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '390',
internalId:  '',
customField: '20100803-111345'
};
webappMappings['7008']=webappMappings['7008-8521']={
webappId:    '7008',
documentId:  '28801',
internalId:  '8521',
customField: 'language:en;country:US;'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050IN38OG';
var companyName   = 'shannongross.com';
var htmlTitle	  = 'Shannon+Gross%3A+Animal+Communication+and+Energywork';
var metaKeywords  = 'Shannon+Gross%2C+shannongross%2C+Shannon%2C+Indiana%2C+Indianapolis%2C+animals%2C+animal+communication%2C+animal+communicator%2C+animal+communication+Indiana%2C+animal+communication+Indianapolis%2C+animal+communicator+Indiana%2C+animal+communicator+Indianapolis%2C+animal+communication+classes%2C+animal+classes%2C+interspecies+communication%2Ctelepathic+communication%2Calternative+pet+care%2Canimal+behaviorist%2Canimal+therapist%2Canimal+care%2Canimal+communicator%2Cbecome+telepathic%2Cpet+psychic%2C+animal+connection%2Cdogspeak%2Canimal+consulting%2Cwhale+communication%2Canimal+healing%2Chorse+psychology%2Canimal+health+care%2Canimal+people%2Canimal+psychic%2Cwork+with+animals%2Cpet+therapist%2Canimal+talk%2Canimal+telepathy%2Canimal+therapy%2C+dogtalk%2Chorse+whisperer%2Cpet+personality%2Ccat+psychic%2Cdog+psychic%2Chorse+communicator%2Cintuitive+healer%2C+being+an+empath%2Ccommunicating+with+animals%2Cpet+people%2C+communication+with+animals%2Cdolphin+communication%2C+intuitive+communicator%2C+dog+behaviorist%2Ccat+therapy%2C+pet+psychologist%2Cverbal+and+non+verbal+communication%2C+holistic+animal+care%2Cpsychic+counselor%2C+avian+communication%2C+holistic+pet+care%2Chorse+communication%2Cdog+whisper%2Cinner+work%2Chorse+therapy%2Cbird+behavior%2C+dog+therapy%2Chuman+animal+bond%2Cwhisperer%2C+human+animal+communication%2Cdolphin+communication%2Cbird+psychology%2C+mental+telepathy%2C+natural+healing+animal%2C+natural+pet+care%2Cdolphin+communicate%2Cfeline+psychology%2Clistening+communication+skills%2C+non+verbal+communication%2C+pet+therapy%2C+horse+behavior%2C+animal+souls%2Cpet+psychology%2Cdog+psychology%2Cnonverbal+communication%2C+equine+therapy%2Cdog+whisperer%2Ccat+psychology%2Cpeople+animal%2Ccat+behaviorist%2Cpet+communication%2Cnew+age%2Chorse+whisper%2Ctalk+to+animals%2Cdog+communicate%2Ctalking+to+animals%2Cpet+care+services%2Canimal+spirit%2Canimale%2Ctalking+with+animals%2Ccanine+behavior%2Cunderstanding+animals%2C+verbal+and+nonverbal+communication%2Cbook+on+communication%2Cpet+work%2C+psychic%2C+energy%2C+energywork%2C+pets%2C+cat%2C+dog%2C+pet%2C+pets%2C+animal+talk%2C+talk%2C+communication%2C+communicator%2C+telepathy%2C+love%2C+voice%2C+interspecies%2C+penelope+smith%2C+IndyFeral%2C+Kentuckiana+Pug+Rescue%2C+animal+communication+classes';
var metaContents  = 'Animal+communication+is+a+unique+opportunity+to+speak+with+your+animal+friends+and+hear+their+responses+-+right+from+the+dogs+%28or+cats+or+horses+or+whales%29+mouth.+Shannon+simply+serves+as+a+translator+and+coach%2C+helping+humans+and+their+animal+friends+work+through+behavioral+challenges%2C+transitions%2C+and+emotional+issues.+';
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();
};
