/* [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','1901',jdecode('Home'),jdecode(''),'/1901.html','true',[],'',''],
	['PAGE','28901',jdecode('%22With+Honor+In+Hand%22'),jdecode(''),'/28901.html','true',[],'',''],
	['PAGE','6201',jdecode('Who+is+Terron+Sims+%3F'),jdecode(''),'/6201/index.html','true',[ 
		['PAGE','6222',jdecode('Personal+Background'),jdecode(''),'/6201/6222.html','true',[],'',''],
		['PAGE','6701',jdecode('Bio'),jdecode(''),'/6201/6701.html','true',[],'',''],
		['PAGE','6243',jdecode('Professional+Resume'),jdecode(''),'/6201/6243.html','true',[],'',''],
		['PAGE','6264',jdecode('Political+Resume'),jdecode(''),'/6201/6264.html','true',[],'','']
	],'',''],
	['PAGE','6411',jdecode('What%26%23x27%3Bs+On+My+Mind'),jdecode(''),'/6411.html','true',[],'',''],
	['PAGE','4001',jdecode('What%26%23x27%3Bs+Going+On'),jdecode(''),'/4001.html','true',[],'',''],
	['PAGE','22301',jdecode('Iraq'),jdecode(''),'/22301.html','true',[],'',''],
	['PAGE','6285',jdecode('Iran'),jdecode(''),'/6285.html','true',[],'',''],
	['PAGE','22801',jdecode('Afghanistan'),jdecode(''),'/22801.html','true',[],'',''],
	['PAGE','6306',jdecode('US+Culture+and+Climate'),jdecode(''),'/6306/index.html','true',[ 
		['PAGE','6801',jdecode('The+Armed+Forces'),jdecode(''),'/6306/6801.html','true',[],'',''],
		['PAGE','6327',jdecode('The+Community'),jdecode(''),'/6306/6327.html','true',[],'','']
	],'',''],
	['PAGE','6348',jdecode('Democratic+Politics'),jdecode(''),'/6348/index.html','true',[ 
		['PAGE','6369',jdecode('Virginia'),jdecode(''),'/6348/6369.html','true',[],'',''],
		['PAGE','6390',jdecode('The+US'),jdecode(''),'/6348/6390.html','true',[],'','']
	],'',''],
	['PAGE','6432',jdecode('Terron+in+the+Press'),jdecode(''),'/6432.html','true',[],'',''],
	['PAGE','8301',jdecode('Photo+Album'),jdecode(''),'/8301.html','true',[],'',''],
	['PAGE','4022',jdecode('Links+of+Interest'),jdecode(''),'/4022.html','true',[],'',''],
	['PAGE','6601',jdecode('Contact'),jdecode(''),'/6601.html','true',[],'',''],
	['PAGE','8322',jdecode('Search'),jdecode(''),'/8322.html','true',[],'',''],
	['PAGE','8343',jdecode('Guest+Book'),jdecode(''),'/8343.html','true',[],'','']];
var siteelementCount=24;
theSitetree.topTemplateName='Travel';
theSitetree.paletteFamily='4060B8';
theSitetree.keyvisualId='6975';
theSitetree.keyvisualName='kv_6975.jpg';
theSitetree.fontsetId='13627';
theSitetree.graphicsetId='12072';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='4060B8';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Travel',
				paletteFamily: 	'4060B8',
				keyvisualId: 	'6975',
				keyvisualName: 	'kv_6975.jpg',
				fontsetId: 		'13627',
				graphicsetId: 	'12072',
				contentColor: 	'FFFFFF',
				contentBGColor: '4060B8',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'9DB0E2',
				e_color: 		'9DB0E2',
				f_color: 		'9DB0E2',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1901',
internalId:  '',
customField: '20100405-080321'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4022',
internalId:  '',
customField: '20091231-072419'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '28901',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4001',
internalId:  '',
customField: '20091105-124759'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6201',
internalId:  '',
customField: '20090627-122328'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6285',
internalId:  '',
customField: '20090715-195550'
};
webappMappings['7060']=webappMappings['7060-ade046bba6d75777fd195f5520b70637']={
webappId:    '7060',
documentId:  '8301',
internalId:  'ade046bba6d75777fd195f5520b70637',
customField: 'language:en;country:US;'
};
webappMappings['8002']=webappMappings['8002-search']={
webappId:    '8002',
documentId:  '8322',
internalId:  'search',
customField: 'language:en;country:US;'
};
webappMappings['1002']=webappMappings['1002-8343aen330infkw4']={
webappId:    '1002',
documentId:  '8343',
internalId:  '8343aen330infkw4',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8343',
internalId:  '',
customField: '20090721-122721'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6222',
internalId:  '',
customField: '20100519-085407'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6701',
internalId:  '',
customField: '20100519-090113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6243',
internalId:  '',
customField: '20100519-090704'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6264',
internalId:  '',
customField: '20100729-111458'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6306',
internalId:  '',
customField: '20091114-114343'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6801',
internalId:  '',
customField: '20090708-181706'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6327',
internalId:  '',
customField: '20090630-103930'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6348',
internalId:  '',
customField: '20090702-141538'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6369',
internalId:  '',
customField: '20091114-114926'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6390',
internalId:  '',
customField: '20091114-115920'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6411',
internalId:  '',
customField: '20100429-063103'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6432',
internalId:  '',
customField: '20090702-141609'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8301',
internalId:  '',
customField: '20090703-143519'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6601',
internalId:  '',
customField: '20091114-210602'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8322',
internalId:  '',
customField: '20090629-122400'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22301',
internalId:  '',
customField: '20100517-114738'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22801',
internalId:  '',
customField: '20100428-112126'
};
webappMappings['1501']=webappMappings['1501-1501']={
webappId:    '1501',
documentId:  '28901',
internalId:  '1501',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28901',
internalId:  '',
customField: '20100429-062803'
};
var canonHostname = 'wscwrk02.ehost-services.com';
var accountId     = 'AEN330INFKW4';
var companyName   = 'We+the+People...';
var htmlTitle	  = 'Terron+Sims%2C+II';
var metaKeywords  = 'Terron+Sims+politics+Democratic+Party+Iraq+Afghanistan+Iran+kids+education+West+Point+US+Army';
var metaContents  = 'Take+a+small+look+at+the+world+through+the+eyes+of+Terron+Sims%2C+II.';
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();
};
