/* [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','3901',jdecode('Home'),jdecode(''),'/3901.html','true',[],''],
	['PAGE','3952',jdecode('Sankofa+History'),jdecode(''),'/3952.html','true',[],''],
	['PAGE','3973',jdecode('Annetta+Wilson'),jdecode(''),'/3973.html','true',[],''],
	['PAGE','13012',jdecode('Calendar+Events'),jdecode(''),'/13012.html','true',[],''],
	['PAGE','3994',jdecode('Programs'),jdecode(''),'/3994/index.html','true',[ 
		['PAGE','4101',jdecode('Family+Support'),jdecode(''),'/3994/4101.html','true',[],''],
		['PAGE','4201',jdecode('Grandparents'),jdecode(''),'/3994/4201.html','true',[],''],
		['PAGE','4222',jdecode('Youth+Empowerment'),jdecode(''),'/3994/4222.html','true',[],''],
		['PAGE','4243',jdecode('Health'),jdecode(''),'/3994/4243.html','true',[],''],
		['PAGE','4264',jdecode('Juvenile'),jdecode(''),'/3994/4264.html','true',[],''],
		['PAGE','4285',jdecode('Workforce+Development'),jdecode(''),'/3994/4285.html','true',[],'']
	],''],
	['PAGE','4306',jdecode('Sankofa+House'),jdecode(''),'/4306.html','true',[],''],
	['PAGE','4327',jdecode('It%26%23x27%3Bs+in+the+Bag'),jdecode(''),'/4327.html','true',[],''],
	['PAGE','23640',jdecode('Gallery'),jdecode(''),'/23640.html','false',[],''],
	['PAGE','4369',jdecode('Sankofa+Family'),jdecode(''),'/4369.html','true',[],''],
	['PAGE','13033',jdecode('Board+Members'),jdecode(''),'/13033.html','true',[],''],
	['PAGE','4390',jdecode('Employment'),jdecode(''),'/4390.html','true',[],''],
	['PAGE','4411',jdecode('Village+Partners'),jdecode(''),'/4411.html','true',[],''],
	['PAGE','11812',jdecode('Grapevine'),jdecode(''),'/11812.html','true',[],''],
	['PAGE','4601',jdecode('Contact'),jdecode(''),'/4601.html','true',[],'']];
var siteelementCount=20;
theSitetree.topTemplateName='Transluszent';
theSitetree.paletteFamily='660000';
theSitetree.keyvisualId='9239';
theSitetree.keyvisualName='kv1.swf';
theSitetree.fontsetId='17363';
theSitetree.graphicsetId='12763';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Transluszent',
				paletteFamily: 	'660000',
				keyvisualId: 	'9239',
				keyvisualName: 	'kv1.swf',
				fontsetId: 		'17363',
				graphicsetId: 	'12763',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'FFFFFF',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['4001']=webappMappings['4001-3889094']={
webappId:    '4001',
documentId:  '4327',
internalId:  '3889094',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13012',
internalId:  '',
customField: '20090917-184737'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3901',
internalId:  '',
customField: '20100104-214303'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3952',
internalId:  '',
customField: '20090426-212128'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3994',
internalId:  '',
customField: '20100104-145416'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4390',
internalId:  '',
customField: '20100104-151750'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4411',
internalId:  '',
customField: '20090519-105718'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4601',
internalId:  '',
customField: '20090426-220727'
};
webappMappings['7008']=webappMappings['7008-849']={
webappId:    '7008',
documentId:  '4601',
internalId:  '849',
customField: 'language:en;country:US;'
};
webappMappings['1002']=webappMappings['1002-11812anfi10inxlq8']={
webappId:    '1002',
documentId:  '11812',
internalId:  '11812anfi10inxlq8',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4369',
internalId:  '',
customField: '20100104-153508'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11812',
internalId:  '',
customField: '20090831-232019'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3973',
internalId:  '',
customField: '20090427-033336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4101',
internalId:  '',
customField: '20090917-191417'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4201',
internalId:  '',
customField: '20100104-211836'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4327',
internalId:  '',
customField: '20100104-172608'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4222',
internalId:  '',
customField: '20090917-192941'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4243',
internalId:  '',
customField: '20090426-210104'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4264',
internalId:  '',
customField: '20100104-212036'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4285',
internalId:  '',
customField: '20100104-212545'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4306',
internalId:  '',
customField: '20090427-024609'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '3901',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13033',
internalId:  '',
customField: '20090917-190022'
};
webappMappings['7060']=webappMappings['7060-d4f168faf5c46650b33d896a2489f169']={
webappId:    '7060',
documentId:  '23640',
internalId:  'd4f168faf5c46650b33d896a2489f169',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23640',
internalId:  '',
customField: '20100104-171826'
};
var canonHostname = 'cm4all.netfirms.com';
var accountId     = 'ANFI10INXLQ8';
var companyName   = 'Sankofa+Safe+Child+Initiative';
var htmlTitle	  = 'Sankofa+Safe+Child+Initiaive+%22Looking+back+to+go+forward.%22';
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();
};
