/* [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','1801',jdecode('Home'),jdecode(''),'/1801.html','true',[],''],
	['PAGE','1852',jdecode('Services'),jdecode(''),'/1852/index.html','true',[ 
		['PAGE','9301',jdecode('Business+strategy'),jdecode(''),'/1852/9301.html','true',[],''],
		['PAGE','1936',jdecode('Client+marketing'),jdecode(''),'/1852/1936.html','true',[],''],
		['PAGE','1894',jdecode('Product+development'),jdecode(''),'/1852/1894.html','true',[],''],
		['PAGE','20017',jdecode('Technology'),jdecode(''),'/1852/20017.html','true',[],'']
	],''],
	['PAGE','1957',jdecode('The+ESE+Team'),jdecode(''),'/1957.html','true',[],''],
	['PAGE','1999',jdecode('Contact+us'),jdecode(''),'/1999.html','true',[],''],
	['PAGE','14206',jdecode('The+ESE+Gallery+%28new%29'),jdecode(''),'/14206.html','true',[],'']];
var siteelementCount=9;
theSitetree.topTemplateName='Movement';
theSitetree.paletteFamily='333F65';
theSitetree.keyvisualId='1819';
theSitetree.keyvisualName='kv_dummy.jpg';
theSitetree.fontsetId='289';
theSitetree.graphicsetId='355';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='333F65';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Movement',
				paletteFamily: 	'333F65',
				keyvisualId: 	'1819',
				keyvisualName: 	'kv_dummy.jpg',
				fontsetId: 		'289',
				graphicsetId: 	'355',
				contentColor: 	'FFFFFF',
				contentBGColor: '333F65',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'333F65',
				b_color: 		'040507',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1801',
internalId:  '',
customField: '20090611-210924'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1852',
internalId:  '',
customField: '20090323-092113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20017',
internalId:  '',
customField: '20090323-090935'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1894',
internalId:  '',
customField: '20090323-092140'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9301',
internalId:  '',
customField: '20090323-091206'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1936',
internalId:  '',
customField: '20090323-091224'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1957',
internalId:  '',
customField: '20090323-092613'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14206',
internalId:  '',
customField: '20090929-211524'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1999',
internalId:  '',
customField: '20081017-210640'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '1801',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '1852',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '9301',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '1936',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '1894',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '20017',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '1957',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '1999',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '14206',
internalId:  '',
customField: 'language:en;country:US;'
};
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0IN2UNP';
var companyName   = 'ESE+Advisory+Group+LLC';
var htmlTitle	  = '';
var metaKeywords  = 'consulting%2C+wealth+management%2C+marketing%2C+sales%2C+revenue%2C+profit%2C+profitability%2C+financial+services%2C+media%2C+music%2C+user+experience%2C+writing%2C+video%2C+graphics%2C+content%2C+presentations%2C+collaboration%2C+enterprise%2C+business+plans%2C+growth%2C+markets%2C+stock+market%2C+financial+literacy%2C+education%2C+financial+education%2C+blog%2C+personal+finance%2C+video+production%2C+business+planning%2C+retainer%2C+research%2C+equity%2C+equities%2C+equity+research%2C+market+research%2C+technology%2C+IT%2C+information+technology%2C+web+services%2C+brokers%2C+advisors%2C+basis+points%2C+portfolio%2C+portfolios%2C+sectors%2C+sector%2C+analysis%2C+quantitative%2C+qualitative%2C+qualitative+research%2C+client%2C+custody%2C+application+development%2C+website+development%2C+experience%2C+usability%2C+market+research%2C+Reuters%2C+Standard++Poors%2C+boutique%2C+Wall+Street%2C+financial+advisory+firms%2C+investments%2C+portfolios%2C+stocks%2C+bonds%2C+ETFs%2C+mutual+funds%2C+consulting%2C+creative%2C+fee-based%2C+managed+account%2C+unit+investment+trust%2C+UIT%2C+active+ETF%2C+solutions%2C+clearing%2C+custody%2C+writing%2C+journalism%2C+strategy%2C+tactics%2C+execution%2C+web+development%2C+design%2C+video%2C+production%2C+product+development%2C+product+management%2C+project+management%2C+user+flow%2C+end+user%2C+web+services';
var metaContents  = 'ESE+is+a+boutique+consulting+firm+specializing+in+the+brokerage%2C+advisory%2C+managed+account%2C+retail+asset+management%2C+news%2C+digital+content+and+digital+technology+arenas.+Our+services+are+always+aimed+at+pragmatic+approaches+to+generating+revenue+and+increasing+profitability+for+our+clients.+Our+skills+combine+senior-level+business+strategy%2C+general+business+management%2C+market+segmentation%2C+value+proposition+creation%2C+product+marketing%2C+strategic+marketing%2C+branding%2C+sales%2C+product+ideation%2C+product+development%2C+product+management%2C+project+management%2C+and+project+execution+plus+a+range+of+creative+services+including+writing%2C+web+design%2C+userflow+design%2C+print+design%2C+video+production%2C+scripting%2C+information+design%2C+advertising%2C+public+relations%2C+and+direct+marketing.';
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();
};
