/* [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','601',jdecode('Home'),jdecode(''),'/601.html','true',[],'',''],
	['PAGE','8964',jdecode('About+us'),jdecode(''),'/8964/index.html','true',[ 
		['PAGE','92034',jdecode('What+We+Do'),jdecode(''),'/8964/92034.html','true',[],'',''],
		['PAGE','29301',jdecode('Mission'),jdecode(''),'/8964/29301.html','true',[],'',''],
		['PAGE','29501',jdecode('Why+we%26%23x27%3Bre+different'),jdecode(''),'/8964/29501.html','true',[],'',''],
		['PAGE','8985',jdecode('The+team'),jdecode(''),'/8964/8985.html','true',[],'','']
	],'',''],
	['PAGE','9485',jdecode('Services'),jdecode(''),'/9485/index.html','true',[ 
		['PAGE','29522',jdecode('Financial+Services'),jdecode(''),'/9485/29522.html','true',[],'',''],
		['PAGE','29543',jdecode('Wealth+Mgmt%2FPrivateBanking'),jdecode(''),'/9485/29543.html','true',[],'','']
	],'',''],
	['PAGE','9506',jdecode('+Consulting+Practice'),jdecode(''),'/9506/index.html','true',[ 
		['PAGE','139034',jdecode('Case+Studies'),jdecode(''),'/9506/139034.html','true',[],'','']
	],'',''],
	['PAGE','159934',jdecode('Change+Management'),jdecode(''),'/159934.html','true',[],'',''],
	['PAGE','165634',jdecode('Business+Model++Generation'),jdecode(''),'/165634.html','true',[],'',''],
	['PAGE','9401',jdecode('Products'),jdecode(''),'/9401.html','true',[],'',''],
	['PAGE','141534',jdecode('What%26%23x27%3Bs+New'),jdecode(''),'/141534/index.html','true',[ 
		['PAGE','45912',jdecode('Thought+Leadership'),jdecode(''),'/141534/45912.html','true',[],'','']
	],'',''],
	['PAGE','8943',jdecode('How+to+Find+Us'),jdecode(''),'/8943.html','true',[],'',''],
	['PAGE','10501',jdecode('Blog'),jdecode(''),'/10501.html','true',[],'','']];
var siteelementCount=18;
theSitetree.topTemplateName='Startup';
theSitetree.paletteFamily='003366';
theSitetree.keyvisualId='1424';
theSitetree.keyvisualName='fensterputzer.jpg';
theSitetree.fontsetId='236';
theSitetree.graphicsetId='274';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Startup',
				paletteFamily: 	'003366',
				keyvisualId: 	'1424',
				keyvisualName: 	'fensterputzer.jpg',
				fontsetId: 		'236',
				graphicsetId: 	'274',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'003366',
				b_color: 		'333333',
				c_color: 		'000000',
				d_color: 		'FF0000',
				e_color: 		'FF0000',
				f_color: 		'FF0000',
				hasCustomLogo: 	'false',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '601',
internalId:  '',
customField: '20100707-004713'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8964',
internalId:  '',
customField: '20100701-233137'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8985',
internalId:  '',
customField: '20100701-232239'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9485',
internalId:  '',
customField: '20100630-210304'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9506',
internalId:  '',
customField: '20090824-011222'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9401',
internalId:  '',
customField: '20090920-172535'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '165634',
internalId:  '',
customField: '20100707-005326'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '159934',
internalId:  '',
customField: '20100630-203841'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10501',
internalId:  '',
customField: '20091007-103836'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92034',
internalId:  '',
customField: '20100707-005230'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8943',
internalId:  '',
customField: '20090625-050044'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '141534',
internalId:  '',
customField: '20100901-002013'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29301',
internalId:  '',
customField: '20100630-204011'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29501',
internalId:  '',
customField: '20100630-204425'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29522',
internalId:  '',
customField: '20090608-051843'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29543',
internalId:  '',
customField: '20090803-091445'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45912',
internalId:  '',
customField: '20091224-204019'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '601',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '139034',
internalId:  '',
customField: '20100630-210742'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INVGKI';
var companyName   = 'Karllestone+Capital+%26+Company';
var htmlTitle	  = 'Financial+Services%2C+Wealth+Management%2C+Business+Model+Generation+Strategy+and++Management+%26++Technology+Consulting';
var metaKeywords  = 'CRM%2C++Management++Consulting%2C+Technology+Consulting%2C+Wealth+Management%2C+Private+Banking%2C+Strategy.+Japan%2C+Information+Services%2C+Japan';
var metaContents  = 'Financial+Services+Consulting++for++Management+Consulting%2C++CRM%2C+Securities%2C+Asset+Management%2C+Wealth+Management%2C+Private+Banking%2C+Insurance%2C++Business+Strategy%2C+Technology+in+Japan';
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();
};
