/* [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','2301',jdecode('Home'),jdecode(''),'/2301.html','true',[],''],
	['PAGE','2352',jdecode('News'),jdecode(''),'/2352.html','true',[],''],
	['PAGE','31801',jdecode('Mess+Night+%2F+Dining+In'),jdecode(''),'/31801/index.html','true',[ 
		['PAGE','34301',jdecode('History+of+Dining+In%2FMess+Night'),jdecode(''),'/31801/34301.html','true',[],''],
		['PAGE','34322',jdecode('Sequence+of+Dinning+In+'),jdecode(''),'/31801/34322.html','true',[],'']
	],''],
	['PAGE','22301',jdecode('Iwo+Jima+Parade+Float'),jdecode(''),'/22301.html','true',[],''],
	['PAGE','2520',jdecode('Patrons%2FSponsors'),jdecode(''),'/2520.html','true',[],''],
	['PAGE','9501',jdecode('Photo+Album'),jdecode(''),'/9501.html','true',[],''],
	['PAGE','10101',jdecode('Veterans+Issues'),jdecode(''),'/10101.html','true',[],''],
	['PAGE','2373',jdecode('Other+USMC+links'),jdecode(''),'/2373.html','true',[],''],
	['PAGE','17901',jdecode('Contact+our+Detachment'),jdecode(''),'/17901.html','true',[],''],
	['PAGE','2415',jdecode('About+Us'),jdecode(''),'/2415/index.html','true',[ 
		['PAGE','2436',jdecode('History'),jdecode(''),'/2415/2436.html','true',[],''],
		['PAGE','2457',jdecode('Board+of+Directors'),jdecode(''),'/2415/2457.html','true',[],''],
		['PAGE','2478',jdecode('Regulations'),jdecode(''),'/2415/2478.html','true',[],''],
		['PAGE','2499',jdecode('Becoming+a+member'),jdecode(''),'/2415/2499.html','true',[],'']
	],''],
	['PAGE','2541',jdecode('Our+Warrior%26%23x27%3Bs'),jdecode(''),'/2541.html','true',[],'']];
var siteelementCount=17;
theSitetree.topTemplateName='Americanlife';
theSitetree.paletteFamily='A71E1E';
theSitetree.keyvisualId='4249';
theSitetree.keyvisualName='kv_4249.jpg';
theSitetree.fontsetId='10673';
theSitetree.graphicsetId='11194';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='C53131';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Americanlife',
				paletteFamily: 	'A71E1E',
				keyvisualId: 	'4249',
				keyvisualName: 	'kv_4249.jpg',
				fontsetId: 		'10673',
				graphicsetId: 	'11194',
				contentColor: 	'FFFFFF',
				contentBGColor: 'C53131',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2301',
internalId:  '',
customField: '20100727-075919'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2352',
internalId:  '',
customField: '20100727-081033'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2373',
internalId:  '',
customField: '20090518-180452'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22301',
internalId:  '',
customField: '20100222-173312'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2415',
internalId:  '',
customField: '20090305-180056'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2436',
internalId:  '',
customField: '20090805-221911'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2457',
internalId:  '',
customField: '20100222-173730'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2478',
internalId:  '',
customField: '20090805-215432'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2499',
internalId:  '',
customField: '20081111-113224'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2520',
internalId:  '',
customField: '20090422-140009'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2541',
internalId:  '',
customField: '20090805-214854'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2301',
internalId:  '1006',
customField: '1006'
};
webappMappings['7060']=webappMappings['7060-22ac76406104b2d979e5a30abc831736']={
webappId:    '7060',
documentId:  '9501',
internalId:  '22ac76406104b2d979e5a30abc831736',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9501',
internalId:  '',
customField: '20081114-171716'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34322',
internalId:  '',
customField: '20100517-181438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10101',
internalId:  '',
customField: '20091220-155947'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31801',
internalId:  '',
customField: '20100727-080006'
};
webappMappings['7008']=webappMappings['7008-14285']={
webappId:    '7008',
documentId:  '17901',
internalId:  '14285',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17901',
internalId:  '',
customField: '20100727-081401'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34301',
internalId:  '',
customField: '20100517-184343'
};
webappMappings['1501']=webappMappings['1501-18211370']={
webappId:    '1501',
documentId:  '2301',
internalId:  '18211370',
customField: '1501'
};
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0INE8TV';
var companyName   = 'Georgia+Black+Sheep+Detachment+%23952%2C+MCL';
var htmlTitle	  = 'Georgia+Black+Sheep+Detachment+%23952%2C+Marine+Corps+League%2C+Inc.';
var metaKeywords  = 'USMC%2C+MCL%2C+Marine+Corps%2C+Marine+Corps+League%2C+Georgia+Marines%2C+Georgia+Black+Sheep%2C+Iwo+Jima+Float%2C+Gwinnett+County+Marines%2C+Northeast+Georgia+Marines%2C+NE+GA+Marine+Corps+League%2CSemper+Fi%2C+MCL%2C+GBS%2C+GA+Marines%2C+Iwo+Jima%2C+Veteran%2C+veteran+organization%2C+Ga+black+sheep%2C+iwo+jima%2C+gwinnett+marines%2C+MCJROTC%2C+Marines%2C+Duluth+Marine+Corps+League%2C+gamarines%2C+flowery+branch+marines%2C+buford+marines%2C+suwanee+marines%2C+wild+wing+cafe+marines%2C+black+sheep+com%2C+black+sheep+commandant%2C+black+sheep+commanding+officer%2C+worthington%2C+SSgtn%2C+Bill+Harting%2C+bill+gray%2C+tony+tijeirina%2C+department+of+georgia+marines%2C+semper+fi+club%2C+norm+worthington%2C+Jeff+Covert%2C+Black+Sheep%2C+Toys+for+tots%2C+gwinnett+toys+for+tots%2C+hall+county+marines%2C+usmc+gwinnett%2C+usmc+hall+county%2C+mcl+gwinnett%2C+mcl+atlanta%2C+mcl+hall%2C+mcl+georgia%2C+';
var metaContents  = 'Georgia+Black+Sheep+Detachment+%23952%2C+Marine+Corps+Leauge%2C+Duluth+Georiga';
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();
};
