/* [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','601',jdecode('Home'),jdecode(''),'/601.html','true',[],''],
	['PAGE','7101',jdecode('Club+History'),jdecode(''),'/7101.html','true',[],''],
	['PAGE','7122',jdecode('Officers'),jdecode(''),'/7122.html','true',[],''],
	['PAGE','5164',jdecode('Meetings'),jdecode(''),'/5164.html','true',[],''],
	['PAGE','5185',jdecode('Newsletter'),jdecode(''),'/5185.html','true',[],''],
	['PAGE','5206',jdecode('Classes'),jdecode(''),'/5206.html','true',[],''],
	['PAGE','20801',jdecode('Wed.+Night+Carvers'),jdecode(''),'/20801.html','true',[],''],
	['PAGE','6701',jdecode('Membership'),jdecode(''),'/6701.html','true',[],''],
	['PAGE','5227',jdecode('Annual+Show'),jdecode(''),'/5227/index.html','true',[ 
		['PAGE','42005',jdecode('Raffle+prizes+2009'),jdecode(''),'/5227/42005.html','true',[],''],
		['PAGE','20001',jdecode('2007+Show+Photos'),jdecode(''),'/5227/20001.html','true',[],''],
		['PAGE','34601',jdecode('2008+Show+Photos+'),jdecode(''),'/5227/34601.html','true',[],''],
		['PAGE','42869',jdecode('2009+Show+Photos'),jdecode(''),'/5227/42869.html','true',[],'']
	],''],
	['PAGE','5269',jdecode('Contact'),jdecode(''),'/5269.html','true',[],''],
	['PAGE','41083',jdecode('Special+Events'),jdecode(''),'/41083.html','true',[],'']];
var siteelementCount=15;
theSitetree.topTemplateName='Akropolis';
theSitetree.paletteFamily='4A587F';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10553';
theSitetree.graphicsetId='10449';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='4A587F';
var theTemplate={
				name: 			'Akropolis',
				paletteFamily: 	'4A587F',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10553',
				graphicsetId: 	'10449',
				contentColor: 	'FFFFFF',
				contentBGColor: '4A587F',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'4A587F',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '601',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-1180919']={
webappId:    '1501',
documentId:  '601',
internalId:  '1180919',
customField: '1501'
};
webappMappings['7060']=webappMappings['7060-f6bfe64d26eed08814a281f2a9493be9']={
webappId:    '7060',
documentId:  '20001',
internalId:  'f6bfe64d26eed08814a281f2a9493be9',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-c2c646662e31b8631b22da032a9799d0']={
webappId:    '7060',
documentId:  '42005',
internalId:  'c2c646662e31b8631b22da032a9799d0',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-98dfaa2391d1ba0c15051bc158ce7b60']={
webappId:    '7060',
documentId:  '34601',
internalId:  '98dfaa2391d1ba0c15051bc158ce7b60',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '601',
internalId:  '',
customField: '20100104-074335'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5185',
internalId:  '',
customField: '20100104-062528'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5164',
internalId:  '',
customField: '20100104-062931'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5227',
internalId:  '',
customField: '20100104-073655'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7101',
internalId:  '',
customField: '20090407-103223'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7122',
internalId:  '',
customField: '20091215-085650'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5206',
internalId:  '',
customField: '20100104-074542'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20801',
internalId:  '',
customField: '20100104-063334'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6701',
internalId:  '',
customField: '20090914-203702'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42005',
internalId:  '',
customField: '20090514-203313'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20001',
internalId:  '',
customField: '20080412-194558'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34601',
internalId:  '',
customField: '20080531-165809'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5269',
internalId:  '',
customField: '20100104-072827'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41083',
internalId:  '',
customField: '20100104-074412'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42869',
internalId:  '',
customField: '20100104-074322'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INE6GM';
var companyName   = 'Genesee+Valley+Woodcarvers%2C+Rochester%2C+New+York';
var htmlTitle	  = 'Genesee+Valley+Woodcarvers%2C+Rochester%2C+New+York';
var metaKeywords  = 'woodcarver+++woodcarving+Rochester+++New+York++Genesee+Valley+decoy+Show+competition+sale+soap';
var metaContents  = 'The+Genesee+Valley+Woodcarvers+Club+provides+a+forum+for+woodcarvers+to+meet%2C+exhibit+their+work%2C+share+experiences%2C+and+exchange+information.++Many+club+members+teach+carving+classes+at+local+high+schools+and+the+Rochester+Museum+and+Science+Center.+++The+club+sponsors+and+annual+Show%2C+Sale%2C+and+Competition+every+April.';
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();
};
