/* [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 POS_TARGET=8;
var theSitetree=[ 
	['PAGE','5701',jdecode('HoMe'),jdecode(''),'/5701.html','true',[],'',''],
	['PAGE','11201',jdecode('aBoUt'),jdecode(''),'/11201.html','true',[],'',''],
	['PAGE','44651',jdecode('MBR+ThEaTeR'),jdecode(''),'/44651.html','true',[],'',''],
	['PAGE','11222',jdecode('PoRtFoLiO'),jdecode(''),'/11222/index.html','true',[ 
		['PAGE','22517',jdecode('CoPy'),jdecode(''),'/11222/22517.html','true',[],'',''],
		['PAGE','11243',jdecode('pHoToGrApHy'),jdecode(''),'/11222/11243.html','true',[],'','']
	],'',''],
	['PAGE','33079',jdecode('vIdEo+REEL'),jdecode(''),'/33079/index.html','true',[ 
		['PAGE','33100',jdecode('video+%28reading+program%29'),jdecode(''),'/33079/33100.html','true',[],'',''],
		['PAGE','33121',jdecode('video+%28anti-poverty%29'),jdecode(''),'/33079/33121.html','true',[],'',''],
		['PAGE','35672',jdecode('video+%28mother%26%23x27%3Bs+day%29'),jdecode(''),'/33079/35672.html','true',[],'',''],
		['PAGE','33142',jdecode('video+%28barriers%29'),jdecode(''),'/33079/33142.html','true',[],'',''],
		['PAGE','35714',jdecode('video+%28harlem+success%29'),jdecode(''),'/33079/35714.html','false',[],'',''],
		['PAGE','35651',jdecode('video+%28composite+clip%29'),jdecode(''),'/33079/35651.html','true',[],'',''],
		['PAGE','35693',jdecode('video+%28rain+forest%29'),jdecode(''),'/33079/35693.html','false',[],'',''],
		['PAGE','28017',jdecode('video+%28harlemite+teaser%29'),jdecode(''),'/33079/28017.html','true',[],'','']
	],'',''],
	['PAGE','22017',jdecode('CoNtAcT'),jdecode(''),'/22017.html','true',[],'','']];
var siteelementCount=16;
theSitetree.topTemplateName='Applicant';
theSitetree.paletteFamily='EEBE79';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='26572';
theSitetree.graphicsetId='13381';
theSitetree.contentColor='835e29';
theSitetree.contentBGColor='fce7ca';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Applicant',
				paletteFamily: 	'EEBE79',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'26572',
				graphicsetId: 	'13381',
				contentColor: 	'835e29',
				contentBGColor: 'fce7ca',
				a_color: 		'EEBE79',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5701',
internalId:  '',
customField: '20100601-222300'
};
webappMappings['7060']=webappMappings['7060-b54952872d2700b103fcae3d8acb22a1']={
webappId:    '7060',
documentId:  '11243',
internalId:  'b54952872d2700b103fcae3d8acb22a1',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28017',
internalId:  '',
customField: '20090723-204229'
};
webappMappings['7060']=webappMappings['7060-1ccaef2e5ad75647c0eda9023d6c7184']={
webappId:    '7060',
documentId:  '22517',
internalId:  '1ccaef2e5ad75647c0eda9023d6c7184',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35672',
internalId:  '',
customField: '20090723-203355'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11222',
internalId:  '',
customField: '20090724-111715'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11243',
internalId:  '',
customField: '20090723-204737'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33079',
internalId:  '',
customField: '20101003-104955'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22517',
internalId:  '',
customField: '20100529-115608'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33100',
internalId:  '',
customField: '20090723-203117'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33142',
internalId:  '',
customField: '20090723-203427'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33121',
internalId:  '',
customField: '20090723-203145'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22017',
internalId:  '',
customField: '20090723-013830'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11201',
internalId:  '',
customField: '20101003-120937'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35714',
internalId:  '',
customField: '20090723-203652'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35651',
internalId:  '',
customField: '20090723-203845'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35693',
internalId:  '',
customField: '20090723-204152'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44651',
internalId:  '',
customField: '20101003-115917'
};
webappMappings['7050']=webappMappings['7050-1579']={
webappId:    '7050',
documentId:  '44651',
internalId:  '1579',
customField: 'language:en;country:US;'
};
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0IN2OAE';
var companyName   = 'MO+bOttOm+RoAd';
var htmlTitle	  = '';
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();
};

