/* [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','15901',jdecode('Home'),jdecode(''),'/15901/index.html','true',[ 
		['PAGE','18501',jdecode('From+The+President'),jdecode(''),'/15901/18501.html','true',[],''],
		['PAGE','18001',jdecode('Mission%2FVision'),jdecode(''),'/15901/18001.html','true',[],''],
		['PAGE','17601',jdecode('Benefits'),jdecode(''),'/15901/17601.html','true',[],''],
		['PAGE','18201',jdecode('Testimonials'),jdecode(''),'/15901/18201.html','true',[],'']
	],''],
	['PAGE','18648',jdecode('How+To+Join'),jdecode(''),'/18648/index.html','true',[ 
		['PAGE','30876',jdecode('Associate+Application'),jdecode(''),'/18648/30876.html','true',[],''],
		['PAGE','30855',jdecode('FD+Application'),jdecode(''),'/18648/30855.html','true',[],'']
	],''],
	['PAGE','18401',jdecode('Fire+District+Information'),jdecode(''),'/18401/index.html','true',[ 
		['PAGE','43055',jdecode('Advantages+of+FPD+Form'),jdecode(''),'/18401/43055.html','false',[],''],
		['PAGE','52655',jdecode('FAQs+about+FPDs'),jdecode(''),'/18401/52655.html','true',[],''],
		['PAGE','18564',jdecode('Ballet+Form'),jdecode(''),'/18401/18564.html','true',[],''],
		['PAGE','18543',jdecode('Election'),jdecode(''),'/18401/18543.html','true',[],''],
		['PAGE','29755',jdecode('Formation'),jdecode(''),'/18401/29755.html','true',[],''],
		['PAGE','18522',jdecode('Incorporation'),jdecode(''),'/18401/18522.html','true',[],'']
	],''],
	['PAGE','56455',jdecode('Certified+FD+Board+Training'),jdecode(''),'/56455.html','true',[],''],
	['PAGE','59355',jdecode('2010+Spring+Conference'),jdecode(''),'/59355/index.html','true',[ 
		['PAGE','70555',jdecode('Vendor+Registration'),jdecode(''),'/59355/70555.html','true',[],'']
	],''],
	['PAGE','19901',jdecode('Calendar+of+Events'),jdecode(''),'/19901/index.html','true',[ 
		['PAGE','20222',jdecode('2010+Spring+Conference'),jdecode(''),'/19901/20222.html','true',[],''],
		['PAGE','35302',jdecode('Dates+to+Know'),jdecode(''),'/19901/35302.html','false',[],'']
	],''],
	['PAGE','66655',jdecode('Job+Opportunities'),jdecode(''),'/66655.html','true',[],''],
	['PAGE','20501',jdecode('News'),jdecode(''),'/20501.html','true',[],''],
	['PAGE','41755',jdecode('Phil+Sayer+Scholarship'),jdecode(''),'/41755.html','false',[],''],
	['PAGE','18822',jdecode('Legislative+Reports'),jdecode(''),'/18822/index.html','true',[ 
		['PAGE','104705',jdecode('April+12%2C+2010'),jdecode(''),'/18822/104705.html','true',[],''],
		['PAGE','104726',jdecode('April+5%2C+2010'),jdecode(''),'/18822/104726.html','true',[],''],
		['PAGE','103305',jdecode('March+8%2C+2010'),jdecode(''),'/18822/103305.html','true',[],''],
		['PAGE','101605',jdecode('March+1%2C+2010'),jdecode(''),'/18822/101605.html','true',[],''],
		['PAGE','101626',jdecode('February+23%2C+2010'),jdecode(''),'/18822/101626.html','true',[],''],
		['PAGE','99205',jdecode('February+15%2C+2010'),jdecode(''),'/18822/99205.html','true',[],''],
		['PAGE','99226',jdecode('February+8.+2010'),jdecode(''),'/18822/99226.html','true',[],''],
		['PAGE','99105',jdecode('February+5%2C+2010'),jdecode(''),'/18822/99105.html','true',[],''],
		['PAGE','97305',jdecode('January+25%2C+2010'),jdecode(''),'/18822/97305.html','true',[],''],
		['PAGE','97326',jdecode('January+17%2C+2010'),jdecode(''),'/18822/97326.html','true',[],''],
		['PAGE','95005',jdecode('2009+Final+Report'),jdecode(''),'/18822/95005.html','true',[],''],
		['PAGE','79305',jdecode('2009+Legislative+Agenda'),jdecode(''),'/18822/79305.html','true',[],''],
		['PAGE','70955',jdecode('2008+Final+Leg.+Report'),jdecode(''),'/18822/70955.html','true',[],'']
	],''],
	['PAGE','35755',jdecode('Members+Only'),jdecode(''),'/35755/index.html','true',[ 
		['PAGE','43076',jdecode('Advantages+of+FPD+Form'),jdecode(''),'/35755/43076.html','false',[],''],
		['PAGE','21022',jdecode('Associate+Members'),jdecode(''),'/35755/21022.html','true',[],''],
		['PAGE','43355',jdecode('Ballard%26%23x27%3Bs+Rules+for+FPD'),jdecode(''),'/35755/43355.html','true',[],''],
		['PAGE','18843',jdecode('Board+of+Governors'),jdecode(''),'/35755/18843.html','true',[],''],
		['PAGE','35218',jdecode('Board+Expansion'),jdecode(''),'/35755/35218.html','true',[],''],
		['PAGE','35155',jdecode('Circuit+Court+Judgments'),jdecode(''),'/35755/35155.html','true',[],''],
		['PAGE','34455',jdecode('Expectations+of+Fire+Chief'),jdecode(''),'/35755/34455.html','true',[],''],
		['PAGE','21201',jdecode('Helpful+Links'),jdecode(''),'/35755/21201.html','true',[],''],
		['PAGE','76805',jdecode('MAFPD+Attorney+Info'),jdecode(''),'/35755/76805.html','true',[],''],
		['PAGE','30555',jdecode('MAFPD+By-Laws'),jdecode(''),'/35755/30555.html','true',[],''],
		['PAGE','30576',jdecode('MAFPD+Membership+Directory'),jdecode(''),'/35755/30576.html','false',[],''],
		['PAGE','35176',jdecode('MO+Attorney+General+Opinions'),jdecode(''),'/35755/35176.html','true',[],''],
		['PAGE','35197',jdecode('Sample+Bookkeeping+Agreement'),jdecode(''),'/35755/35197.html','true',[],''],
		['PAGE','98605',jdecode('Sample+Election+Ballot'),jdecode(''),'/35755/98605.html','true',[],''],
		['PAGE','25422',jdecode('Sample+FC+Employment+Contract'),jdecode(''),'/35755/25422.html','true',[],''],
		['PAGE','81905',jdecode('Sample+FPD+By-Laws'),jdecode(''),'/35755/81905.html','true',[],''],
		['PAGE','62255',jdecode('Sample%3A+Oath+of+Office'),jdecode(''),'/35755/62255.html','true',[],''],
		['PAGE','25401',jdecode('Sample+Sunshine+Law+Policy'),jdecode(''),'/35755/25401.html','true',[],''],
		['PAGE','72655',jdecode('%26%23x27%3B08+Conference+Handouts'),jdecode(''),'/35755/72655.html','true',[],''],
		['PAGE','75505',jdecode('%26%23x27%3B08+Conference+Photos'),jdecode(''),'/35755/75505.html','true',[],''],
		['PAGE','27855',jdecode('%26%23x27%3B07+Conference+Photos'),jdecode(''),'/35755/27855.html','true',[],'']
	],''],
	['PAGE','74155',jdecode('Guest+Book'),jdecode(''),'/74155.html','true',[],'']];
var siteelementCount=61;
theSitetree.topTemplateName='Gaudy';
theSitetree.paletteFamily='9D340D';
theSitetree.keyvisualId='5933';
theSitetree.keyvisualName='kv_5933.jpg';
theSitetree.fontsetId='11116';
theSitetree.graphicsetId='11907';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='D96F4F';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Gaudy',
				paletteFamily: 	'9D340D',
				keyvisualId: 	'5933',
				keyvisualName: 	'kv_5933.jpg',
				fontsetId: 		'11116',
				graphicsetId: 	'11907',
				contentColor: 	'000000',
				contentBGColor: 'D96F4F',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				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['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15901',
internalId:  '',
customField: '20100517-190410'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17601',
internalId:  '',
customField: '20080331-145830'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18001',
internalId:  '',
customField: '20080401-100050'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18201',
internalId:  '',
customField: '20080331-150121'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18843',
internalId:  '',
customField: '20090730-174906'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18401',
internalId:  '',
customField: '20080423-235019'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18522',
internalId:  '',
customField: '20080429-125255'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18543',
internalId:  '',
customField: '20080423-235249'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18564',
internalId:  '',
customField: '20080423-235204'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21022',
internalId:  '',
customField: '20100309-172542'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18822',
internalId:  '',
customField: '20090126-165701'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21201',
internalId:  '',
customField: '20090126-173700'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18501',
internalId:  '',
customField: '20090630-160944'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19901',
internalId:  '',
customField: '20080320-195618'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70955',
internalId:  '',
customField: '20080609-200845'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20222',
internalId:  '',
customField: '20080703-144836'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20501',
internalId:  '',
customField: '20090126-173528'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27855',
internalId:  '',
customField: '20080331-154210'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '15901',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18648',
internalId:  '',
customField: '20100216-195355'
};
webappMappings['7060']=webappMappings['7060-fd59805ff6752fb868dbbc5bd1addbe6']={
webappId:    '7060',
documentId:  '27855',
internalId:  'fd59805ff6752fb868dbbc5bd1addbe6',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '99205',
internalId:  '',
customField: '20100216-193556'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '99105',
internalId:  '',
customField: '20100216-191710'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62255',
internalId:  '',
customField: '20090126-180452'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25401',
internalId:  '',
customField: '20090126-180033'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52655',
internalId:  '',
customField: '20080429-124919'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25422',
internalId:  '',
customField: '20090126-180240'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '98605',
internalId:  '',
customField: '20100126-152055'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29755',
internalId:  '',
customField: '20080423-235309'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30555',
internalId:  '',
customField: '20080331-152053'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30576',
internalId:  '',
customField: '20080331-154432'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30855',
internalId:  '',
customField: '20100111-165413'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30876',
internalId:  '',
customField: '20080605-142428'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35155',
internalId:  '',
customField: '20080407-153305'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35176',
internalId:  '',
customField: '20080416-121354'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34455',
internalId:  '',
customField: '20080823-203048'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35197',
internalId:  '',
customField: '20090126-175906'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35218',
internalId:  '',
customField: '20080331-153915'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79305',
internalId:  '',
customField: '20081028-150854'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70555',
internalId:  '',
customField: '20100517-202347'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35302',
internalId:  '',
customField: '20080707-184752'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35755',
internalId:  '',
customField: '20080423-123056'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '101605',
internalId:  '',
customField: '20100301-195354'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '101626',
internalId:  '',
customField: '20100301-194724'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41755',
internalId:  '',
customField: '20080429-140525'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43055',
internalId:  '',
customField: '20080429-125113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43076',
internalId:  '',
customField: '20080413-141350'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43355',
internalId:  '',
customField: '20080506-121834'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '99226',
internalId:  '',
customField: '20100216-192249'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56455',
internalId:  '',
customField: '20100413-134640'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66655',
internalId:  '',
customField: '20100216-193638'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75505',
internalId:  '',
customField: '20080711-170702'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72655',
internalId:  '',
customField: '20080703-144719'
};
webappMappings['1002']=webappMappings['1002-74155aendu0in2d1p']={
webappId:    '1002',
documentId:  '74155',
internalId:  '74155aendu0in2d1p',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74155',
internalId:  '',
customField: '20080703-152248'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '97326',
internalId:  '',
customField: '20100126-103254'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76805',
internalId:  '',
customField: '20080731-150422'
};
webappMappings['7060']=webappMappings['7060-18d15e759499413e6494a427d7935b7a']={
webappId:    '7060',
documentId:  '75505',
internalId:  '18d15e759499413e6494a427d7935b7a',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '97305',
internalId:  '',
customField: '20100126-103813'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59355',
internalId:  '',
customField: '20100517-204052'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81905',
internalId:  '',
customField: '20090126-175746'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '104726',
internalId:  '',
customField: '20100413-134115'
};
webappMappings['1501']=webappMappings['1501-6092354']={
webappId:    '1501',
documentId:  '15901',
internalId:  '6092354',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '103305',
internalId:  '',
customField: '20100309-170934'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '104705',
internalId:  '',
customField: '20100413-121711'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '95005',
internalId:  '',
customField: '20090527-192901'
};
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0IN2D1P';
var companyName   = 'Missouri+Association+of+Fire+Protection+Districts';
var htmlTitle	  = 'MAFPD';
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();
};
