/* [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','3352',jdecode('Hours+of+Operation'),jdecode(''), jdecode('%2F3352%2Findex.html'), 'true',[ 
		['PAGE','3301',jdecode('Our+Mission'),jdecode(''), jdecode('%2F3352%2F3301.html'), 'true',[],'',''],
		['PAGE','140821',jdecode('Monkey+Tale'),jdecode(''), jdecode('%2F3352%2F140821.html'), 'true',[],'','']
	],'',''],
	['PAGE','180349',jdecode('Evolve+Gallery'),jdecode(''), jdecode('%2F180349%2Findex.html'), 'true',[ 
		['PAGE','329396',jdecode('February%3A+Home'),jdecode(''), jdecode('%2F180349%2F329396.html'), 'true',[],'',''],
		['PAGE','378375',jdecode('March%3A+Art+of+Healing'),jdecode(''), jdecode('%2F180349%2F378375.html'), 'true',[],'',''],
		['PAGE','378396',jdecode('April%3A+Recycled+Words'),jdecode(''), jdecode('%2F180349%2F378396.html'), 'true',[],'',''],
		['PAGE','378417',jdecode('May%3A+Youth+Art+Show'),jdecode(''), jdecode('%2F180349%2F378417.html'), 'true',[],'',''],
		['PAGE','130407',jdecode('2011-12+Artist+Call'),jdecode(''), jdecode('%2F180349%2F130407.html'), 'true',[],'','']
	],'',''],
	['PAGE','72611',jdecode('Workshops+%26+Classes'),jdecode(''), jdecode('%2F72611%2Findex.html'), 'true',[ 
		['PAGE','241596',jdecode('January'),jdecode(''), jdecode('%2F72611%2F241596.html'), 'true',[],'',''],
		['PAGE','330175',jdecode('February'),jdecode(''), jdecode('%2F72611%2F330175.html'), 'true',[],'',''],
		['PAGE','330196',jdecode('March'),jdecode(''), jdecode('%2F72611%2F330196.html'), 'true',[],'',''],
		['PAGE','330217',jdecode('April'),jdecode(''), jdecode('%2F72611%2F330217.html'), 'true',[],'','']
	],'',''],
	['PAGE','241575',jdecode('Open+Studio+DIY'),jdecode(''), jdecode('%2F241575.html'), 'true',[],'',''],
	['PAGE','241475',jdecode('Youth+Art+Programs'),jdecode(''), jdecode('%2F241475%2Findex.html'), 'true',[ 
		['PAGE','70232',jdecode('Messy+Monkeys+1-6+yr'),jdecode(''), jdecode('%2F241475%2F70232.html'), 'true',[],'',''],
		['PAGE','192761',jdecode('Tuesday+Art+Club'),jdecode(''), jdecode('%2F241475%2F192761.html'), 'true',[],'',''],
		['PAGE','256175',jdecode('No+School+Art+Studio'),jdecode(''), jdecode('%2F241475%2F256175.html'), 'true',[],'','']
	],'',''],
	['PAGE','55569',jdecode('Art+Therapy'),jdecode(''), jdecode('%2F55569%2Findex.html'), 'true',[ 
		['PAGE','5999',jdecode('Art+Tx+Services'),jdecode(''), jdecode('%2F55569%2F5999.html'), 'true',[],'','']
	],'',''],
	['PAGE','53769',jdecode('Events+%26+Space+Rental'),jdecode(''), jdecode('%2F53769%2Findex.html'), 'true',[ 
		['PAGE','4201',jdecode('Special+Event+Candids'),jdecode(''), jdecode('%2F53769%2F4201.html'), 'true',[],'','']
	],'',''],
	['PAGE','3373',jdecode('Opportunities'),jdecode(''), jdecode('%2F3373%2Findex.html'), 'true',[ 
		['PAGE','69932',jdecode('Internships'),jdecode(''), jdecode('%2F3373%2F69932.html'), 'true',[],'',''],
		['PAGE','69953',jdecode('Volunteer'),jdecode(''), jdecode('%2F3373%2F69953.html'), 'true',[],'',''],
		['PAGE','352375',jdecode('Teaching'),jdecode(''), jdecode('%2F3373%2F352375.html'), 'true',[],'',''],
		['PAGE','69974',jdecode('Artist+Scholarship+Fund'),jdecode(''), jdecode('%2F3373%2F69974.html'), 'true',[],'','']
	],'',''],
	['PAGE','108851',jdecode('Who+We+Are'),jdecode(''), jdecode('%2F108851%2Findex.html'), 'true',[ 
		['PAGE','3478',jdecode('Founders'),jdecode(''), jdecode('%2F108851%2F3478.html'), 'true',[],'',''],
		['PAGE','108872',jdecode('Staff'),jdecode(''), jdecode('%2F108851%2F108872.html'), 'true',[],'',''],
		['PAGE','108893',jdecode('Interns'),jdecode(''), jdecode('%2F108851%2F108893.html'), 'true',[],'',''],
		['PAGE','13820',jdecode('Teachers+%26+Leaders'),jdecode(''), jdecode('%2F108851%2F13820.html'), 'true',[],'',''],
		['PAGE','121707',jdecode('Board+Members'),jdecode(''), jdecode('%2F108851%2F121707.html'), 'true',[],'','']
	],'',''],
	['PAGE','9920',jdecode('Monkey+Blog'),jdecode(''), jdecode('%2F9920.html'), 'true',[],'',''],
	['PAGE','12820',jdecode('Contact+Us'),jdecode(''), jdecode('%2F12820.html'), 'true',[],'',''],
	['PAGE','3394',jdecode('Links'),jdecode(''), jdecode('%2F3394%2Findex.html'), 'true',[ 
		['PAGE','108914',jdecode('Clinicians+On+Site'),jdecode(''), jdecode('%2F3394%2F108914.html'), 'true',[],'',''],
		['PAGE','108935',jdecode('Artists'),jdecode(''), jdecode('%2F3394%2F108935.html'), 'true',[],'',''],
		['PAGE','108956',jdecode('Artist+Community'),jdecode(''), jdecode('%2F3394%2F108956.html'), 'true',[],'',''],
		['PAGE','108977',jdecode('Art+Therapy'),jdecode(''), jdecode('%2F3394%2F108977.html'), 'true',[],'',''],
		['PAGE','108998',jdecode('Community'),jdecode(''), jdecode('%2F3394%2F108998.html'), 'true',[],'','']
	],'','']];
var siteelementCount=42;
theSitetree.topTemplateName='Common';
theSitetree.paletteFamily='5AA435';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='26633';
theSitetree.graphicsetId='13447';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'endurance',
  product: 'WSCSYSSSSLY0XRNU'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Common',
				paletteFamily: 	'5AA435',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'26633',
				graphicsetId: 	'13447',
				contentColor: 	'000000',
				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:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3301',
internalId:  '',
customField: '20110828-215453'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3373',
internalId:  '',
customField: '20120123-142639'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55569',
internalId:  '',
customField: '20110822-153144'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3352',
internalId:  '',
customField: '20120121-195407'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4201',
internalId:  '',
customField: '20090623-165442'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5999',
internalId:  '',
customField: '20111108-213229'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3478',
internalId:  '',
customField: '20110503-173422'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3394',
internalId:  '',
customField: '20090623-180857'
};
webappMappings['7050']=webappMappings['7050-1027']={
webappId:    '7050',
documentId:  '9920',
internalId:  '1027',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '241575',
internalId:  '',
customField: '20110828-215541'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9920',
internalId:  '',
customField: '20080404-003638'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12820',
internalId:  '',
customField: '20100219-171253'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13820',
internalId:  '',
customField: '20120117-180510'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '108935',
internalId:  '',
customField: '20090822-154027'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '378375',
internalId:  '',
customField: '20120126-184042'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '121707',
internalId:  '',
customField: '20100830-123916'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53769',
internalId:  '',
customField: '20110503-171934'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '108851',
internalId:  '',
customField: '20090425-183958'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '192761',
internalId:  '',
customField: '20120123-135535'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70232',
internalId:  '',
customField: '20120130-193351'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '330217',
internalId:  '',
customField: '20120130-190246'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69932',
internalId:  '',
customField: '20120123-145832'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69953',
internalId:  '',
customField: '20110829-201024'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69974',
internalId:  '',
customField: '20110829-201208'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '378417',
internalId:  '',
customField: '20120109-154842'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72611',
internalId:  '',
customField: '20110829-112106'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '352375',
internalId:  '',
customField: '20120117-183101'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '108914',
internalId:  '',
customField: '20110103-163006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '108956',
internalId:  '',
customField: '20100709-112153'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '108977',
internalId:  '',
customField: '20110126-124257'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '108998',
internalId:  '',
customField: '20090424-141125'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '108872',
internalId:  '',
customField: '20110928-175130'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '108893',
internalId:  '',
customField: '20120124-193541'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '329396',
internalId:  '',
customField: '20120201-185503'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '241475',
internalId:  '',
customField: '20120126-184336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '256175',
internalId:  '',
customField: '20120126-195254'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '180349',
internalId:  '',
customField: '20120126-182228'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '241596',
internalId:  '',
customField: '20120117-182232'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '130407',
internalId:  '',
customField: '20120109-160134'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '330196',
internalId:  '',
customField: '20120130-165450'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '330175',
internalId:  '',
customField: '20120130-201824'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '378396',
internalId:  '',
customField: '20120126-183412'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '140821',
internalId:  '',
customField: '20090820-150743'
};
var webAppHostname = 'cgiwsc.enhancedsitebuilder.com:80';
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0IN2706';
var companyName   = 'The+100th+Monkey+Studio';
var htmlTitle	  = 'The+100th+Monkey+Studio';
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();
};

