/* [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','64',jdecode('Home'),jdecode(''),'/64.html','true',[],''],
	['PAGE','85',jdecode('History'),jdecode(''),'/85.html','true',[],''],
	['PAGE','94',jdecode('About+us'),jdecode(''),'/94/index.html','true',[ 
		['PAGE','103',jdecode('The+Team'),jdecode(''),'/94/103.html','true',[],''],
		['PAGE','973',jdecode('++++-+Advisory+Board'),jdecode(''),'/94/973.html','true',[],''],
		['PAGE','982',jdecode('+++-++Board+of+Directors++'),jdecode(''),'/94/982.html','true',[],''],
		['PAGE','991',jdecode('+++-++Senior+Management'),jdecode(''),'/94/991.html','true',[],'']
	],''],
	['PAGE','112',jdecode('What+we+do'),jdecode(''),'/112.html','true',[],''],
	['PAGE','121',jdecode('Business+Groups'),jdecode(''),'/121/index.html','true',[ 
		['PAGE','545',jdecode('Ringstown%2C+Inc.'),jdecode(''),'/121/545.html','true',[],''],
		['PAGE','554',jdecode('Ringstown+Advisory'),jdecode(''),'/121/554.html','true',[],''],
		['PAGE','581',jdecode('Ringstown+Capital'),jdecode(''),'/121/581.html','true',[],''],
		['PAGE','590',jdecode('The+Family+Office'),jdecode(''),'/121/590.html','true',[],''],
		['PAGE','572',jdecode('Construction%2C+Development+and+Finance'),jdecode(''),'/121/572.html','true',[],''],
		['PAGE','1295',jdecode('++-+Ringstown+Builders'),jdecode(''),'/121/1295.html','true',[],''],
		['PAGE','1304',jdecode('+-+JDH+Associates'),jdecode(''),'/121/1304.html','true',[],''],
		['PAGE','563',jdecode('Ringstown+Homes'),jdecode(''),'/121/563.html','true',[],'']
	],''],
	['PAGE','130',jdecode('Portfolio+Companies'),jdecode(''),'/130.html','true',[],''],
	['PAGE','462',jdecode('Client+Access+Portal'),jdecode(''),'/462.html','true',[],''],
	['PAGE','471',jdecode('Contact+Us'),jdecode(''),'/471.html','true',[],''],
	['PAGE','480',jdecode('In+the+News'),jdecode(''),'/480.html','true',[],''],
	['PAGE','489',jdecode('Employment+Opportunities'),jdecode(''),'/489.html','true',[],'']];
var siteelementCount=22;
theSitetree.topTemplateName='Aroundtheworld';
theSitetree.paletteFamily='C84E4E';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10793';
theSitetree.graphicsetId='11219';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='C84E4E';
var theTemplate={
				name: 			'Aroundtheworld',
				paletteFamily: 	'C84E4E',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10793',
				graphicsetId: 	'11219',
				contentColor: 	'FFFFFF',
				contentBGColor: 'C84E4E',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'661014',
				e_color: 		'661014',
				f_color: 		'661014',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '64',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64',
internalId:  '',
customField: '20080508-132540'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '130',
internalId:  '',
customField: '20080506-185836'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '121',
internalId:  '',
customField: '20080520-130807'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '563',
internalId:  '',
customField: '20090515-092516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1304',
internalId:  '',
customField: '20080520-130618'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '572',
internalId:  '',
customField: '20080513-210706'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85',
internalId:  '',
customField: '20080515-194610'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '94',
internalId:  '',
customField: '20080515-193105'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '103',
internalId:  '',
customField: '20080513-122952'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '973',
internalId:  '',
customField: '20080513-183306'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '982',
internalId:  '',
customField: '20080513-183306'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '991',
internalId:  '',
customField: '20080513-183307'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '112',
internalId:  '',
customField: '20080515-193316'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '545',
internalId:  '',
customField: '20080515-193402'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '554',
internalId:  '',
customField: '20080515-193421'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '581',
internalId:  '',
customField: '20080515-193440'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '590',
internalId:  '',
customField: '20080515-193456'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1295',
internalId:  '',
customField: '20080520-130618'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '462',
internalId:  '',
customField: '20080516-145405'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '471',
internalId:  '',
customField: '20080515-193901'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '480',
internalId:  '',
customField: '20080516-142155'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '489',
internalId:  '',
customField: '20080516-145506'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050IN3PKC';
var companyName   = 'Ringstown+Holdings';
var htmlTitle	  = 'Ringstown';
var metaKeywords  = '';
var metaContents  = '';
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();
};
