/* [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','6301',jdecode('Home'),jdecode(''),'/6301.html','true',[],'',''],
	['PAGE','6943',jdecode('YDS+News'),jdecode(''),'/6943.html','true',[],'',''],
	['PAGE','35001',jdecode('Events'),jdecode(''),'/35001/index.html','true',[ 
		['PAGE','35022',jdecode('Health+Fair'),jdecode(''),'/35001/35022.html','true',[],'','']
	],'',''],
	['PAGE','11901',jdecode('YDS+Calendar+of+Events'),jdecode(''),'/11901.html','true',[],'',''],
	['PAGE','7258',jdecode('Kids+4+Health+Program'),jdecode(''),'/7258.html','true',[],'',''],
	['PAGE','9601',jdecode('Youth+Leaders+of+Change+Program'),jdecode(''),'/9601.html','true',[],'',''],
	['PAGE','6985',jdecode('Track+MN+Elite+Program'),jdecode(''),'/6985.html','true',[],'',''],
	['PAGE','28001',jdecode('Evaluation'),jdecode(''),'/28001.html','true',[],'',''],
	['PAGE','6352',jdecode('About+us'),jdecode(''),'/6352/index.html','true',[ 
		['PAGE','7153',jdecode('Fitness+Trainers'),jdecode(''),'/6352/7153.html','true',[],'','']
	],'',''],
	['PAGE','7174',jdecode('Board+of+Directors'),jdecode(''),'/7174.html','true',[],'',''],
	['PAGE','7321',jdecode('Join'),jdecode(''),'/7321.html','true',[],'',''],
	['PAGE','11922',jdecode('Health+%26+Nutrition+Forum'),jdecode(''),'/11922.html','true',[],'',''],
	['PAGE','9622',jdecode('Guest+Book'),jdecode(''),'/9622.html','true',[],'',''],
	['PAGE','9643',jdecode('Donate'),jdecode(''),'/9643.html','true',[],'',''],
	['PAGE','7237',jdecode('Links'),jdecode(''),'/7237.html','true',[],'',''],
	['PAGE','7279',jdecode('Contact'),jdecode(''),'/7279.html','true',[],'',''],
	['PAGE','35801',jdecode('Testimonials'),jdecode(''),'/35801.html','true',[],'','']];
var siteelementCount=19;
theSitetree.topTemplateName='Blossom';
theSitetree.paletteFamily='18902D';
theSitetree.keyvisualId='7137';
theSitetree.keyvisualName='kv_7137.jpg';
theSitetree.fontsetId='16396';
theSitetree.graphicsetId='12130';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='E5E2E2';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Blossom',
				paletteFamily: 	'18902D',
				keyvisualId: 	'7137',
				keyvisualName: 	'kv_7137.jpg',
				fontsetId: 		'16396',
				graphicsetId: 	'12130',
				contentColor: 	'000000',
				contentBGColor: 'E5E2E2',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6301',
internalId:  '',
customField: '20100528-001020'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6352',
internalId:  '',
customField: '20091125-160023'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11901',
internalId:  '',
customField: '20100211-131234'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6943',
internalId:  '',
customField: '20100527-234755'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9622',
internalId:  '',
customField: '20090218-170913'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6985',
internalId:  '',
customField: '20100211-141322'
};
webappMappings['1003']=webappMappings['1003-ahw050invzud11f8bd88509']={
webappId:    '1003',
documentId:  '11922',
internalId:  'ahw050invzud11f8bd88509',
customField: 'en:US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35001',
internalId:  '',
customField: '20100413-173948'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35022',
internalId:  '',
customField: '20100301-190020'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35801',
internalId:  '',
customField: '20100309-163136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9643',
internalId:  '',
customField: '20100224-121348'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28001',
internalId:  '',
customField: '20091130-144758'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7153',
internalId:  '',
customField: '20090218-172145'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7174',
internalId:  '',
customField: '20100520-112831'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9601',
internalId:  '',
customField: '20091125-151653'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7237',
internalId:  '',
customField: '20091125-164415'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7258',
internalId:  '',
customField: '20091125-151222'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7279',
internalId:  '',
customField: '20100211-125320'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7321',
internalId:  '',
customField: '20100211-131314'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '6301',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11922',
internalId:  '',
customField: '20091214-181718'
};
webappMappings['1501']=webappMappings['1501-3723850']={
webappId:    '1501',
documentId:  '6301',
internalId:  '3723850',
customField: '1501'
};
webappMappings['1002']=webappMappings['1002-9622ahw050invzud']={
webappId:    '1002',
documentId:  '9622',
internalId:  '9622ahw050invzud',
customField: 'icq=false'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INVZUD';
var companyName   = 'Youth+Determined+To+Succeed';
var htmlTitle	  = 'Youth+Determined+To+Succeed';
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();
};
