/* [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','401',jdecode('Home'),jdecode(''),'/401.html','true',[],''],
	['PAGE','599',jdecode('About+us'),jdecode(''),'/599/index.html','true',[ 
		['PAGE','24548',jdecode('FAQ%26%23x27%3Bs'),jdecode(''),'/599/24548.html','true',[],''],
		['PAGE','25301',jdecode('Join+us+%28follow+up+page%29'),jdecode(''),'/599/25301.html','false',[],'']
	],''],
	['PAGE','557',jdecode('Contact+Us'),jdecode(''),'/557.html','true',[],''],
	['PAGE','536',jdecode('Links'),jdecode(''),'/536/index.html','true',[ 
		['PAGE','24401',jdecode('Local+Interest'),jdecode(''),'/536/24401.html','true',[],''],
		['PAGE','24464',jdecode('Travel+Links'),jdecode(''),'/536/24464.html','true',[],''],
		['PAGE','24485',jdecode('Embassy+%26++Gov'),jdecode(''),'/536/24485.html','true',[],''],
		['PAGE','72701',jdecode('Social+%26+Economic'),jdecode(''),'/536/72701.html','true',[],''],
		['PAGE','78301',jdecode('Health'),jdecode(''),'/536/78301.html','true',[],'']
	],''],
	['PAGE','24506',jdecode('News+'),jdecode(''),'/24506/index.html','true',[ 
		['PAGE','79201',jdecode('Newsletter'),jdecode(''),'/24506/79201.html','true',[],'']
	],''],
	['PAGE','80701',jdecode('Around+Town'),jdecode(''),'/80701/index.html','true',[ 
		['PAGE','27922',jdecode('Music+%26+Dancing'),jdecode(''),'/80701/27922.html','true',[],''],
		['PAGE','81101',jdecode('Dining'),jdecode(''),'/80701/81101.html','true',[],''],
		['PAGE','102301',jdecode('Community'),jdecode(''),'/80701/102301.html','true',[],''],
		['PAGE','86801',jdecode('Out+of+town'),jdecode(''),'/80701/86801.html','true',[],'']
	],''],
	['PAGE','23106',jdecode('Guestbook'),jdecode(''),'/23106/index.html','true',[ 
		['PAGE','23101',jdecode('Read+Guestbook'),jdecode(''),'/23106/23101.html','false',[],'']
	],''],
	['PAGE','76501',jdecode('Extras'),jdecode(''),'/76501/index.html','true',[ 
		['PAGE','73801',jdecode('Giveaways'),jdecode(''),'/76501/73801.html','true',[],'']
	],''],
	['PAGE','75401',jdecode('Discussion'),jdecode(''),'/75401/index.html','true',[ 
		['PAGE','101101',jdecode('Polls'),jdecode(''),'/75401/101101.html','true',[],'']
	],''],
	['PAGE','79701',jdecode('Photos'),jdecode(''),'/79701/index.html','true',[ 
		['PAGE','79601',jdecode('Frontline+and+Columbus+Caribbean'),jdecode(''),'/79701/79601.html','true',[],''],
		['PAGE','92101',jdecode('Jamaican+Independence+8_03_08'),jdecode(''),'/79701/92101.html','true',[],'']
	],'']];
var siteelementCount=27;
theSitetree.topTemplateName='Americanlife';
theSitetree.paletteFamily='50529E';
theSitetree.keyvisualId='4238';
theSitetree.keyvisualName='kv_4238.jpg';
theSitetree.fontsetId='10674';
theSitetree.graphicsetId='11188';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='7B7CB4';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Americanlife',
				paletteFamily: 	'50529E',
				keyvisualId: 	'4238',
				keyvisualName: 	'kv_4238.jpg',
				fontsetId: 		'10674',
				graphicsetId: 	'11188',
				contentColor: 	'FFFFFF',
				contentBGColor: '7B7CB4',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1501']=webappMappings['1501-7582218']={
webappId:    '1501',
documentId:  '401',
internalId:  '7582218',
customField: '1501'
};
webappMappings['7060']=webappMappings['7060-e76dfd78b5220b92c309b9badad591ad']={
webappId:    '7060',
documentId:  '79601',
internalId:  'e76dfd78b5220b92c309b9badad591ad',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-a7c0d7a595abcf3b344c315149463cd4']={
webappId:    '7060',
documentId:  '92101',
internalId:  'a7c0d7a595abcf3b344c315149463cd4',
customField: 'language:en;country:US;'
};
webappMappings['7005']=webappMappings['7005-22']={
webappId:    '7005',
documentId:  '401',
internalId:  '22',
customField: 'language:en;country:US;'
};
webappMappings['1001']=webappMappings['1001-aaplu0invh2y1136de58cc3']={
webappId:    '1001',
documentId:  '24548',
internalId:  'aaplu0invh2y1136de58cc3',
customField: ''
};
webappMappings['1001']=webappMappings['1001-aaplu0invh2y1136de58cc3']={
webappId:    '1001',
documentId:  '25301',
internalId:  'aaplu0invh2y1136de58cc3',
customField: 'followUp'
};
webappMappings['1002']=webappMappings['1002-23106aaplu0invh2y']={
webappId:    '1002',
documentId:  '23106',
internalId:  '23106aaplu0invh2y',
customField: 'icq=false'
};
webappMappings['7005']=webappMappings['7005-23']={
webappId:    '7005',
documentId:  '101101',
internalId:  '23',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-223']={
webappId:    '7008',
documentId:  '557',
internalId:  '223',
customField: 'language:en;country:US;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['1003']=webappMappings['1003-aaplu0invh2y1136d900225']={
webappId:    '1003',
documentId:  '75401',
internalId:  'aaplu0invh2y1136d900225',
customField: 'en:US:'
};
var canonHostname = 'cm4all.aplus.net';
var accountId     = 'AAPLU0INVH2Y';
var companyName   = 'The+Columbus+Caribbean+Association';
var htmlTitle	  = 'The++Columbus+Caribbean+Association';
var metaKeywords  = 'Caribbean%2CColumbus+west+Indian%2C+Columbus%2C+ohio+reggae%2C+columbus+reggae%2C+West+Indian%2C+Caribbean+community%2C+columbus+caribbean%2C+caribbean+association+columbus+black%2C+black+west+indians%2C+columbus+jamaican+restaurants%2C+roots+records%2C+';
var metaContents  = 'This+is+the+official+online+presence+of+the+Columbus+Caribbean+Association.+';
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();
};

