/* [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','2701',jdecode('Home'),jdecode(''), jdecode('%2F2701.html'), 'true',[],'',''],
	['PAGE','2752',jdecode('About+us'),jdecode(''), jdecode('%2F2752%2Findex.html'), 'true',[ 
		['PAGE','2773',jdecode('Facility'),jdecode(''), jdecode('%2F2752%2F2773.html'), 'true',[],'',''],
		['PAGE','17901',jdecode('Map'),jdecode(''), jdecode('%2F2752%2F17901.html'), 'true',[],'',''],
		['PAGE','2794',jdecode('How+to+find+us'),jdecode(''), jdecode('%2F2752%2F2794.html'), 'true',[],'',''],
		['PAGE','2815',jdecode('Contact+Us'),jdecode(''), jdecode('%2F2752%2F2815.html'), 'true',[],'','']
	],'',''],
	['PAGE','4101',jdecode('CHC+Summer+Camp'),jdecode(''), jdecode('%2F4101%2Findex.html'), 'true',[ 
		['PAGE','4122',jdecode('Camp+Ages+8-15'),jdecode(''), jdecode('%2F4101%2F4122.html'), 'true',[],'',''],
		['PAGE','15201',jdecode('Bunk1+Photo+Gallery'),jdecode(''), jdecode('%2F4101%2F15201.html'), 'true',[],'',''],
		['PAGE','4143',jdecode('CIT+Program+14-15'),jdecode(''), jdecode('%2F4101%2F4143.html'), 'true',[],'',''],
		['PAGE','4164',jdecode('Counselors'),jdecode(''), jdecode('%2F4101%2F4164.html'), 'true',[],'',''],
		['PAGE','4185',jdecode('Who%2C+What%2C+Where%3F'),jdecode(''), jdecode('%2F4101%2F4185.html'), 'true',[],'',''],
		['PAGE','4206',jdecode('Safety+First'),jdecode(''), jdecode('%2F4101%2F4206.html'), 'true',[],'',''],
		['PAGE','4227',jdecode('Pricing'),jdecode(''), jdecode('%2F4101%2F4227.html'), 'true',[],'',''],
		['PAGE','12001',jdecode('Camper+Forms'),jdecode(''), jdecode('%2F4101%2F12001.html'), 'true',[],'',''],
		['PAGE','12701',jdecode('Counselor+App+Forms'),jdecode(''), jdecode('%2F4101%2F12701.html'), 'true',[],'','']
	],'',''],
	['PAGE','5001',jdecode('Other+Programs'),jdecode(''), jdecode('%2F5001%2Findex.html'), 'true',[ 
		['PAGE','5022',jdecode('Catholic+Scout+Retreat'),jdecode(''), jdecode('%2F5001%2F5022.html'), 'true',[],'',''],
		['PAGE','5043',jdecode('Encuentro+Weekend'),jdecode(''), jdecode('%2F5001%2F5043.html'), 'true',[],'',''],
		['PAGE','5064',jdecode('New+Spirit+Week'),jdecode(''), jdecode('%2F5001%2F5064.html'), 'true',[],'',''],
		['PAGE','5085',jdecode('St.+Agnes+Vaca+Bible+School'),jdecode(''), jdecode('%2F5001%2F5085.html'), 'true',[],'','']
	],'',''],
	['PAGE','16701',jdecode('Photo+Gallery'),jdecode(''), jdecode('%2F16701.html'), 'true',[],'',''],
	['PAGE','18801',jdecode('Adobe+Reader+PDF'),jdecode(''), jdecode('%2F18801.html'), 'true',[],'',''],
	['PAGE','19401',jdecode('Spring+Bash'),jdecode(''), jdecode('%2F19401.html'), 'true',[],'',''],
	['PAGE','19422',jdecode('Wish+List'),jdecode(''), jdecode('%2F19422.html'), 'true',[],'','']];
var siteelementCount=25;
theSitetree.topTemplateName='Notice';
theSitetree.paletteFamily='529243';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10488';
theSitetree.graphicsetId='11049';
theSitetree.contentColor='505050';
theSitetree.contentBGColor='EADFCE';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'endurance',
  product: 'WSCSYSSSSLY0XRN4'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Notice',
				paletteFamily: 	'529243',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10488',
				graphicsetId: 	'11049',
				contentColor: 	'505050',
				contentBGColor: 'EADFCE',
				a_color: 		'F9F9F9',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'B61F1F',
				e_color: 		'B61F1F',
				f_color: 		'B61F1F',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2701',
internalId:  '',
customField: '20120117-175148'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2752',
internalId:  '',
customField: '20091030-163636'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2773',
internalId:  '',
customField: '20091031-131557'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2794',
internalId:  '',
customField: '20091031-131949'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2815',
internalId:  '',
customField: '20100827-212831'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4101',
internalId:  '',
customField: '20120122-210532'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4122',
internalId:  '',
customField: '20120115-200141'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4143',
internalId:  '',
customField: '20120115-200355'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4185',
internalId:  '',
customField: '20091030-175544'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4206',
internalId:  '',
customField: '20091031-131038'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4227',
internalId:  '',
customField: '20120115-201004'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5001',
internalId:  '',
customField: '20091101-202743'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5022',
internalId:  '',
customField: '20120115-201524'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5043',
internalId:  '',
customField: '20120115-201601'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5064',
internalId:  '',
customField: '20120115-201643'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5085',
internalId:  '',
customField: '20120115-201733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4164',
internalId:  '',
customField: '20120117-160643'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2701',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12001',
internalId:  '',
customField: '20120122-210749'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12701',
internalId:  '',
customField: '20120122-210958'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15201',
internalId:  '',
customField: '20091101-132842'
};
webappMappings['7060']=webappMappings['7060-b59fc509d89fafdb62e4e5b349d23f9e']={
webappId:    '7060',
documentId:  '16701',
internalId:  'b59fc509d89fafdb62e4e5b349d23f9e',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16701',
internalId:  '',
customField: '20091101-150836'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17901',
internalId:  '',
customField: '20091101-161438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18801',
internalId:  '',
customField: '20091101-164918'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19401',
internalId:  '',
customField: '20110124-175731'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19422',
internalId:  '',
customField: '20120115-201838'
};
var webAppHostname = 'cgiwsc.enhancedsitebuilder.com:80';
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0INVOOL';
var companyName   = 'CAMP+HOLY+CROSS';
var htmlTitle	  = 'Camp+Holy+Cross';
var metaKeywords  = 'Summer+CampYouth+CampGroup+CampingRetreat+Facility';
var metaContents  = 'Camp+Holy+Cross+is+a+private+facility+of+the+Diocese+of+Springfield.++It+is+a+Residential+Summer+Youth+Camp%2C+Group+Camping+and+Retreat+Facility.';
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();
};

