/* [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','401',jdecode('Home'),jdecode(''), jdecode('%2F401.html'), 'true',[],'',''],
	['PAGE','8201',jdecode('Case+Study'),jdecode(''), jdecode('%2F8201.html'), 'true',[],'',''],
	['PAGE','5401',jdecode('Shopping'),jdecode(''), jdecode('%2F5401.html'), 'true',[],'','']];
var siteelementCount=3;
theSitetree.topTemplateName='Meta';
theSitetree.paletteFamily='72A7D3';
theSitetree.keyvisualId='11313';
theSitetree.keyvisualName='kv_11313.jpg';
theSitetree.fontsetId='31993';
theSitetree.graphicsetId='13826';
theSitetree.contentColor='020202';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'wl_enom',
  product: 'WSCENOSSSLYTC21A'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Meta',
				paletteFamily: 	'72A7D3',
				keyvisualId: 	'11313',
				keyvisualName: 	'kv_11313.jpg',
				fontsetId: 		'31993',
				graphicsetId: 	'13826',
				contentColor: 	'020202',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20111229-133621'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8201',
internalId:  '',
customField: '20101214-160422'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5401',
internalId:  '',
customField: '20100811-181907'
};
var webAppHostname = 'wsc.ehost-services.com:80';
var canonHostname = 'wscwrk01.ehost-services.com';
var accountId     = 'AEN010INLWFF';
var companyName   = 'The800Club.us';
var htmlTitle	  = 'The+800+Club+-+A+solution+for+Occupy+Wall+Street.';
var metaKeywords  = '1%2F27%2F12%2C+1%25er%2C+1+internet+mall%2C+1internetmall.com%2C+1+percenter%2C+3238165100%2C+Acts2.biz%2C+Acts+2%2C+1iMall%2C+1iMall.com%2C+Affiliate+Marketing%2C+AdrianDove.com%2C+AfricanAmericanLegacyFoundation.org%2C+ALLHAF.ORG%2C+Alain+Leroy+Locke+High+Alumni+Foundation%2C+AlainLeroyLockeHighAlumniFoundation.org%2C+AvalonAndElSegundo.com%2C+Bail+Out+Stay+Out%2C+BailOutStayOut.com%2C+Bail+Bonds%2C+Box+Bros%2C+Box+Brothers%2C+Bryan+Franklin%2C+Bryan+L+Franklin%2C+BryanFranklin.net%2C+BrianFranklin.com%2C+BrianFranklinBailBonds.com%2C+Bryan+Franklin+Bail+Bonds%2C+BryanFranklinBailBonds.com%2C+black+business%2C+black+owned+business%2C+Black+Owned+Home+Based+Business%2C+black+owned+internet+shopping+mall%2C+Black365.com%2C+365Black.com%2C+BUCKaFRIEND.COM%2C+CAAPEI%2C+Circle+Compensation+Plan%2C+Club+Hall+Of+Fame%2C+COBPO.ORG%2C+Collaboration%2C+Crenshaw+Project%2C+CrenshawProject.com%2C+CSUDH%2C+DelisaMoncree.com%2C+DonateByShopping%2C+Donate+By+Shopping%2C+DohgonUniversity.com%2C+DonateByShopping.com%2C+ecommerce%2C+Facebook.com%2F1iMALLCOM%2C+First+Job+Project%2C+fundraising%2C+fundraiser%2C+GetOutStayOut.net%2C+Get+out+stay+out%2C+GhettoPhysics%2C+Ghetto+Physics%2C+GhettoPhysics.com%2C+GreatMLMdebate.com%2C+Great+MLM+debate%2C+Health+Wealth+and+Spirituality%2C+HealthWealthandSpirituality.org%2C+Home+Based+Business%2C+Hope4Inmates.org%2C+ibo%2C+internet+mall%2C+internet+shopping+mall%2C+internet+shopping+mall+business+opportunity%2C+JamaalBrownMedia.com%2C+JewelStarHealth.com%2C+LesBrown.com%2C+locke+high+school%2C+LonzoWilliams.com%2C+gompers+jr+high+school%2C+madvoice.com%2C+madvoice%2C+Marlton+Square%2C+matah%2C+Milligan+Books%2C+MLM%2C+MLMtheMYTH.com%2C+MLM+the+MYTH%2C+money%2C+MySpace.com%2F1iMALL%2C+MySnoCool.com%2C+MySpace.com%2FProjectFirstJob%2C+My+Sno+Cool%2C+Network+Marketing%2C+No+Child+Left+Behind%2C+Occupy+Wall+Street%2C+OmegaEntertainment.org%2C+one+internet+mall%2C+OneInernetMall.com%2C+ONEiMALL.COM%2C+Other+Income%2C+pay+students+to+stay+in+school%2C+Project+First+Job%2C+ProjectFirstJob%2C+ProjectFirstJob.com%2C+Referral+Marketing%2C+RichPeopleRead.com%2C+Rich+People+Read%2C+RyanSfranklin.com%2C+SayNoToMLM.com%2C+Say+No+To+MLM%2C+Shop+For+A+Cause%2C+Shopping%2C+Shopping+Mall%2C+SilkyD.com%2C+Sno+Cool%2C+Swipe+Tec%2C+SwipeTec.net%2C+SwipeTec.com%2C+SwipeTech.com%2C+SwipeTec.org%2C+The+800+Club%2C+The800Club.us%2C+TheBigWalk.com%2C+The+Big+Walk%2C+TheMortgageManager.biz%2C+TigersForLifeInc.org%2C+Trak+12+Ent%2C+Trak12Ent.com%2C+Twitter.com%2F1iMALL%2C+Quixtar%2C+Start+your+own+business%2C+Ujamaa%2C+Ujamaa365.com+Urban+Network%2C+UrbanNetwork.com%2C+Start+your+own+internet+business%2C+Urbal%2C+YouTube.com%2F1iMALL%2C+Wealth%2C+Youngevity.com%2C+Abe+Thompson%2C+Adrian+Dove%2C+Bryan+Franklin%2C+Everett+Courtney%2C+High+Hopes%2C+Jamaal+Brown%2C+Johnnie+Morgan%2C+Gary+Rugley%2C+Keith+Charles%2C+Leila+Steinberg%2C+Les+Brown%2C+Lonzo+Williams%2C+Lynda+Wilson%2C+Mark+Stephen+Graves%2C+JD%2FMBEI%2C+Marshon+Kincy%2C+Professor+Momoh%2C+Randy+Bagby%2C+Reggie+Andrews%2C+Robert+Sinn%2C+Rodney+Franklin%2C+Rosie+Milligan%2C+Ryan+Franklin%2C+Ryan+s.+Franklin';
var metaContents  = 'This+model+was+designed+to+work+in+lieu+of+or+in+tandem+with+the+compensation+plan+best+known+as+Multi-Level+Marketing+also+known+as...';
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();
};

