/* [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','1801',jdecode('Home'),jdecode(''),'/1801.html','true',[],'',''],
	['PAGE','1852',jdecode('About+Us'),jdecode(''),'/1852.html','true',[],'',''],
	['PAGE','1873',jdecode('Contact+Us'),jdecode(''),'/1873.html','true',[],'','']];
var siteelementCount=3;
theSitetree.topTemplateName='Human';
theSitetree.paletteFamily='601A15';
theSitetree.keyvisualId='11462';
theSitetree.keyvisualName='kv_11462.jpg';
theSitetree.fontsetId='31985';
theSitetree.graphicsetId='13819';
theSitetree.contentColor='3C3D3C';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Human',
				paletteFamily: 	'601A15',
				keyvisualId: 	'11462',
				keyvisualName: 	'kv_11462.jpg',
				fontsetId: 		'31985',
				graphicsetId: 	'13819',
				contentColor: 	'3C3D3C',
				contentBGColor: 'FFFFFF',
				a_color: 		'601A15',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1801',
internalId:  '',
customField: '20100707-193215'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1852',
internalId:  '',
customField: '20100714-063847'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1873',
internalId:  '',
customField: '20100714-063916'
};
var canonHostname = 'wscwrk01.ehost-services.com';
var accountId     = 'AEN330INFIP2';
var companyName   = 'YEC+-+Youth+Empowerment+Council';
var htmlTitle	  = '%7C%7C%7C+MyYEC.COM+%7C%7C%7C+Youth+Empowerment+Council+-+A+coalition+to+address+concerns+with+Youth.';
var metaKeywords  = '1+internet+mall%2C+1internetmall.com%2C+Acts2.biz%2C+Acts+2%2C+1iMall%2C+1iMall.com%2C+Affiliate+Marketing%2C+AfricanAmericanLegacyFoundation.org%2C+AvalonAndElSegundo.com%2C+BryanLFranklin%2C+BryanFranklin.com%2C+BryanFranklin.net%2C+BrianFranklin.com%2C+black+business%2C+black+owned+business%2C+black+owned+internet+shopping+mall%2C+Black365.com%2C+365Black.com%2C+BUCKaFRIEND.COM%2C+CAAPEI%2C+CalvinSchexnayder.com%2C+Club+Hall+Of+Fame%2C+Collaboration%2C+E-Commerce%2C+CSUDH%2C+DonateByShopping%2C+Donate+By+Shopping%2C+DonateByShopping.com%2C+ecommerce%2C+First+Job+Project%2C+fundraising%2C+fundraiser%2C+GreatMLMdebate.com%2C+Great+MLM+debate%2C+Health+Wealth+and+Spirituality%2C+HealthWealthandSpirituality.org%2C+Home+Based+Business%2C+ibo%2C+internet+mall%2C+internet+shopping+mall%2C+internet+shopping+mall+business+opportunity%2C+JewelStarHealth.com%2C+LesBrown.com%2C+locke+high+school%2C+LonzoWilliams.com%2C+gompers+jr+high+school%2C+madvoice.com%2C+madvoice%2C+matah%2C+Mell+Monroe%2C+MLM%2C+money%2C+MySpace.com%2F1iMALL%2C+MySpace.com%2FProjectFirstJob%2C+Network+Marketing%2C+NFTE%2C+NFTE.COM%2C+Niggod%2C+Niggod.com%2C+No+Child+Left+Behind%2C+one+internet+mall%2C+OneInernetMall.com%2C+ONEiMALL.COM%2C+pay+students+to+stay+in+school%2C+Project+First+Job%2C+ProjectFirstJob%2C+ProjectFirstJob.com%2C+Real+Men+Cook%2C+Referral+Marketing%2C+SayNoToMLM.com%2C+Say+No+To+MLM%2C+Shop+For+A+Cause%2C+Shopping%2C+Shopping+Mall%2C+The+800+Club%2C+The800Club.us%2C+Twitter.com%2F1iMALL%2C+Quixtar%2C+Veneta+Watkins%2C+YouTube.com%2F1iMALL%2C+Wealth%2C+Bryan+Franklin%2C+Bryan+Jones%2C+Calvin+Schexnayder%2C+Carole+Freeman%2C+Dannete+Wilkerson%2C+Darius+Farrelly%2C+Eric+Coleman%2C+Felix+Washington%2C+Johnnie+Morgan%2C+Kristy+Dotson%2C+Les+Brown%2C+Les+Jones%2C+Linda+Collins%2C+Lonzo+Williams%2C+Rodney+Franklin%2C+Stacie+Williams%2C+Timothy+Griffin%0D%0A%0D%0A';
var metaContents  = '%7C%7C%7C+MyYEC.COM+%7C%7C%7C+Youth+Empowerment+Council+-+The+vision-+To+form+a+coalition+to+address+concerns+surrounding+at+risk+youth+in+Southern+CA%2C+by+organizing+leaders+of+community+agencies%2C+educators%2C+researchers+and+mental+health+advocates+to+track+the+outcomes+of+specified+themes+identified+through+research%2C+such+as+Drop+outs%2C+Teen+Pregnancy%2C+Recidivism+and+youth+violence.';
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();
};
