/* [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(''), jdecode('%2F1701.html'), 'true',[],'',''],
	['PAGE','275834',jdecode('Become+a+Sponsor%21'),jdecode(''), jdecode('%2F275834.html'), 'true',[],'',''],
	['PAGE','4022',jdecode('Battery+History'),jdecode(''), jdecode('%2F4022.html'), 'true',[],'',''],
	['PAGE','5301',jdecode('ORIGINAL+ROSTER'),jdecode(''), jdecode('%2F5301.html'), 'true',[],'',''],
	['PAGE','14415',jdecode('+++Biographies+A+-+M'),jdecode(''), jdecode('%2F14415.html'), 'true',[],'',''],
	['PAGE','92115',jdecode('+++Biographies+N+-+Z'),jdecode(''), jdecode('%2F92115.html'), 'true',[],'',''],
	['PAGE','102415',jdecode('+++Original+Documents+'),jdecode(''), jdecode('%2F102415.html'), 'true',[],'',''],
	['PAGE','13915',jdecode('+++Letters'),jdecode(''), jdecode('%2F13915.html'), 'true',[],'',''],
	['PAGE','230929',jdecode('+++GAR+Membership'),jdecode(''), jdecode('%2F230929.html'), 'true',[],'',''],
	['PAGE','13936',jdecode('+++Obituaries'),jdecode(''), jdecode('%2F13936.html'), 'true',[],'',''],
	['PAGE','23615',jdecode('+++Burial+Sites'),jdecode(''), jdecode('%2F23615.html'), 'true',[],'',''],
	['PAGE','118229',jdecode('+++Battery+Mysteries'),jdecode(''), jdecode('%2F118229.html'), 'true',[],'',''],
	['PAGE','4043',jdecode('OUR+RE-ENACTORS'),jdecode(''), jdecode('%2F4043.html'), 'true',[],'',''],
	['PAGE','239634',jdecode('+++Upcoming+Events'),jdecode(''), jdecode('%2F239634.html'), 'true',[],'',''],
	['PAGE','311134',jdecode('Become+a+Member%21'),jdecode(''), jdecode('%2F311134.html'), 'true',[],'',''],
	['PAGE','250634',jdecode('+++Our+Gun'),jdecode(''), jdecode('%2F250634.html'), 'true',[],'',''],
	['PAGE','330734',jdecode('+++Gallery+2012'),jdecode(''), jdecode('%2F330734.html'), 'true',[],'',''],
	['PAGE','300634',jdecode('+++Gallery+2011'),jdecode(''), jdecode('%2F300634.html'), 'true',[],'',''],
	['PAGE','245134',jdecode('+++Gallery+2010'),jdecode(''), jdecode('%2F245134.html'), 'true',[],'',''],
	['PAGE','193029',jdecode('+++Gallery+2009'),jdecode(''), jdecode('%2F193029.html'), 'true',[],'',''],
	['PAGE','17515',jdecode('+++Gallery+-+2008+%26+Prior'),jdecode(''), jdecode('%2F17515.html'), 'true',[],'',''],
	['PAGE','213429',jdecode('+++Other+Eras'),jdecode(''), jdecode('%2F213429.html'), 'true',[],'',''],
	['PAGE','324134',jdecode('Videos'),jdecode(''), jdecode('%2F324134.html'), 'false',[],'',''],
	['PAGE','135029',jdecode('+++Advancing+the+Guidon'),jdecode(''), jdecode('%2F135029.html'), 'true',[],'',''],
	['PAGE','4127',jdecode('+++Members%26%23x27%3B+Articles'),jdecode(''), jdecode('%2F4127.html'), 'true',[],'',''],
	['PAGE','178129',jdecode('+++In+the+News+%2F+Honors'),jdecode(''), jdecode('%2F178129.html'), 'true',[],'',''],
	['PAGE','227229',jdecode('Ceremonies%2F+Poems'),jdecode(''), jdecode('%2F227229.html'), 'true',[],'',''],
	['PAGE','159729',jdecode('Maps'),jdecode(''), jdecode('%2F159729.html'), 'true',[],'',''],
	['PAGE','4001',jdecode('Civil+War+Artillery+'),jdecode(''), jdecode('%2F4001.html'), 'true',[],'',''],
	['PAGE','35915',jdecode('+++Ammunition+%26+Equipment'),jdecode(''), jdecode('%2F35915.html'), 'true',[],'',''],
	['PAGE','42715',jdecode('+++Famous+Weapons'),jdecode(''), jdecode('%2F42715.html'), 'true',[],'',''],
	['PAGE','4085',jdecode('Encyclopedia+of+Civil+War+Artillery'),jdecode(''), jdecode('%2F4085.html'), 'true',[],'',''],
	['PAGE','67215',jdecode('+++Guns+-+Page+1'),jdecode(''), jdecode('%2F67215.html'), 'true',[],'',''],
	['PAGE','67415',jdecode('+++Guns+-+Page+2'),jdecode(''), jdecode('%2F67415.html'), 'true',[],'',''],
	['PAGE','79215',jdecode('+++Guns+-+Page+3'),jdecode(''), jdecode('%2F79215.html'), 'true',[],'',''],
	['PAGE','30936',jdecode('Information+Desk'),jdecode(''), jdecode('%2F30936.html'), 'true',[],'',''],
	['PAGE','4064',jdecode('National+Register+of+Surviving+Civil+War+Artillery'),jdecode(''), jdecode('%2F4064.html'), 'true',[],'',''],
	['PAGE','122629',jdecode('+++Sites+A+-+F'),jdecode(''), jdecode('%2F122629.html'), 'true',[],'',''],
	['PAGE','122650',jdecode('+++Sites+G+-+P'),jdecode(''), jdecode('%2F122650.html'), 'true',[],'',''],
	['PAGE','125429',jdecode('+++Sites+R+-+Z'),jdecode(''), jdecode('%2F125429.html'), 'true',[],'',''],
	['PAGE','299334',jdecode('BOOK+-+Foreword'),jdecode(''), jdecode('%2F299334.html'), 'true',[],'',''],
	['PAGE','299434',jdecode('++Chapter+1'),jdecode(''), jdecode('%2F299434.html'), 'true',[],'',''],
	['PAGE','301934',jdecode('++Chapter+2'),jdecode(''), jdecode('%2F301934.html'), 'true',[],'',''],
	['PAGE','302834',jdecode('++Chapter+3'),jdecode(''), jdecode('%2F302834.html'), 'true',[],'',''],
	['PAGE','304134',jdecode('++Chapter+4'),jdecode(''), jdecode('%2F304134.html'), 'true',[],'',''],
	['PAGE','306134',jdecode('++Chapter+5'),jdecode(''), jdecode('%2F306134.html'), 'true',[],'',''],
	['PAGE','308434',jdecode('++Chapter+6'),jdecode(''), jdecode('%2F308434.html'), 'false',[],'',''],
	['PAGE','30915',jdecode('Links'),jdecode(''), jdecode('%2F30915.html'), 'true',[],'','']];
var siteelementCount=48;
theSitetree.topTemplateName='Georgia';
theSitetree.paletteFamily='6080D3';
theSitetree.keyvisualId='5998';
theSitetree.keyvisualName='kv_5998.jpg';
theSitetree.fontsetId='11119';
theSitetree.graphicsetId='11911';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='6080D3';
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: 			'Georgia',
				paletteFamily: 	'6080D3',
				keyvisualId: 	'5998',
				keyvisualName: 	'kv_5998.jpg',
				fontsetId: 		'11119',
				graphicsetId: 	'11911',
				contentColor: 	'FFFFFF',
				contentBGColor: '6080D3',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1701',
internalId:  '',
customField: '20110802-183344'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4022',
internalId:  '',
customField: '20091130-180635'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4001',
internalId:  '',
customField: '20080817-112653'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4127',
internalId:  '',
customField: '20111111-143657'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5301',
internalId:  '',
customField: '20110518-180431'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13915',
internalId:  '',
customField: '20100805-120837'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4064',
internalId:  '',
customField: '20090104-085630'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13936',
internalId:  '',
customField: '20110518-181728'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14415',
internalId:  '',
customField: '20100814-072425'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4043',
internalId:  '',
customField: '20091211-174320'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4085',
internalId:  '',
customField: '20080820-052827'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30915',
internalId:  '',
customField: '20111214-131127'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17515',
internalId:  '',
customField: '20081013-064543'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23615',
internalId:  '',
customField: '20110518-180839'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42715',
internalId:  '',
customField: '20080806-071536'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '227229',
internalId:  '',
customField: '20091105-183107'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '122629',
internalId:  '',
customField: '20081224-125820'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30936',
internalId:  '',
customField: '20080918-060458'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35915',
internalId:  '',
customField: '20080910-051827'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67215',
internalId:  '',
customField: '20100920-181120'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67415',
internalId:  '',
customField: '20080904-062532'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92115',
internalId:  '',
customField: '20110327-124535'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79215',
internalId:  '',
customField: '20080904-062740'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '118229',
internalId:  '',
customField: '20090305-184540'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '102415',
internalId:  '',
customField: '20110117-173846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '122650',
internalId:  '',
customField: '20090405-113520'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '125429',
internalId:  '',
customField: '20081224-125457'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '135029',
internalId:  '',
customField: '20080912-060606'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '159729',
internalId:  '',
customField: '20080918-055856'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '178129',
internalId:  '',
customField: '20100303-184826'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '213429',
internalId:  '',
customField: '20111111-061025'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '193029',
internalId:  '',
customField: '20091107-125928'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '245134',
internalId:  '',
customField: '20100928-193609'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '230929',
internalId:  '',
customField: '20091112-101843'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '239634',
internalId:  '',
customField: '20111117-183420'
};
webappMappings['1501']=webappMappings['1501-10832249']={
webappId:    '1501',
documentId:  '1701',
internalId:  '10832249',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '250634',
internalId:  '',
customField: '20100424-075711'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '275834',
internalId:  '',
customField: '20111214-132605'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '299334',
internalId:  '',
customField: '20110115-140452'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '299434',
internalId:  '',
customField: '20110124-140852'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '300634',
internalId:  '',
customField: '20111121-185542'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '301934',
internalId:  '',
customField: '20110202-111417'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '302834',
internalId:  '',
customField: '20110220-110753'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '304134',
internalId:  '',
customField: '20110221-182232'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '306134',
internalId:  '',
customField: '20110306-161459'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '308434',
internalId:  '',
customField: '20110313-115210'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '311134',
internalId:  '',
customField: '20110422-134406'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '324134',
internalId:  '',
customField: '20110916-102457'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '330734',
internalId:  '',
customField: '20120119-174759'
};
var webAppHostname = 'cgiwsc.enhancedsitebuilder.com:80';
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0IN2VLW';
var companyName   = 'Robinson%27s+Battery';
var htmlTitle	  = 'Robinson%27s+Battery+-+1st+Michigan+Light+Artillery%2C+Battery+C';
var metaKeywords  = 'American+Civil+War%2C+Civil+War%2C+artillery%2C+cannon%2C+March+to+the+Sea%2C+Resaca%2C+re-enacment%2C+ice+skating%2C+cdvs%2C+Union+army%2C+reenactment%2C+battery%2C+genealogy+research%2C+reenactment%2C+Blakeley%2C+nonprofit%2C+GAR%2C+surviving+Civil+War+cannon%2C+Parrott%2C+Wayne+Stark%2C+Michigan+Civil+War';
var metaContents  = 'The+purpose+of+Robinson%27s+Battery+is+to+foster+and+preserve+the+history+of+the+American+Civil+War+era.++This+will+be+done+through+research%2C+publications%2C+reenactments%2C+ceremonies+and+living+history+demonstrations.++Robinson%27s+Battery+is+incorporated+as+a+501+%28c%29%283%29+corporation.++All+donations+are+tax+deductible+and+gratefully+accepted.++';
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();
};

