/* [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','501',jdecode('Home'),jdecode(''), jdecode('%2F501.html'), 'true',[],'',''],
	['PAGE','10001',jdecode('About+OES'),jdecode(''), jdecode('%2F10001%2Findex.html'), 'true',[ 
		['PAGE','19801',jdecode('Links'),jdecode(''), jdecode('%2F10001%2F19801.html'), 'true',[],'','']
	],'',''],
	['PAGE','552',jdecode('Chapters'),jdecode(''), jdecode('%2F552%2Findex.html'), 'true',[ 
		['PAGE','573',jdecode('Alliance'),jdecode(''), jdecode('%2F552%2F573.html'), 'true',[],'',''],
		['PAGE','594',jdecode('Carroll'),jdecode(''), jdecode('%2F552%2F594.html'), 'true',[],'',''],
		['PAGE','636',jdecode('Crystal'),jdecode(''), jdecode('%2F552%2F636.html'), 'true',[],'',''],
		['PAGE','657',jdecode('Delta'),jdecode(''), jdecode('%2F552%2F657.html'), 'true',[],'',''],
		['PAGE','678',jdecode('East+Palestine'),jdecode(''), jdecode('%2F552%2F678.html'), 'true',[],'',''],
		['PAGE','720',jdecode('Iva'),jdecode(''), jdecode('%2F552%2F720.html'), 'true',[],'',''],
		['PAGE','741',jdecode('Legacy'),jdecode(''), jdecode('%2F552%2F741.html'), 'true',[],'',''],
		['PAGE','762',jdecode('Louisville'),jdecode(''), jdecode('%2F552%2F762.html'), 'true',[],'',''],
		['PAGE','783',jdecode('Salem'),jdecode(''), jdecode('%2F552%2F783.html'), 'true',[],'','']
	],'',''],
	['PAGE','15401',jdecode('Charities'),jdecode(''), jdecode('%2F15401.html'), 'true',[],'',''],
	['PAGE','137301',jdecode('Dist13+Committee'),jdecode(''), jdecode('%2F137301.html'), 'true',[],'',''],
	['PAGE','45701',jdecode('District+History'),jdecode(''), jdecode('%2F45701%2Findex.html'), 'true',[ 
		['PAGE','2601',jdecode('General++History'),jdecode(''), jdecode('%2F45701%2F2601.html'), 'true',[],'',''],
		['PAGE','40601',jdecode('Past+Grand+Appts.'),jdecode(''), jdecode('%2F45701%2F40601.html'), 'true',[],'',''],
		['PAGE','40801',jdecode('Past+Presidents'),jdecode(''), jdecode('%2F45701%2F40801.html'), 'true',[],'','']
	],'',''],
	['PAGE','804',jdecode('Events'),jdecode(''), jdecode('%2F804.html'), 'true',[],'',''],
	['PAGE','2622',jdecode('Gr.+Chap.+Themes'),jdecode(''), jdecode('%2F2622.html'), 'true',[],'',''],
	['PAGE','46901',jdecode('Grand+Families'),jdecode(''), jdecode('%2F46901%2Findex.html'), 'true',[ 
		['PAGE','94001',jdecode('2008+Gr.+Family'),jdecode(''), jdecode('%2F46901%2F94001.html'), 'true',[],'',''],
		['PAGE','47322',jdecode('2007+Gr.+Family'),jdecode(''), jdecode('%2F46901%2F47322.html'), 'true',[],'',''],
		['PAGE','49401',jdecode('2005+Gr.+Family'),jdecode(''), jdecode('%2F46901%2F49401.html'), 'true',[],'',''],
		['PAGE','47301',jdecode('2003+Gr.+Family'),jdecode(''), jdecode('%2F46901%2F47301.html'), 'true',[],'',''],
		['PAGE','49422',jdecode('1999+Gr.+Family'),jdecode(''), jdecode('%2F46901%2F49422.html'), 'true',[],'','']
	],'',''],
	['PAGE','3206',jdecode('Guestbook'),jdecode(''), jdecode('%2F3206%2Findex.html'), 'true',[ 
		['PAGE','3201',jdecode('Read+Guestbook'),jdecode(''), jdecode('%2F3206%2F3201.html'), 'false',[],'','']
	],'',''],
	['PAGE','30001',jdecode('Honored+Masons'),jdecode(''), jdecode('%2F30001.html'), 'false',[],'',''],
	['PAGE','35601',jdecode('Organizations'),jdecode(''), jdecode('%2F35601%2Findex.html'), 'true',[ 
		['PAGE','11101',jdecode('D13+Association'),jdecode(''), jdecode('%2F35601%2F11101.html'), 'true',[],'',''],
		['PAGE','11122',jdecode('ESMA'),jdecode(''), jdecode('%2F35601%2F11122.html'), 'true',[],'',''],
		['PAGE','89001',jdecode('Former+Gr.+Appts.'),jdecode(''), jdecode('%2F35601%2F89001.html'), 'true',[],'',''],
		['PAGE','21501',jdecode('Kate+DeWees'),jdecode(''), jdecode('%2F35601%2F21501.html'), 'true',[],'',''],
		['PAGE','40201',jdecode('Line+Officers'),jdecode(''), jdecode('%2F35601%2F40201.html'), 'true',[],'','']
	],'',''],
	['PAGE','89101',jdecode('Print+Center'),jdecode(''), jdecode('%2F89101.html'), 'true',[],'','']];
var siteelementCount=37;
theSitetree.topTemplateName='Americanlife';
theSitetree.paletteFamily='50529E';
theSitetree.keyvisualId='4249';
theSitetree.keyvisualName='kv_4249.jpg';
theSitetree.fontsetId='10674';
theSitetree.graphicsetId='11195';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='7B7CB4';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'endurance',
  product: 'WSCSYSSSSLY0XRN4'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Americanlife',
				paletteFamily: 	'50529E',
				keyvisualId: 	'4249',
				keyvisualName: 	'kv_4249.jpg',
				fontsetId: 		'10674',
				graphicsetId: 	'11195',
				contentColor: 	'FFFFFF',
				contentBGColor: '7B7CB4',
				a_color: 		'000000',
				b_color: 		'000000',
				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['1002']=webappMappings['1002-3206aendu0in2wy8']={
webappId:    '1002',
documentId:  '3206',
internalId:  '3206aendu0in2wy8',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20111121-092325'
};
webappMappings['1501']=webappMappings['1501-4681426']={
webappId:    '1501',
documentId:  '501',
internalId:  '4681426',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '804',
internalId:  '',
customField: '20120113-101610'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10001',
internalId:  '',
customField: '20080929-093252'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '552',
internalId:  '',
customField: '20111121-091721'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '573',
internalId:  '',
customField: '20111121-092021'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '594',
internalId:  '',
customField: '20111108-173510'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '137301',
internalId:  '',
customField: '20110928-111206'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '636',
internalId:  '',
customField: '20111116-110710'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '657',
internalId:  '',
customField: '20111126-111825'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '678',
internalId:  '',
customField: '20111121-091541'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '720',
internalId:  '',
customField: '20111108-161833'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '741',
internalId:  '',
customField: '20111108-162724'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '762',
internalId:  '',
customField: '20111129-174336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '783',
internalId:  '',
customField: '20111108-173938'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11101',
internalId:  '',
customField: '20110928-112312'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11122',
internalId:  '',
customField: '20110214-102455'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2622',
internalId:  '',
customField: '20110928-111622'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19801',
internalId:  '',
customField: '20080317-141223'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21501',
internalId:  '',
customField: '20110928-112458'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2601',
internalId:  '',
customField: '20080709-085143'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3206',
internalId:  '',
customField: '20080306-093656'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3201',
internalId:  '',
customField: '20080227-151517'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15401',
internalId:  '',
customField: '20110928-110905'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40801',
internalId:  '',
customField: '20091112-080030'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40601',
internalId:  '',
customField: '20110928-104822'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40201',
internalId:  '',
customField: '20110928-113059'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45701',
internalId:  '',
customField: '20080710-191012'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30001',
internalId:  '',
customField: '20091109-085507'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35601',
internalId:  '',
customField: '20090106-115348'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46901',
internalId:  '',
customField: '20090107-105806'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47301',
internalId:  '',
customField: '20110816-140446'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47322',
internalId:  '',
customField: '20110816-141459'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89101',
internalId:  '',
customField: '20100909-195437'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89001',
internalId:  '',
customField: '20110928-113214'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49422',
internalId:  '',
customField: '20110816-135614'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49401',
internalId:  '',
customField: '20110816-140541'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '94001',
internalId:  '',
customField: '20110816-141541'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
var webAppHostname = 'cgiwsc.enhancedsitebuilder.com:80';
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0IN2WY8';
var companyName   = 'District+13%2C+Grand+Chapter+of+Ohio%2C+Order+of+the+Eastern+Star';
var htmlTitle	  = 'District+13+Grand+Chapter+of+Ohio+Order+of+the+Eastern+Star';
var metaKeywords  = 'District+13%2C+OES%2C+Order+of+the+Eastern+Star%2C+Grand+Chapter+of+Ohio%2C+northeastern+Ohio%2C+district+%2313%2C+Columbiana+County%2C+Carroll+County%2C+Stark+County%2C+Alliance%2C+Carroll%2C+Columbiana%2C+Crystal%2C+Delta%2C+East+Palestine%2C+Esther%2C+Iva%2C+Legacy%2C+Louisville%2C+Salem%2C+dist13ohoes%2C+region+L%2C+Larry+Groves%2C+Carol+Jones%2C+Marilyn+Giey%2C+ESMA%2C+Kate+DeWees%2C+';
var metaContents  = 'District+%2313+of+the+Grand+Chapter+of+Ohio%2C+Order+of+the+Eastern+Star+includes+information%2C+events%2C+chapters%2C+officers%2C+history%2C+links%2C+charities%2C+ESMA%2C+Kate+DeWees%2Cetc.';
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();
};

