/* [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','1001',jdecode('CNJ+CapitalGroup'),jdecode(''),'/1001.html','true',[],''],
	['PAGE','33624',jdecode('Korean+Introduction'),jdecode(''),'/33624.html','true',[],''],
	['PAGE','2001',jdecode('About+Us'),jdecode(''),'/2001/index.html','true',[ 
		['PAGE','12722',jdecode('Management+Team'),jdecode(''),'/2001/12722.html','true',[],''],
		['PAGE','12743',jdecode('Consultants'),jdecode(''),'/2001/12743.html','true',[],''],
		['PAGE','16901',jdecode('Affiliates+and+Networks'),jdecode(''),'/2001/16901.html','true',[],''],
		['PAGE','32843',jdecode('Professional+Credentials'),jdecode(''),'/2001/32843.html','true',[],'']
	],''],
	['PAGE','2043',jdecode('Corporate+Client+Services'),jdecode(''),'/2043/index.html','true',[ 
		['PAGE','12764',jdecode('Mergers+%26+Acquisitions'),jdecode(''),'/2043/12764.html','true',[],''],
		['PAGE','26801',jdecode('+++++Sell+Side+Representation'),jdecode(''),'/2043/26801.html','true',[],''],
		['PAGE','26822',jdecode('+++++Buy+Side+Representation+'),jdecode(''),'/2043/26822.html','true',[],''],
		['PAGE','12806',jdecode('Business+Valuations'),jdecode(''),'/2043/12806.html','true',[],''],
		['PAGE','12785',jdecode('Due+Diligence+Analysis*'),jdecode(''),'/2043/12785.html','true',[],''],
		['PAGE','17301',jdecode('Machinery+%26+Equipment+Valuations*'),jdecode(''),'/2043/17301.html','true',[],''],
		['PAGE','33474',jdecode('Residential%2C+Commercial+and+Industrial+Appraisals'),jdecode(''),'/2043/33474.html','true',[],'']
	],''],
	['PAGE','12890',jdecode('Small+Business+Solutions'),jdecode(''),'/12890/index.html','true',[ 
		['PAGE','12911',jdecode('Business+Development'),jdecode(''),'/12890/12911.html','true',[],''],
		['PAGE','12932',jdecode('Accounting+Services'),jdecode(''),'/12890/12932.html','true',[],''],
		['PAGE','12995',jdecode('Risk+Management'),jdecode(''),'/12890/12995.html','true',[],''],
		['PAGE','13016',jdecode('Financing+Options'),jdecode(''),'/12890/13016.html','true',[],'']
	],''],
	['PAGE','13058',jdecode('Transactions+%26+References'),jdecode(''),'/13058.html','true',[],''],
	['PAGE','5101',jdecode('Contact+Us'),jdecode(''),'/5101/index.html','true',[ 
		['PAGE','24301',jdecode('Map'),jdecode(''),'/5101/24301.html','true',[],'']
	],''],
	['PAGE','33405',jdecode('Seminars'),jdecode(''),'/33405/index.html','true',[ 
		['PAGE','33565',jdecode('CNJ+Capital+Events'),jdecode(''),'/33405/33565.html','true',[],'']
	],'']];
var siteelementCount=25;
theSitetree.topTemplateName='Valiant';
theSitetree.paletteFamily='25882F';
theSitetree.keyvisualId='9821';
theSitetree.keyvisualName='kv_9821.jpg';
theSitetree.fontsetId='17626';
theSitetree.graphicsetId='13033';
theSitetree.contentColor='646464';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Valiant',
				paletteFamily: 	'25882F',
				keyvisualId: 	'9821',
				keyvisualName: 	'kv_9821.jpg',
				fontsetId: 		'17626',
				graphicsetId: 	'13033',
				contentColor: 	'646464',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				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:     'false'
			  };
var webappMappings = {};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '24301',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['7008']=webappMappings['7008-11488']={
webappId:    '7008',
documentId:  '5101',
internalId:  '11488',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1001',
internalId:  '',
customField: '20100205-125300'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2001',
internalId:  '',
customField: '20090821-145340'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12722',
internalId:  '',
customField: '20091009-150424'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12743',
internalId:  '',
customField: '20090820-194725'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16901',
internalId:  '',
customField: '20090303-234451'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2043',
internalId:  '',
customField: '20090820-200219'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12764',
internalId:  '',
customField: '20090211-181758'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26801',
internalId:  '',
customField: '20090223-183755'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26822',
internalId:  '',
customField: '20090223-183650'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12785',
internalId:  '',
customField: '20090223-183742'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12806',
internalId:  '',
customField: '20090223-183831'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17301',
internalId:  '',
customField: '20090223-183910'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32843',
internalId:  '',
customField: '20090211-191951'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12890',
internalId:  '',
customField: '20090210-173903'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12911',
internalId:  '',
customField: '20090210-174258'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12932',
internalId:  '',
customField: '20090210-173934'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33565',
internalId:  '',
customField: '20091030-203149'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33624',
internalId:  '',
customField: '20100111-212706'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12995',
internalId:  '',
customField: '20090210-174020'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13016',
internalId:  '',
customField: '20090211-205152'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13058',
internalId:  '',
customField: '20080904-232433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33474',
internalId:  '',
customField: '20090821-145209'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33405',
internalId:  '',
customField: '20090803-014408'
};
webappMappings['7050']=webappMappings['7050-13143']={
webappId:    '7050',
documentId:  '33565',
internalId:  '13143',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5101',
internalId:  '',
customField: '20090617-175556'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24301',
internalId:  '',
customField: '20091030-201708'
};
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0INERXC';
var companyName   = 'M+%26+A+and+Business+Intermediary+Solution+Provider';
var htmlTitle	  = 'CNJ+Capital+Group+-+M%26A+and+Business+Intermediary+Advisory+Services';
var metaKeywords  = 'MA%2C+Investment%2C+California%2C+Korean%2C+Korea%2C+Asian%2C+Valuation%2C+Buying+Business%2C+Selling+Business%2C+Capital+Partners%2C+Merge%2C+Acquisition%2C+Equity';
var metaContents  = 'CNJ+Capital+Group+is+a+professional+intermediary+firm+serving+business+owners+and+buyers+in+the+Greater+Los+Angeles+Area.+Our+team+of+experts+provides+acquisition+and+strategic+planning+services+to+privately+held+companies+with+revenues+under+%2450+million.';
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();
};
