/* [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','401',jdecode('Home'),jdecode(''),'/401.html','true',[],'',''],
	['PAGE','473',jdecode('Calendar'),jdecode(''),'/473.html','true',[],'',''],
	['PAGE','83689',jdecode('Events'),jdecode(''),'/83689/index.html','true',[ 
		['PAGE','84289',jdecode('J+%26+J+Dinner+3%2F6%2F2010'),jdecode(''),'/83689/84289.html','true',[],'',''],
		['PAGE','84310',jdecode('Spaghetti+Feed+2009'),jdecode(''),'/83689/84310.html','true',[],'',''],
		['PAGE','44301',jdecode('Lyon+County+Fair+2009'),jdecode(''),'/83689/44301.html','true',[],'',''],
		['PAGE','51001',jdecode('Joe+Dini%26%23x27%3Bs+Picnic+2009'),jdecode(''),'/83689/51001.html','true',[],'','']
	],'',''],
	['PAGE','452',jdecode('News'),jdecode(''),'/452/index.html','true',[ 
		['PAGE','494',jdecode('Club+Newspaper'),jdecode(''),'/452/494.html','true',[],'',''],
		['PAGE','515',jdecode('LCDCC'),jdecode(''),'/452/515.html','true',[],'','']
	],'',''],
	['PAGE','536',jdecode('Executive+Board'),jdecode(''),'/536.html','true',[],'',''],
	['PAGE','641',jdecode('Committees'),jdecode(''),'/641/index.html','true',[ 
		['PAGE','662',jdecode('By-laws'),jdecode(''),'/641/662.html','true',[],'',''],
		['PAGE','683',jdecode('Resolutions'),jdecode(''),'/641/683.html','true',[],'',''],
		['PAGE','704',jdecode('Volunteers'),jdecode(''),'/641/704.html','true',[],'',''],
		['PAGE','725',jdecode('Finance'),jdecode(''),'/641/725.html','true',[],'','']
	],'',''],
	['PAGE','84089',jdecode('Candidates'),jdecode(''),'/84089/index.html','true',[ 
		['PAGE','85189',jdecode('Governor'),jdecode(''),'/84089/85189.html','true',[],'',''],
		['PAGE','85289',jdecode('Lt.+Governor'),jdecode(''),'/84089/85289.html','true',[],'',''],
		['PAGE','85389',jdecode('US+Senator'),jdecode(''),'/84089/85389.html','true',[],'','']
	],'',''],
	['PAGE','10201',jdecode('Elected+Officials'),jdecode(''),'/10201.html','true',[],'',''],
	['PAGE','746',jdecode('Local+Democratic+Clubs'),jdecode(''),'/746/index.html','true',[ 
		['PAGE','767',jdecode('Dayton+Democrats'),jdecode(''),'/746/767.html','true',[],'',''],
		['PAGE','788',jdecode('Fernley+Democrats'),jdecode(''),'/746/788.html','true',[],'',''],
		['PAGE','809',jdecode('South+Lyon+Democrats'),jdecode(''),'/746/809.html','true',[],'','']
	],'',''],
	['PAGE','851',jdecode('State+Democratic+Party'),jdecode(''),'/851.html','true',[],'',''],
	['PAGE','872',jdecode('National+Committee'),jdecode(''),'/872.html','true',[],'',''],
	['PAGE','893',jdecode('Other+Counties'),jdecode(''),'/893.html','true',[],'',''],
	['PAGE','914',jdecode('By-Laws'),jdecode(''),'/914.html','true',[],'',''],
	['PAGE','998',jdecode('Platform'),jdecode(''),'/998.html','true',[],'',''],
	['PAGE','956',jdecode('Volunteer'),jdecode(''),'/956.html','true',[],'',''],
	['PAGE','977',jdecode('Contact+us'),jdecode(''),'/977.html','true',[],'',''],
	['PAGE','1019',jdecode('Donate'),jdecode(''),'/1019.html','true',[],'',''],
	['PAGE','935',jdecode('Local+Newpapers'),jdecode(''),'/935.html','true',[],'','']];
var siteelementCount=34;
theSitetree.topTemplateName='Architekt';
theSitetree.paletteFamily='8CBBD8';
theSitetree.keyvisualId='2055';
theSitetree.keyvisualName='blanko.jpg';
theSitetree.fontsetId='282';
theSitetree.graphicsetId='348';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='8CBBD8';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Architekt',
				paletteFamily: 	'8CBBD8',
				keyvisualId: 	'2055',
				keyvisualName: 	'blanko.jpg',
				fontsetId: 		'282',
				graphicsetId: 	'348',
				contentColor: 	'000000',
				contentBGColor: '8CBBD8',
				a_color: 		'8CBBD8',
				b_color: 		'338299',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-13908391']={
webappId:    '1501',
documentId:  '401',
internalId:  '13908391',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20100122-145057'
};
webappMappings['7060']=webappMappings['7060-6de6611e95de4c153523a417ea81ac3d']={
webappId:    '7060',
documentId:  '44301',
internalId:  '6de6611e95de4c153523a417ea81ac3d',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85289',
internalId:  '',
customField: '20100222-120138'
};
webappMappings['7060']=webappMappings['7060-2ef52a02ecdf741f7f6599d77987b246']={
webappId:    '7060',
documentId:  '51001',
internalId:  '2ef52a02ecdf741f7f6599d77987b246',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '452',
internalId:  '',
customField: '20100125-071553'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '515',
internalId:  '',
customField: '20090523-122228'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '473',
internalId:  '',
customField: '20100125-071633'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44301',
internalId:  '',
customField: '20080921-161246'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51001',
internalId:  '',
customField: '20080921-140238'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '494',
internalId:  '',
customField: '20100129-121607'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '536',
internalId:  '',
customField: '20090422-123911'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '641',
internalId:  '',
customField: '20080630-170936'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '662',
internalId:  '',
customField: '20090626-115632'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '683',
internalId:  '',
customField: '20090626-115653'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '704',
internalId:  '',
customField: '20090626-115728'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '725',
internalId:  '',
customField: '20090626-115821'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10201',
internalId:  '',
customField: '20100129-124655'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '746',
internalId:  '',
customField: '20100123-085048'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '767',
internalId:  '',
customField: '20090422-124043'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '788',
internalId:  '',
customField: '20090422-124220'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '809',
internalId:  '',
customField: '20090318-103654'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '851',
internalId:  '',
customField: '20080630-224302'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '872',
internalId:  '',
customField: '20080620-121347'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '893',
internalId:  '',
customField: '20080628-172753'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '914',
internalId:  '',
customField: '20090923-072407'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '998',
internalId:  '',
customField: '20080712-165139'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '956',
internalId:  '',
customField: '20090626-115508'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '977',
internalId:  '',
customField: '20100122-145750'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1019',
internalId:  '',
customField: '20100122-145659'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '935',
internalId:  '',
customField: '20080630-230109'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85389',
internalId:  '',
customField: '20100129-123541'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85189',
internalId:  '',
customField: '20100210-135859'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84289',
internalId:  '',
customField: '20100129-085727'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83689',
internalId:  '',
customField: '20100129-085024'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84089',
internalId:  '',
customField: '20100129-122312'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84310',
internalId:  '',
customField: '20100129-112612'
};
var canonHostname = 'wscwrk01.ehost-services.com';
var accountId     = 'AEN010INLTZR';
var companyName   = 'Lyon+County+Democrats';
var htmlTitle	  = 'Lyon+County+Democratc';
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();
};
