/* [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(''), jdecode('%2F501.html'), 'true',[],'',''],
	['PAGE','552',jdecode('About+Us'),jdecode(''), jdecode('%2F552%2Findex.html'), 'true',[ 
		['PAGE','100545',jdecode('Rainbow+Bridge+Teams'),jdecode(''), jdecode('%2F552%2F100545.html'), 'true',[],'',''],
		['PAGE','131767',jdecode('Spirit+of+Caring+Award'),jdecode(''), jdecode('%2F552%2F131767.html'), 'true',[],'','']
	],'',''],
	['PAGE','73945',jdecode('About+Our+Programs'),jdecode(''), jdecode('%2F73945%2Findex.html'), 'true',[ 
		['PAGE','573',jdecode('Paws+to+Read'),jdecode(''), jdecode('%2F73945%2F573.html'), 'true',[],'',''],
		['PAGE','594',jdecode('Angels+with+Paws'),jdecode(''), jdecode('%2F73945%2F594.html'), 'true',[],'','']
	],'',''],
	['PAGE','615',jdecode('Membership'),jdecode(''), jdecode('%2F615%2Findex.html'), 'true',[ 
		['PAGE','11301',jdecode('Member+Application'),jdecode(''), jdecode('%2F615%2F11301.html'), 'true',[],'',''],
		['PAGE','123967',jdecode('Featured+Members'),jdecode(''), jdecode('%2F615%2F123967.html'), 'true',[],'',''],
		['PAGE','8601',jdecode('Read+Guestbook'),jdecode(''), jdecode('%2F615%2F8601.html'), 'false',[],'','']
	],'',''],
	['PAGE','636',jdecode('Upcoming+Events'),jdecode(''), jdecode('%2F636.html'), 'true',[],'',''],
	['PAGE','16101',jdecode('Past+Events'),jdecode(''), jdecode('%2F16101%2Findex.html'), 'true',[ 
		['PAGE','92245',jdecode('09+Pooch+Parade'),jdecode(''), jdecode('%2F16101%2F92245.html'), 'true',[],'',''],
		['PAGE','16122',jdecode('Therapy+Dog+Wkshp'),jdecode(''), jdecode('%2F16101%2F16122.html'), 'true',[],'',''],
		['PAGE','60201',jdecode('08+Holiday+Party'),jdecode(''), jdecode('%2F16101%2F60201.html'), 'true',[],'',''],
		['PAGE','35901',jdecode('08+Pooch+Parade'),jdecode(''), jdecode('%2F16101%2F35901.html'), 'true',[],'',''],
		['PAGE','35401',jdecode('08+Pooch+P+Candids'),jdecode(''), jdecode('%2F16101%2F35401.html'), 'true',[],'','']
	],'',''],
	['PAGE','657',jdecode('Contact+Us'),jdecode(''), jdecode('%2F657.html'), 'true',[],'',''],
	['PAGE','8606',jdecode('Guestbook'),jdecode(''), jdecode('%2F8606.html'), 'true',[],'','']];
var siteelementCount=20;
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 prodDef={
  wl_name: 'valueweb',
  product: 'WSCSYSSSSLYTCR7V'
};
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['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '131767',
internalId:  '',
customField: '20110601-160234'
};
webappMappings['1501']=webappMappings['1501-100738']={
webappId:    '1501',
documentId:  '501',
internalId:  '100738',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20111204-161023'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '552',
internalId:  '',
customField: '20111205-154051'
};
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: '20111204-162122'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11301',
internalId:  '',
customField: '20111026-142315'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '636',
internalId:  '',
customField: '20111205-155527'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16101',
internalId:  '',
customField: '20110601-160324'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '123967',
internalId:  '',
customField: '20111204-162251'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35901',
internalId:  '',
customField: '20090501-170037'
};
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: '20111204-162637'
};
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: '20111026-141909'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60201',
internalId:  '',
customField: '20090501-170246'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '100545',
internalId:  '',
customField: '20111204-161816'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92245',
internalId:  '',
customField: '20091011-174925'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker04.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();
};

