/* [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','5401',jdecode('Home'),jdecode(''), jdecode('%2F5401.html'), 'true',[],'',''],
	['PAGE','14122',jdecode('History+of+Harmony+Hall'),jdecode(''), jdecode('%2F14122.html'), 'true',[],'',''],
	['PAGE','14101',jdecode('Friends+of+Harmony+Hall'),jdecode(''), jdecode('%2F14101.html'), 'true',[],'',''],
	['PAGE','43401',jdecode('Coming+Events'),jdecode(''), jdecode('%2F43401%2Findex.html'), 'true',[ 
		['PAGE','59623',jdecode('Friday+Night+Salon+Series'),jdecode(''), jdecode('%2F43401%2F59623.html'), 'false',[],'','']
	],'',''],
	['PAGE','92134',jdecode('An+Antique+Roadshow'),jdecode(''), jdecode('%2F92134.html'), 'false',[],'',''],
	['PAGE','42501',jdecode('Festival+Highlights'),jdecode(''), jdecode('%2F42501%2Findex.html'), 'false',[ 
		['PAGE','42522',jdecode('Featured+Artists'),jdecode(''), jdecode('%2F42501%2F42522.html'), 'false',[],'',''],
		['PAGE','42543',jdecode('Sponsorship%2FAdvertising'),jdecode(''), jdecode('%2F42501%2F42543.html'), 'false',[],'',''],
		['PAGE','42564',jdecode('Become+an+Exhibitor'),jdecode(''), jdecode('%2F42501%2F42564.html'), 'false',[],'','']
	],'',''],
	['PAGE','14143',jdecode('Restoration+News'),jdecode(''), jdecode('%2F14143%2Findex.html'), 'true',[ 
		['PAGE','76334',jdecode('Roof+%26+Verandah'),jdecode(''), jdecode('%2F14143%2F76334.html'), 'true',[],'',''],
		['PAGE','59686',jdecode('1848+Floors'),jdecode(''), jdecode('%2F14143%2F59686.html'), 'true',[],'',''],
		['PAGE','76355',jdecode('Parlor+Chandelier'),jdecode(''), jdecode('%2F14143%2F76355.html'), 'true',[],'',''],
		['PAGE','61323',jdecode('Landscape+Updates'),jdecode(''), jdecode('%2F14143%2F61323.html'), 'false',[],'','']
	],'',''],
	['PAGE','82034',jdecode('Farmony'),jdecode(''), jdecode('%2F82034.html'), 'false',[],'',''],
	['PAGE','59644',jdecode('Victorian+Holiday+Album'),jdecode(''), jdecode('%2F59644.html'), 'false',[],'',''],
	['PAGE','47201',jdecode('Membership'),jdecode(''), jdecode('%2F47201.html'), 'true',[],'',''],
	['PAGE','72234',jdecode('Members+Page'),jdecode(''), jdecode('%2F72234.html'), 'true',[],'',''],
	['PAGE','72834',jdecode('Guestbook'),jdecode(''), jdecode('%2F72834.html'), 'true',[],'',''],
	['PAGE','50801',jdecode('Newsletters'),jdecode(''), jdecode('%2F50801.html'), 'true',[],'',''],
	['PAGE','83334',jdecode('Directions'),jdecode(''), jdecode('%2F83334.html'), 'true',[],'',''],
	['PAGE','14164',jdecode('Contact+us'),jdecode(''), jdecode('%2F14164.html'), 'true',[],'','']];
var siteelementCount=23;
theSitetree.topTemplateName='Basic';
theSitetree.paletteFamily='36566E';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10828';
theSitetree.graphicsetId='11283';
theSitetree.contentColor='36566E';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'hps_testtown',
  product: 'WSCSYSSSSLYTC245'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Basic',
				paletteFamily: 	'36566E',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10828',
				graphicsetId: 	'11283',
				contentColor: 	'36566E',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				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['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5401',
internalId:  '',
customField: '20111215-163852'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '5401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14101',
internalId:  '',
customField: '20111019-212254'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14122',
internalId:  '',
customField: '20111019-212210'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14143',
internalId:  '',
customField: '20111019-232301'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14164',
internalId:  '',
customField: '20110605-201059'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92134',
internalId:  '',
customField: '20111019-210512'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42522',
internalId:  '',
customField: '20100819-221815'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43401',
internalId:  '',
customField: '20111207-141945'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42543',
internalId:  '',
customField: '20100818-233950'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42564',
internalId:  '',
customField: '20100818-225008'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42501',
internalId:  '',
customField: '20100818-193452'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47201',
internalId:  '',
customField: '20110108-162123'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50801',
internalId:  '',
customField: '20110108-165918'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59623',
internalId:  '',
customField: '20110529-204729'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59644',
internalId:  '',
customField: '20111019-213502'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59686',
internalId:  '',
customField: '20110404-151912'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61323',
internalId:  '',
customField: '20110404-165252'
};
webappMappings['7050']=webappMappings['7050-3305']={
webappId:    '7050',
documentId:  '72234',
internalId:  '3305',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-9af670154385ec13c1572bc192f065d3']={
webappId:    '7060',
documentId:  '59644',
internalId:  '9af670154385ec13c1572bc192f065d3',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72234',
internalId:  '',
customField: '20110529-214955'
};
webappMappings['1002']=webappMappings['1002-72834ahw050invxdv']={
webappId:    '1002',
documentId:  '72834',
internalId:  '72834ahw050invxdv',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72834',
internalId:  '',
customField: '20110108-183020'
};
webappMappings['1501']=webappMappings['1501-8612891']={
webappId:    '1501',
documentId:  '5401',
internalId:  '8612891',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76355',
internalId:  '',
customField: '20110404-152929'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76334',
internalId:  '',
customField: '20110622-174846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82034',
internalId:  '',
customField: '20110729-192528'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83334',
internalId:  '',
customField: '20110605-201338'
};
webappMappings['7060']=webappMappings['7060-e9db05dbea04af9858abad348b64422e']={
webappId:    '7060',
documentId:  '76334',
internalId:  'e9db05dbea04af9858abad348b64422e',
customField: 'language:en;country:US;'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INVXDV';
var companyName   = 'Friends+of+Harmony+Hall+%7E+Jacob+Sloat+House';
var htmlTitle	  = 'Friends+of+Harmony+Hall+-+Jacob+Sloat+House';
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();
};

