/* [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','49143',jdecode('Thank+You'),jdecode(''),'/49143.html','true',[],''],
	['PAGE','401',jdecode('Home'),jdecode(''),'/401.html','true',[],''],
	['PAGE','37143',jdecode('Silent+Auction'),jdecode(''),'/37143/index.html','true',[ 
		['PAGE','47943',jdecode('Auction+Donators'),jdecode(''),'/37143/47943.html','true',[],'']
	],''],
	['PAGE','40643',jdecode('Participants'),jdecode(''),'/40643/index.html','true',[ 
		['PAGE','40664',jdecode('BBQ+Participants'),jdecode(''),'/40643/40664.html','true',[],''],
		['PAGE','40685',jdecode('Food+Booth+Participants'),jdecode(''),'/40643/40685.html','true',[],''],
		['PAGE','40706',jdecode('Winery+Participants'),jdecode(''),'/40643/40706.html','true',[],''],
		['PAGE','40727',jdecode('Silent+Auction+Participants'),jdecode(''),'/40643/40727.html','true',[],'']
	],''],
	['PAGE','1585',jdecode('Events'),jdecode(''),'/1585/index.html','true',[ 
		['PAGE','40143',jdecode('Entertainment+Lineup'),jdecode(''),'/1585/40143.html','true',[],''],
		['PAGE','2443',jdecode('Food+Booths'),jdecode(''),'/1585/2443/index.html','true',[ 
			['PAGE','17001',jdecode('Food+Booths+%28follow+up+page%29'),jdecode(''),'/1585/2443/17001.html','true',[],'']
		],'']
	],''],
	['PAGE','1522',jdecode('Sponsorships'),jdecode(''),'/1522/index.html','true',[ 
		['PAGE','1543',jdecode('Title+Sponsors'),jdecode(''),'/1522/1543/index.html','true',[ 
			['PAGE','13401',jdecode('Title+Sponsors+%28follow+up+page%29'),jdecode(''),'/1522/1543/13401.html','true',[],'']
		],''],
		['PAGE','1564',jdecode('BBQ+Sponsor'),jdecode(''),'/1522/1564/index.html','true',[ 
			['PAGE','14001',jdecode('BBQ+Sponsors+%28follow+up+page%29'),jdecode(''),'/1522/1564/14001.html','true',[],'']
		],''],
		['PAGE','2401',jdecode('Entertainment+Sponsors'),jdecode(''),'/1522/2401/index.html','true',[ 
			['PAGE','15701',jdecode('Entertainment+Sponors+%28follow+up+page%29'),jdecode(''),'/1522/2401/15701.html','true',[],'']
		],''],
		['PAGE','2422',jdecode('Winery+Sponsors'),jdecode(''),'/1522/2422/index.html','true',[ 
			['PAGE','14901',jdecode('Wine+Pavilion+Sponsors+%28follow+up+page%29'),jdecode(''),'/1522/2422/14901.html','true',[],'']
		],'']
	],''],
	['PAGE','36143',jdecode('Food%2FBeverage+Appl.'),jdecode(''),'/36143.html','true',[],''],
	['PAGE','10722',jdecode('150th--2007'),jdecode(''),'/10722/index.html','true',[ 
		['PAGE','19801',jdecode('Thank+You+To+All'),jdecode(''),'/10722/19801.html','true',[],''],
		['PAGE','19822',jdecode('Beneficiaries'),jdecode(''),'/10722/19822.html','true',[],''],
		['PAGE','10701',jdecode('Articles'),jdecode(''),'/10722/10701.html','true',[],''],
		['PAGE','1501',jdecode('Photos'),jdecode(''),'/10722/1501.html','true',[],'']
	],''],
	['PAGE','1648',jdecode('Links'),jdecode(''),'/1648.html','true',[],''],
	['PAGE','1669',jdecode('Contacts'),jdecode(''),'/1669/index.html','true',[ 
		['PAGE','17401',jdecode('Thank+You'),jdecode(''),'/1669/17401.html','true',[],'']
	],'']];
var siteelementCount=31;
theSitetree.topTemplateName='Sportive';
theSitetree.paletteFamily='E3FFDD';
theSitetree.keyvisualId='2668';
theSitetree.keyvisualName='generationen.jpg';
theSitetree.fontsetId='220';
theSitetree.graphicsetId='263';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='E3FFDD';
var theTemplate={
				name: 			'Sportive',
				paletteFamily: 	'E3FFDD',
				keyvisualId: 	'2668',
				keyvisualName: 	'generationen.jpg',
				fontsetId: 		'220',
				graphicsetId: 	'263',
				contentColor: 	'000000',
				contentBGColor: 'E3FFDD',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'E3FFDD',
				b_color: 		'B907BC',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1001']=webappMappings['1001-ahw050invnl611cb5dd4abb']={
webappId:    '1001',
documentId:  '1543',
internalId:  'ahw050invnl611cb5dd4abb',
customField: ''
};
webappMappings['1001']=webappMappings['1001-ahw050invnl611cb5dd4abb']={
webappId:    '1001',
documentId:  '13401',
internalId:  'ahw050invnl611cb5dd4abb',
customField: 'followUp'
};
webappMappings['1001']=webappMappings['1001-ahw050invnl611cb5e7a8cb']={
webappId:    '1001',
documentId:  '1564',
internalId:  'ahw050invnl611cb5e7a8cb',
customField: ''
};
webappMappings['1001']=webappMappings['1001-ahw050invnl611cb5e7a8cb']={
webappId:    '1001',
documentId:  '14001',
internalId:  'ahw050invnl611cb5e7a8cb',
customField: 'followUp'
};
webappMappings['1001']=webappMappings['1001-ahw050invnl611cb61e4e8e']={
webappId:    '1001',
documentId:  '2422',
internalId:  'ahw050invnl611cb61e4e8e',
customField: ''
};
webappMappings['1001']=webappMappings['1001-ahw050invnl611cb61e4e8e']={
webappId:    '1001',
documentId:  '14901',
internalId:  'ahw050invnl611cb61e4e8e',
customField: 'followUp'
};
webappMappings['1001']=webappMappings['1001-ahw050invnl611cb642ebac']={
webappId:    '1001',
documentId:  '2401',
internalId:  'ahw050invnl611cb642ebac',
customField: ''
};
webappMappings['1001']=webappMappings['1001-ahw050invnl611cb642ebac']={
webappId:    '1001',
documentId:  '15701',
internalId:  'ahw050invnl611cb642ebac',
customField: 'followUp'
};
webappMappings['1001']=webappMappings['1001-ahw050invnl611cb6663968']={
webappId:    '1001',
documentId:  '2443',
internalId:  'ahw050invnl611cb6663968',
customField: ''
};
webappMappings['1001']=webappMappings['1001-ahw050invnl611cb6663968']={
webappId:    '1001',
documentId:  '17001',
internalId:  'ahw050invnl611cb6663968',
customField: 'followUp'
};
webappMappings['1001']=webappMappings['1001-ahw050invnl611cb676acef']={
webappId:    '1001',
documentId:  '1669',
internalId:  'ahw050invnl611cb676acef',
customField: ''
};
webappMappings['1001']=webappMappings['1001-ahw050invnl611cb676acef']={
webappId:    '1001',
documentId:  '17401',
internalId:  'ahw050invnl611cb676acef',
customField: 'followUp'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20090505-171633'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1522',
internalId:  '',
customField: '20090107-163114'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1543',
internalId:  '',
customField: '20081102-235323'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13401',
internalId:  '',
customField: '20080930-194450'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1564',
internalId:  '',
customField: '20081102-235353'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14001',
internalId:  '',
customField: '20080930-195610'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2401',
internalId:  '',
customField: '20081102-235424'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15701',
internalId:  '',
customField: '20080930-213551'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2422',
internalId:  '',
customField: '20081102-235503'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14901',
internalId:  '',
customField: '20080930-205551'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1585',
internalId:  '',
customField: '20090409-144917'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2443',
internalId:  '',
customField: '20081023-170753'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17001',
internalId:  '',
customField: '20080930-221424'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10722',
internalId:  '',
customField: '20081102-235723'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19801',
internalId:  '',
customField: '20081102-235753'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19822',
internalId:  '',
customField: '20081102-235824'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10701',
internalId:  '',
customField: '20081102-235849'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1501',
internalId:  '',
customField: '20081023-171100'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1648',
internalId:  '',
customField: '20090506-133334'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1669',
internalId:  '',
customField: '20090320-103329'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17401',
internalId:  '',
customField: '20080930-223222'
};
webappMappings['7008']=webappMappings['7008-21']={
webappId:    '7008',
documentId:  '17401',
internalId:  '21',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47943',
internalId:  '',
customField: '20090422-181211'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49143',
internalId:  '',
customField: '20090609-171135'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36143',
internalId:  '',
customField: '20090320-113153'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37143',
internalId:  '',
customField: '20090422-172803'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40143',
internalId:  '',
customField: '20090217-165529'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40643',
internalId:  '',
customField: '20090311-175408'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40664',
internalId:  '',
customField: '20090331-180540'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40685',
internalId:  '',
customField: '20090408-230333'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40706',
internalId:  '',
customField: '20090312-133319'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40727',
internalId:  '',
customField: '20090312-124557'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INVNL6';
var companyName   = 'Celebrate+Healdsburg+2009';
var htmlTitle	  = '';
var metaKeywords  = 'Celebrate%2C+Healdsburg%2C+celebrateHealdsburg';
var metaContents  = 'Information+about+the+annual+Celebrate+Healdsburg+celebration+in+May';
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();
};

