/* [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 theSitetree=[ 
	['PAGE','2501',jdecode('Home'),jdecode(''),'/2501.html','true',[],''],
	['PAGE','7701',jdecode('Plan+Your+Visit'),jdecode(''),'/7701.html','true',[],''],
	['PAGE','8301',jdecode('Directions'),jdecode(''),'/8301.html','true',[],''],
	['PAGE','8322',jdecode('Visitor+Information'),jdecode(''),'/8322.html','true',[],''],
	['PAGE','14212',jdecode('Park+Map'),jdecode(''),'/14212.html','true',[],''],
	['PAGE','10322',jdecode('Things+To+Do'),jdecode(''),'/10322.html','true',[],''],
	['PAGE','14233',jdecode('News+and+Events'),jdecode(''),'/14233.html','true',[],''],
	['PAGE','10343',jdecode('Get+Involved'),jdecode(''),'/10343.html','true',[],''],
	['PAGE','16812',jdecode('Links'),jdecode(''),'/16812.html','true',[],'']];
var siteelementCount=9;
theSitetree.topTemplateName='Round';
theSitetree.paletteFamily='339966';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='442';
theSitetree.graphicsetId='491';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='72c6a1';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Round',
				paletteFamily: 	'339966',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'442',
				graphicsetId: 	'491',
				contentColor: 	'FFFFFF',
				contentBGColor: '72c6a1',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'72c6a1',
				b_color: 		'339966',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2501',
internalId:  '',
customField: '20100122-132006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7701',
internalId:  '',
customField: '20090904-154225'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8301',
internalId:  '',
customField: '20090904-154734'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8322',
internalId:  '',
customField: '20090904-154819'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16812',
internalId:  '',
customField: '20090116-151022'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10322',
internalId:  '',
customField: '20091113-161314'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10343',
internalId:  '',
customField: '20090904-155301'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14212',
internalId:  '',
customField: '20090904-154841'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14233',
internalId:  '',
customField: '20100122-133827'
};
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0INEER3';
var companyName   = 'Kingman+and+Heritage+Islands';
var htmlTitle	  = 'Kingman+and+Heritage+Islands+Park';
var metaKeywords  = 'Kingman+Island+Heritage+Island+Washington+DC+Park+Washington+DC+Parks+and+Recreation+Living+Classrooms+Anacostia+River+District+of+Columbia+Park+Wildlife+kingmanisland+Kingman+Island+Heritage+Island+';
var metaContents  = 'Kingman+Island+and+Heritage+Island+Park+are+located+on+the+Anacostia+River+in+Northeast+Washington%2C+DC.+There+are+over+50+acres+of+natural+area+to+be+explored+on+Kingman+and+Heritage+Islands.++Wooded+trails%2C+river+views%2C+and+wetlands+comprise+much+of+the+sights+to+be+experienced+when+visiting+the+park+at+Kingman+and+Heritage+Islands.+Trails+in+the+park+are+open+for+walking%2C+hiking%2C+and+bicycling.+Visitors+can+also+enjoy+viewing+a+variety+of+plants+and+animals+native+to+the+area.';
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();
};
