/* [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','601',jdecode('Home'),jdecode(''),'/601.html','true',[],''],
	['PAGE','694',jdecode('News'),jdecode(''),'/694/index.html','true',[ 
		['PAGE','31401',jdecode('Onikooko+School+Project'),jdecode(''),'/694/31401.html','true',[],''],
		['PAGE','55501',jdecode('ILORA+Healthcare+Outpost+Project'),jdecode(''),'/694/55501.html','true',[],''],
		['PAGE','49301',jdecode('Omolara+Dasaolu'),jdecode(''),'/694/49301.html','true',[],''],
		['PAGE','55522',jdecode('AOOF+2010+Events'),jdecode(''),'/694/55522.html','true',[],''],
		['PAGE','52601',jdecode('AOOF+2009+Events'),jdecode(''),'/694/52601.html','true',[],''],
		['PAGE','35301',jdecode('AOOF+2008+Events'),jdecode(''),'/694/35301.html','true',[],''],
		['PAGE','41301',jdecode('AOOF+2007+Events'),jdecode(''),'/694/41301.html','true',[],''],
		['PAGE','18401',jdecode('AOOF+2006+Events'),jdecode(''),'/694/18401.html','true',[],''],
		['PAGE','19801',jdecode('Archives'),jdecode(''),'/694/19801.html','true',[],'']
	],''],
	['PAGE','652',jdecode('Support+measures'),jdecode(''),'/652/index.html','true',[ 
		['PAGE','19301',jdecode('Support+%26+Supporters'),jdecode(''),'/652/19301.html','true',[],'']
	],''],
	['PAGE','673',jdecode('Foundation'),jdecode(''),'/673.html','true',[],''],
	['PAGE','50701',jdecode('Donate+Now'),jdecode(''),'/50701.html','true',[],''],
	['PAGE','736',jdecode('Contact'),jdecode(''),'/736.html','true',[],''],
	['PAGE','757',jdecode('About+us'),jdecode(''),'/757/index.html','true',[ 
		['PAGE','778',jdecode('History'),jdecode(''),'/757/778.html','true',[],''],
		['PAGE','799',jdecode('Board+of+directors'),jdecode(''),'/757/799.html','true',[],''],
		['PAGE','3001',jdecode('Patrons+%26+Supporters'),jdecode(''),'/757/3001.html','true',[],'']
	],''],
	['PAGE','3022',jdecode('Interesting+links'),jdecode(''),'/3022.html','true',[],''],
	['PAGE','15806',jdecode('Guestbook'),jdecode(''),'/15806/index.html','true',[ 
		['PAGE','15801',jdecode('Read+Guestbook'),jdecode(''),'/15806/15801.html','false',[],'']
	],'']];
var siteelementCount=23;
theSitetree.topTemplateName='Qben';
theSitetree.paletteFamily='92AA38';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='17183';
theSitetree.graphicsetId='12658';
theSitetree.contentColor='2E2E2E';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Qben',
				paletteFamily: 	'92AA38',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'17183',
				graphicsetId: 	'12658',
				contentColor: 	'2E2E2E',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'FFFFFF',
				d_color: 		'39E094',
				e_color: 		'9DCB6E',
				f_color: 		'DC9E3C',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '601',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-10050759']={
webappId:    '1501',
documentId:  '601',
internalId:  '10050759',
customField: '1501'
};
webappMappings['1002']=webappMappings['1002-15806abri10in3of9']={
webappId:    '1002',
documentId:  '15806',
internalId:  '15806abri10in3of9',
customField: 'icq=false'
};
webappMappings['7060']=webappMappings['7060-bd7e90a0203c6a2c3e558179e82f35df']={
webappId:    '7060',
documentId:  '18401',
internalId:  'bd7e90a0203c6a2c3e558179e82f35df',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '601',
internalId:  '',
customField: '20110806-065915'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '652',
internalId:  '',
customField: '20090730-225331'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19301',
internalId:  '',
customField: '20101009-094253'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '673',
internalId:  '',
customField: '20080405-094806'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '694',
internalId:  '',
customField: '20100711-133700'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31401',
internalId:  '',
customField: '20091012-112927'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18401',
internalId:  '',
customField: '20080518-140141'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19801',
internalId:  '',
customField: '20100711-122115'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '736',
internalId:  '',
customField: '20101016-121546'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '757',
internalId:  '',
customField: '20110625-113020'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '778',
internalId:  '',
customField: '20080405-093138'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '799',
internalId:  '',
customField: '20080405-092752'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3001',
internalId:  '',
customField: '20080518-155209'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3022',
internalId:  '',
customField: '20091231-140720'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15806',
internalId:  '',
customField: '20080329-131822'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15801',
internalId:  '',
customField: '20080329-131822'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35301',
internalId:  '',
customField: '20100711-121317'
};
webappMappings['7060']=webappMappings['7060-995935ea1144ea3fed9ca32799d240ee']={
webappId:    '7060',
documentId:  '41301',
internalId:  '995935ea1144ea3fed9ca32799d240ee',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41301',
internalId:  '',
customField: '20100711-121330'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49301',
internalId:  '',
customField: '20091231-131316'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50701',
internalId:  '',
customField: '20101016-180508'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52601',
internalId:  '',
customField: '20100711-131203'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55522',
internalId:  '',
customField: '20110806-070440'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55501',
internalId:  '',
customField: '20101009-100223'
};
var canonHostname = 'wsc1.brinkster.com';
var accountId     = 'ABRI10IN3OF9';
var companyName   = 'ABEL+OGUNDOKUN+ODELEYE+FOUNDATION';
var htmlTitle	  = 'aoofoundation.org+-+ABEL+OGUNDOKUN+ODELEYE+FOUNDATION';
var metaKeywords  = 'odeleye%2C+foundation%2C+other%2C+aoof';
var metaContents  = 'ABEL+OGUNDOKUN+ODELEYE+FOUNDATION';
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();
};

