/* [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','501',jdecode('Home'),jdecode(''),'/501.html','true',[],'',''],
	['PAGE','552',jdecode('About+Us'),jdecode(''),'/552/index.html','true',[ 
		['PAGE','100545',jdecode('Rainbow+Bridge+Teams'),jdecode(''),'/552/100545.html','true',[],'','']
	],'',''],
	['PAGE','73945',jdecode('About+Our+Programs'),jdecode(''),'/73945/index.html','true',[ 
		['PAGE','573',jdecode('Paws+to+Read'),jdecode(''),'/73945/573.html','true',[],'',''],
		['PAGE','594',jdecode('Angels+with+Paws'),jdecode(''),'/73945/594.html','true',[],'','']
	],'',''],
	['PAGE','615',jdecode('Membership'),jdecode(''),'/615/index.html','true',[ 
		['PAGE','11301',jdecode('Member+Application'),jdecode(''),'/615/11301.html','true',[],'','']
	],'',''],
	['PAGE','636',jdecode('Upcoming+Events'),jdecode(''),'/636.html','true',[],'',''],
	['PAGE','16101',jdecode('Past+Events'),jdecode(''),'/16101/index.html','true',[ 
		['PAGE','82845',jdecode('Valley+View+Awards'),jdecode(''),'/16101/82845.html','true',[],'',''],
		['PAGE','92245',jdecode('09+Pooch+Parade'),jdecode(''),'/16101/92245.html','true',[],'',''],
		['PAGE','16122',jdecode('Therapy+Dog+Wkshp'),jdecode(''),'/16101/16122.html','true',[],'',''],
		['PAGE','60201',jdecode('08+Holiday+Party'),jdecode(''),'/16101/60201.html','true',[],'',''],
		['PAGE','35901',jdecode('08+Pooch+Parade'),jdecode(''),'/16101/35901.html','true',[],'',''],
		['PAGE','35401',jdecode('08+Pooch+P+Candids'),jdecode(''),'/16101/35401.html','true',[],'',''],
		['PAGE','31901',jdecode('08+Pooch+P+Portraits'),jdecode(''),'/16101/31901.html','true',[],'',''],
		['PAGE','26201',jdecode('07+Pooch+Parade'),jdecode(''),'/16101/26201.html','true',[],'','']
	],'',''],
	['PAGE','657',jdecode('Contact+Us'),jdecode(''),'/657.html','true',[],'',''],
	['PAGE','8606',jdecode('Guestbook'),jdecode(''),'/8606/index.html','true',[ 
		['PAGE','8601',jdecode('Read+Guestbook'),jdecode(''),'/8606/8601.html','false',[],'','']
	],'','']];
var siteelementCount=21;
theSitetree.topTemplateName='Borders';
theSitetree.paletteFamily='C9DFEE';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10432';
theSitetree.graphicsetId='10771';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='F0F2F4';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Borders',
				paletteFamily: 	'C9DFEE',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10432',
				graphicsetId: 	'10771',
				contentColor: 	'000000',
				contentBGColor: 'F0F2F4',
				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:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']=webappMappings['1002-8606ahw050inxxfl']={
webappId:    '1002',
documentId:  '8606',
internalId:  '8606ahw050inxxfl',
customField: 'icq=false'
};
webappMappings['1501']=webappMappings['1501-100738']={
webappId:    '1501',
documentId:  '501',
internalId:  '100738',
customField: '1501'
};
webappMappings['7060']=webappMappings['7060-e2a49c0643594881773eed12627e77f2']={
webappId:    '7060',
documentId:  '26201',
internalId:  'e2a49c0643594881773eed12627e77f2',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-c167a7da5df7999e6a6a48844d4a4cc8']={
webappId:    '7060',
documentId:  '31901',
internalId:  'c167a7da5df7999e6a6a48844d4a4cc8',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20100429-121305'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '552',
internalId:  '',
customField: '20100429-115655'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '573',
internalId:  '',
customField: '20090501-164735'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '594',
internalId:  '',
customField: '20090501-164759'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '615',
internalId:  '',
customField: '20090713-173843'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11301',
internalId:  '',
customField: '20100319-122002'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '636',
internalId:  '',
customField: '20100429-115141'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16101',
internalId:  '',
customField: '20091011-173133'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26201',
internalId:  '',
customField: '20090501-165947'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35901',
internalId:  '',
customField: '20090501-170037'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31901',
internalId:  '',
customField: '20090501-170108'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35401',
internalId:  '',
customField: '20090501-170151'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16122',
internalId:  '',
customField: '20090501-170325'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '657',
internalId:  '',
customField: '20100131-135414'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8606',
internalId:  '',
customField: '20090501-170743'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8601',
internalId:  '',
customField: '20080619-153606'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '73945',
internalId:  '',
customField: '20090501-185145'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60201',
internalId:  '',
customField: '20090501-170246'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '100545',
internalId:  '',
customField: '20100101-154853'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82845',
internalId:  '',
customField: '20090501-185053'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92245',
internalId:  '',
customField: '20091011-174925'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INXXFL';
var companyName   = 'HEELING+PARTNERS+OF+THE+ROARING+FORK+VALLEY';
var htmlTitle	  = 'Heeling+Partners+of+the+Roaring+Fork+Valley';
var metaKeywords  = 'dogs%2C+therapy+dogs%2C+Glenwood+Springs%2C+Carbondale%2C+Colorado%2C+Garfield+County%2C+Heeling+Partners';
var metaContents  = 'Heeling+Partners+is+an+all+volunteer%2C+non-profit+501c%283%29+organization+based+in+Glenwood+Springs%2C+Colorado.+We+operate+for+charitable+and+educational+purposes%2C+visiting+health+care+facilities+and+schools+to+provide+motivational%2C+educational%2C+recreational+and%2For+therapeutic+benefits+to+enhance+quality+of+life.+Public+presentations+and+events+are+also+an+important+part+of+our+activities.';
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();
};
