/* [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','1701',jdecode('Home'),jdecode(''),'/1701.html','true',[],'',''],
	['PAGE','1752',jdecode('Becoming+a+Member'),jdecode(''),'/1752/index.html','true',[ 
		['PAGE','41485',jdecode('2010+Membership+Drive'),jdecode(''),'/1752/41485.html','true',[],'','']
	],'',''],
	['PAGE','1857',jdecode('Officers'),jdecode(''),'/1857.html','true',[],'',''],
	['PAGE','1836',jdecode('Committees'),jdecode(''),'/1836.html','true',[],'',''],
	['PAGE','1878',jdecode('Members'),jdecode(''),'/1878/index.html','true',[ 
		['PAGE','36585',jdecode('Members+Together'),jdecode(''),'/1878/36585.html','true',[],'','']
	],'',''],
	['PAGE','11285',jdecode('Club+Presidents'),jdecode(''),'/11285.html','true',[],'',''],
	['PAGE','32585',jdecode('Key+Club'),jdecode(''),'/32585.html','true',[],'',''],
	['PAGE','1920',jdecode('Division+32+Directory'),jdecode(''),'/1920.html','true',[],'',''],
	['PAGE','1773',jdecode('2010+Fitch+Mt.+Footrace'),jdecode(''),'/1773/index.html','true',[ 
		['PAGE','48896',jdecode('2010+Race+Results'),jdecode(''),'/1773/48896.html','true',[],'','']
	],'',''],
	['PAGE','1794',jdecode('2010+Pancake+Breakfast'),jdecode(''),'/1794.html','true',[],'',''],
	['PAGE','50096',jdecode('2009+Activities'),jdecode(''),'/50096/index.html','true',[ 
		['PAGE','29085',jdecode('2009+Dictionary+Dist.'),jdecode(''),'/50096/29085.html','true',[],'',''],
		['PAGE','25185',jdecode('2009+Golf+Tournament'),jdecode(''),'/50096/25185.html','true',[],'',''],
		['PAGE','26785',jdecode('Tourney+Winners'),jdecode(''),'/50096/26785.html','true',[],'',''],
		['PAGE','1815',jdecode('2009+Christmas+Tree+Lot'),jdecode(''),'/50096/1815.html','true',[],'',''],
		['PAGE','1899',jdecode('2009+Work+Schedule'),jdecode(''),'/50096/1899.html','true',[],'',''],
		['PAGE','9543',jdecode('2008+Tree+Lot+Pictures'),jdecode(''),'/50096/9543.html','true',[],'',''],
		['PAGE','13185',jdecode('2009+Fitch+Mt.+Footrace'),jdecode(''),'/50096/13185.html','true',[],'',''],
		['PAGE','23885',jdecode('2009+Footrace+Video'),jdecode(''),'/50096/23885.html','true',[],'',''],
		['PAGE','13206',jdecode('Footrace+Classes'),jdecode(''),'/50096/13206.html','true',[],'',''],
		['PAGE','13227',jdecode('Footrace+Registration+%26+Maps'),jdecode(''),'/50096/13227.html','true',[],'',''],
		['PAGE','13248',jdecode('Footrace+%26%23x27%3B08+Sponsors'),jdecode(''),'/50096/13248.html','true',[],'',''],
		['PAGE','14885',jdecode('2008+Race+Photos'),jdecode(''),'/50096/14885.html','true',[],'','']
	],'','']];
var siteelementCount=26;
theSitetree.topTemplateName='Angkor';
theSitetree.paletteFamily='879ED6';
theSitetree.keyvisualId='6900';
theSitetree.keyvisualName='kv_6900.jpg';
theSitetree.fontsetId='11211';
theSitetree.graphicsetId='12030';
theSitetree.contentColor='354B86';
theSitetree.contentBGColor='94AAE1';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Angkor',
				paletteFamily: 	'879ED6',
				keyvisualId: 	'6900',
				keyvisualName: 	'kv_6900.jpg',
				fontsetId: 		'11211',
				graphicsetId: 	'12030',
				contentColor: 	'354B86',
				contentBGColor: '94AAE1',
				a_color: 		'94AAE1',
				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['7008']=webappMappings['7008-556']={
webappId:    '7008',
documentId:  '1752',
internalId:  '556',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1701',
internalId:  '',
customField: '20091026-160105'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1815',
internalId:  '',
customField: '20091127-084637'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1899',
internalId:  '',
customField: '20091214-135353'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1752',
internalId:  '',
customField: '20090202-193939'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1773',
internalId:  '',
customField: '20100521-155944'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1794',
internalId:  '',
customField: '20100215-225952'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1836',
internalId:  '',
customField: '20091015-202749'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1857',
internalId:  '',
customField: '20091015-183409'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1878',
internalId:  '',
customField: '20100519-224928'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1920',
internalId:  '',
customField: '20091119-140216'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32585',
internalId:  '',
customField: '20100212-203512'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9543',
internalId:  '',
customField: '20081125-191403'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11285',
internalId:  '',
customField: '20081202-135407'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41485',
internalId:  '',
customField: '20100313-123439'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13185',
internalId:  '',
customField: '20090415-131634'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13206',
internalId:  '',
customField: '20090204-224948'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13227',
internalId:  '',
customField: '20090922-004853'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13248',
internalId:  '',
customField: '20090204-225220'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14885',
internalId:  '',
customField: '20090206-011213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23885',
internalId:  '',
customField: '20090922-004750'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25185',
internalId:  '',
customField: '20090914-103344'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26785',
internalId:  '',
customField: '20091022-154640'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29085',
internalId:  '',
customField: '20091022-154551'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36585',
internalId:  '',
customField: '20100216-002209'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48896',
internalId:  '',
customField: '20100615-190122'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INVSRZ';
var companyName   = 'Healdsburg+Kiwanis';
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();
};
