/* [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','50901',jdecode('Home'),jdecode(''),'/50901.html','true',[],'',''],
	['PAGE','85001',jdecode('CANDIDATE+FORUMS'),jdecode(''),'/85001/index.html','true',[ 
		['PAGE','108101',jdecode('Seattle+City+Council+Forum'),jdecode(''),'/85001/108101.html','true',[],'',''],
		['PAGE','108122',jdecode('Seattle+School+Board+Forum'),jdecode(''),'/85001/108122.html','true',[],'',''],
		['PAGE','85022',jdecode('Candidate+Survey'),jdecode(''),'/85001/85022.html','false',[],'',''],
		['PAGE','85043',jdecode('The+Candidates'),jdecode(''),'/85001/85043.html','false',[],'',''],
		['PAGE','85064',jdecode('Where+They+Stand'),jdecode(''),'/85001/85064.html','false',[],'',''],
		['PAGE','87301',jdecode('Our+Endorsements'),jdecode(''),'/85001/87301.html','false',[],'',''],
		['PAGE','87322',jdecode('General+Election+Information'),jdecode(''),'/85001/87322.html','false',[],'','']
	],'',''],
	['PAGE','108401',jdecode('Forum+Notifications'),jdecode(''),'/108401.html','true',[],'',''],
	['PAGE','82801',jdecode('Guiding+Principles'),jdecode(''),'/82801.html','false',[],'',''],
	['PAGE','50973',jdecode('DISTRICTS+NOW'),jdecode(''),'/50973/index.html','false',[ 
		['PAGE','93622',jdecode('Seattle+Districts+Now+'),jdecode(''),'/50973/93622.html','true',[],'',''],
		['PAGE','100701',jdecode('Why+Districts+Are+Needed'),jdecode(''),'/50973/100701.html','true',[],'',''],
		['PAGE','98101',jdecode('Facebook+-+Seeking+Representation'),jdecode(''),'/50973/98101.html','false',[],'',''],
		['PAGE','82822',jdecode('Receive+Amendment+Updates'),jdecode(''),'/50973/82822.html','false',[],'',''],
		['PAGE','88201',jdecode('Your+Thoughts+on+the+Amendment'),jdecode(''),'/50973/88201.html','true',[],'',''],
		['PAGE','82501',jdecode('News+on+the+Charter+Amendment'),jdecode(''),'/50973/82501.html','false',[],'','']
	],'',''],
	['PAGE','103801',jdecode('ENDORSEMENTS+for+Districts+Now'),jdecode(''),'/103801.html','false',[],'',''],
	['PAGE','82064',jdecode('Get+Involved'),jdecode(''),'/82064/index.html','false',[ 
		['PAGE','82843',jdecode('Donate'),jdecode(''),'/82064/82843.html','true',[],'',''],
		['PAGE','94301',jdecode('Volunteer'),jdecode(''),'/82064/94301.html','true',[],'',''],
		['PAGE','94901',jdecode('Sign+the+Petition'),jdecode(''),'/82064/94901.html','true',[],'',''],
		['PAGE','83723',jdecode('Join+Us'),jdecode(''),'/82064/83723.html','true',[],'',''],
		['PAGE','82222',jdecode('Share+Your+Thoughts'),jdecode(''),'/82064/82222.html','true',[],'','']
	],'',''],
	['PAGE','100722',jdecode('PETITION+LOCATIONS'),jdecode(''),'/100722.html','false',[],'',''],
	['PAGE','84201',jdecode('Need+Help%3F'),jdecode(''),'/84201.html','false',[],'',''],
	['PAGE','85085',jdecode('City+Hall+Scorecard'),jdecode(''),'/85085/index.html','false',[ 
		['PAGE','85106',jdecode('The+Mayor'),jdecode(''),'/85085/85106.html','true',[],'',''],
		['PAGE','85127',jdecode('City+Council'),jdecode(''),'/85085/85127.html','true',[],'','']
	],'',''],
	['PAGE','84222',jdecode('Make+a+Difference'),jdecode(''),'/84222.html','false',[],'',''],
	['PAGE','51015',jdecode('In+the+News'),jdecode(''),'/51015.html','false',[],'',''],
	['PAGE','84701',jdecode('Knowledge+is+Power'),jdecode(''),'/84701.html','false',[],'',''],
	['PAGE','107101',jdecode('WHAT%26%23x27%3BS+WRONG...'),jdecode(''),'/107101.html','false',[],'',''],
	['PAGE','62401',jdecode('Noteworthy+Links'),jdecode(''),'/62401.html','false',[],'',''],
	['PAGE','62422',jdecode('Donate'),jdecode(''),'/62422.html','true',[],'',''],
	['PAGE','82085',jdecode('Mission+Statement'),jdecode(''),'/82085.html','true',[],'',''],
	['PAGE','93601',jdecode('About+ACTION+SEATTLE'),jdecode(''),'/93601.html','true',[],'',''],
	['PAGE','51036',jdecode('About+Us'),jdecode(''),'/51036/index.html','true',[ 
		['PAGE','50994',jdecode('Prior+Successes'),jdecode(''),'/51036/50994.html','false',[],'',''],
		['PAGE','51057',jdecode('Our+Team'),jdecode(''),'/51036/51057.html','false',[],'',''],
		['PAGE','84601',jdecode('Notes+of+Appreciation'),jdecode(''),'/51036/84601.html','false',[],'','']
	],'',''],
	['PAGE','50952',jdecode('Contact+Info'),jdecode(''),'/50952.html','true',[],'',''],
	['PAGE','85301',jdecode('Press+Inquiries'),jdecode(''),'/85301.html','true',[],'',''],
	['PAGE','82001',jdecode('Resources'),jdecode(''),'/82001.html','true',[],'',''],
	['PAGE','82285',jdecode('Search+Our+Website'),jdecode(''),'/82285.html','true',[],'','']];
var siteelementCount=46;
theSitetree.topTemplateName='Capri';
theSitetree.paletteFamily='385CA9';
theSitetree.keyvisualId='7245';
theSitetree.keyvisualName='kv_7245.jpg';
theSitetree.fontsetId='16409';
theSitetree.graphicsetId='12134';
theSitetree.contentColor='17336F';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Capri',
				paletteFamily: 	'385CA9',
				keyvisualId: 	'7245',
				keyvisualName: 	'kv_7245.jpg',
				fontsetId: 		'16409',
				graphicsetId: 	'12134',
				contentColor: 	'17336F',
				contentBGColor: 'FFFFFF',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50901',
internalId:  '',
customField: '20111007-164510'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50952',
internalId:  '',
customField: '20090504-192055'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50973',
internalId:  '',
customField: '20090607-151852'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50994',
internalId:  '',
customField: '20090504-193650'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51015',
internalId:  '',
customField: '20090504-194725'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51036',
internalId:  '',
customField: '20090701-100801'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51057',
internalId:  '',
customField: '20090504-193515'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62401',
internalId:  '',
customField: '20090504-194002'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62422',
internalId:  '',
customField: '20090504-125651'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82843',
internalId:  '',
customField: '20090607-115909'
};
webappMappings['7008']=webappMappings['7008-14069']={
webappId:    '7008',
documentId:  '82222',
internalId:  '14069',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82822',
internalId:  '',
customField: '20090505-074320'
};
webappMappings['7008']=webappMappings['7008-14305']={
webappId:    '7008',
documentId:  '82822',
internalId:  '14305',
customField: 'language:en;country:US;'
};
webappMappings['8002']=webappMappings['8002-search']={
webappId:    '8002',
documentId:  '82285',
internalId:  'search',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82085',
internalId:  '',
customField: '20090504-022311'
};
webappMappings['7008']=webappMappings['7008-16095']={
webappId:    '7008',
documentId:  '83723',
internalId:  '16095',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82801',
internalId:  '',
customField: '20090520-061732'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '93601',
internalId:  '',
customField: '20090520-022501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82064',
internalId:  '',
customField: '20090617-120433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82222',
internalId:  '',
customField: '20090505-070037'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82501',
internalId:  '',
customField: '20090607-015858'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82001',
internalId:  '',
customField: '20090625-024732'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82285',
internalId:  '',
customField: '20090504-193250'
};
webappMappings['7050']=webappMappings['7050-8150']={
webappId:    '7050',
documentId:  '82501',
internalId:  '8150',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84222',
internalId:  '',
customField: '20090504-194927'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83723',
internalId:  '',
customField: '20090505-053657'
};
webappMappings['7008']=webappMappings['7008-16225']={
webappId:    '7008',
documentId:  '84201',
internalId:  '16225',
customField: 'language:en;country:US;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '50901',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '108101',
internalId:  '',
customField: '20111007-165524'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85001',
internalId:  '',
customField: '20111007-161837'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85022',
internalId:  '',
customField: '20090504-203358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85043',
internalId:  '',
customField: '20090504-204302'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85064',
internalId:  '',
customField: '20090504-204758'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84201',
internalId:  '',
customField: '20090607-120351'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85085',
internalId:  '',
customField: '20090504-195606'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85106',
internalId:  '',
customField: '20090504-200251'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85127',
internalId:  '',
customField: '20090504-200543'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84701',
internalId:  '',
customField: '20090504-194508'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84601',
internalId:  '',
customField: '20090504-193756'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85301',
internalId:  '',
customField: '20090504-192539'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87301',
internalId:  '',
customField: '20090504-205723'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87322',
internalId:  '',
customField: '20090504-205857'
};
webappMappings['1002']=webappMappings['1002-88201aendu0in23eg']={
webappId:    '1002',
documentId:  '88201',
internalId:  '88201aendu0in23eg',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88201',
internalId:  '',
customField: '20090617-120215'
};
webappMappings['7008']=webappMappings['7008-16275']={
webappId:    '7008',
documentId:  '94301',
internalId:  '16275',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '93622',
internalId:  '',
customField: '20090607-115717'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '100722',
internalId:  '',
customField: '20090617-123606'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '94301',
internalId:  '',
customField: '20090607-120012'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '94901',
internalId:  '',
customField: '20090715-121622'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '98101',
internalId:  '',
customField: '20090519-022217'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '100701',
internalId:  '',
customField: '20090623-200841'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '103801',
internalId:  '',
customField: '20090617-143424'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '107101',
internalId:  '',
customField: '20090727-153315'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '108122',
internalId:  '',
customField: '20111007-162659'
};
webappMappings['7008']=webappMappings['7008-5627']={
webappId:    '7008',
documentId:  '108401',
internalId:  '5627',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '108401',
internalId:  '',
customField: '20111007-161538'
};
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0IN23EG';
var companyName   = 'ACTION+SEATTLE';
var htmlTitle	  = 'ACTION+SEATTLE';
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();
};

