/* [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','1901',jdecode('Home'),jdecode(''),'/1901.html','true',[],''],
	['PAGE','7701',jdecode('Mission+Statement'),jdecode(''),'/7701.html','true',[],''],
	['PAGE','9001',jdecode('Willie%26%23x27%3Bs+Story'),jdecode(''),'/9001/index.html','true',[ 
		['PAGE','19129',jdecode('Slide+Show+of+Photos'),jdecode(''),'/9001/19129.html','true',[],''],
		['PAGE','19150',jdecode('Willie%26%23x27%3Bs+Memorial+Sevice'),jdecode(''),'/9001/19150.html','true',[],''],
		['PAGE','23529',jdecode('Willie+at+the+DNC'),jdecode(''),'/9001/23529.html','true',[],'']
	],''],
	['PAGE','9022',jdecode('Current+Projects'),jdecode(''),'/9022/index.html','true',[ 
		['PAGE','9127',jdecode('Idle-free.org'),jdecode(''),'/9022/9127.html','true',[],''],
		['PAGE','9148',jdecode('cookies4climatechange.org'),jdecode(''),'/9022/9148.html','true',[],'']
	],''],
	['PAGE','18229',jdecode('Making+a+Difference'),jdecode(''),'/18229/index.html','true',[ 
		['PAGE','17829',jdecode('Did+you+know%3F%3F%3F'),jdecode(''),'/18229/17829.html','true',[],''],
		['PAGE','18250',jdecode('Recycling+at+home+and+work'),jdecode(''),'/18229/18250.html','true',[],''],
		['PAGE','18271',jdecode('Green+Living+Tips'),jdecode(''),'/18229/18271.html','true',[],''],
		['PAGE','18292',jdecode('Get+Involved'),jdecode(''),'/18229/18292.html','true',[],'']
	],''],
	['PAGE','9701',jdecode('Events+%26+News'),jdecode(''),'/9701/index.html','true',[ 
		['PAGE','10401',jdecode('Newspaper-WNEA+Fund'),jdecode(''),'/9701/10401.html','true',[],''],
		['PAGE','15301',jdecode('Newspaper-Willie'),jdecode(''),'/9701/15301.html','true',[],''],
		['PAGE','10422',jdecode('Video+Clips'),jdecode(''),'/9701/10422.html','true',[],'']
	],''],
	['PAGE','9043',jdecode('Web+Store'),jdecode(''),'/9043.html','true',[],''],
	['PAGE','13901',jdecode('Donations'),jdecode(''),'/13901.html','true',[],''],
	['PAGE','14201',jdecode('Communication'),jdecode(''),'/14201/index.html','true',[ 
		['PAGE','9064',jdecode('Guestbook-please+sign+in'),jdecode(''),'/14201/9064.html','true',[],''],
		['PAGE','22429',jdecode('Discussion+Page'),jdecode(''),'/14201/22429.html','true',[],''],
		['PAGE','10301',jdecode('Contact+Us'),jdecode(''),'/14201/10301.html','true',[],'']
	],''],
	['PAGE','9106',jdecode('Interesting+Links'),jdecode(''),'/9106.html','true',[],'']];
var siteelementCount=25;
theSitetree.topTemplateName='Applicant';
theSitetree.paletteFamily='72AD5C';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='26568';
theSitetree.graphicsetId='13382';
theSitetree.contentColor='437131';
theSitetree.contentBGColor='bef0ab';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Applicant',
				paletteFamily: 	'72AD5C',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'26568',
				graphicsetId: 	'13382',
				contentColor: 	'437131',
				contentBGColor: 'bef0ab',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'72AD5C',
				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['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1901',
internalId:  '',
customField: '20091015-050851'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7701',
internalId:  '',
customField: '20091015-114008'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9001',
internalId:  '',
customField: '20091015-164807'
};
webappMappings['4001']=webappMappings['4001-23377657']={
webappId:    '4001',
documentId:  '9043',
internalId:  '23377657',
customField: 'language:en;country:US;'
};
webappMappings['1002']=webappMappings['1002-9064aendu0invdvv']={
webappId:    '1002',
documentId:  '9064',
internalId:  '9064aendu0invdvv',
customField: 'icq=false'
};
webappMappings['1003']=webappMappings['1003-aendu0invdvv1250f6c0b8c']={
webappId:    '1003',
documentId:  '22429',
internalId:  'aendu0invdvv1250f6c0b8c',
customField: 'en:US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9022',
internalId:  '',
customField: '20091015-154033'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9701',
internalId:  '',
customField: '20091014-110640'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9064',
internalId:  '',
customField: '20091011-134824'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19129',
internalId:  '',
customField: '20091119-212916'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9127',
internalId:  '',
customField: '20091120-085539'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9148',
internalId:  '',
customField: '20091011-134824'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9043',
internalId:  '',
customField: '20091014-183529'
};
webappMappings['7008']=webappMappings['7008-21883']={
webappId:    '7008',
documentId:  '10301',
internalId:  '21883',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9106',
internalId:  '',
customField: '20091101-195322'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10301',
internalId:  '',
customField: '20091014-183226'
};
webappMappings['7060']=webappMappings['7060-d43cec49b565cfd81320a9000ee288eb']={
webappId:    '7060',
documentId:  '10422',
internalId:  'd43cec49b565cfd81320a9000ee288eb',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10401',
internalId:  '',
customField: '20091015-094953'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10422',
internalId:  '',
customField: '20091011-174939'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13901',
internalId:  '',
customField: '20091014-192405'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14201',
internalId:  '',
customField: '20091015-082401'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15301',
internalId:  '',
customField: '20091015-092819'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17829',
internalId:  '',
customField: '20091101-194026'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18229',
internalId:  '',
customField: '20091120-175341'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18250',
internalId:  '',
customField: '20091101-201758'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18271',
internalId:  '',
customField: '20091119-222832'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18292',
internalId:  '',
customField: '20091119-221515'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19150',
internalId:  '',
customField: '20091119-212916'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22429',
internalId:  '',
customField: '20091120-143644'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23529',
internalId:  '',
customField: '20091121-175809'
};
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0INVDVV';
var companyName   = 'The+Willie+Neal+Environmental+Awareness+Fund';
var htmlTitle	  = '';
var metaKeywords  = '';
var metaContents  = '';
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();
};
