/* [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(''),'/401.html','true',[],'',''],
	['PAGE','452',jdecode('Saturday+Classes'),jdecode(''),'/452.html','true',[],'',''],
	['PAGE','22601',jdecode('Saturday+Registration'),jdecode(''),'/22601.html','true',[],'',''],
	['PAGE','39728',jdecode('Teen+Conservatory'),jdecode(''),'/39728.html','true',[],'',''],
	['PAGE','8201',jdecode('Summer+Program'),jdecode(''),'/8201.html','true',[],'',''],
	['PAGE','10501',jdecode('Calendar+of+Events'),jdecode(''),'/10501.html','true',[],'',''],
	['PAGE','473',jdecode('About+us'),jdecode(''),'/473.html','true',[],'',''],
	['PAGE','11301',jdecode('Faculty'),jdecode(''),'/11301/index.html','true',[ 
		['PAGE','39545',jdecode('Cate+Bottiglione'),jdecode(''),'/11301/39545.html','true',[],'',''],
		['PAGE','18301',jdecode('Ted+Dalbotten'),jdecode(''),'/11301/18301.html','true',[],'',''],
		['PAGE','39554',jdecode('Kathleen+Drinane+Davis'),jdecode(''),'/11301/39554.html','true',[],'',''],
		['PAGE','39582',jdecode('Adriana+Disman'),jdecode(''),'/11301/39582.html','true',[],'',''],
		['PAGE','11322',jdecode('Darleen+Jaeger+Hickok'),jdecode(''),'/11301/11322.html','true',[],'',''],
		['PAGE','39655',jdecode('Mark+Katsaounis'),jdecode(''),'/11301/39655.html','true',[],'',''],
		['PAGE','12501',jdecode('Heather+LoSchiavo'),jdecode(''),'/11301/12501.html','true',[],'',''],
		['PAGE','39563',jdecode('Julie+Mac'),jdecode(''),'/11301/39563.html','true',[],'',''],
		['PAGE','27022',jdecode('Nicole+Riche'),jdecode(''),'/11301/27022.html','true',[],'',''],
		['PAGE','14101',jdecode('Yousif+Sheronick'),jdecode(''),'/11301/14101.html','true',[],'',''],
		['PAGE','11343',jdecode('Steven+Silverstein'),jdecode(''),'/11301/11343.html','true',[],'',''],
		['PAGE','39698',jdecode('Greg+Skura'),jdecode(''),'/11301/39698.html','true',[],'','']
	],'',''],
	['PAGE','536',jdecode('Contact'),jdecode(''),'/536.html','true',[],'',''],
	['PAGE','26101',jdecode('Handbook'),jdecode(''),'/26101.html','true',[],'',''],
	['PAGE','557',jdecode('Location'),jdecode(''),'/557.html','true',[],'','']];
var siteelementCount=23;
theSitetree.topTemplateName='Deepcolor';
theSitetree.paletteFamily='D14747';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10613';
theSitetree.graphicsetId='10471';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='980000';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Deepcolor',
				paletteFamily: 	'D14747',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10613',
				graphicsetId: 	'10471',
				contentColor: 	'000000',
				contentBGColor: '980000',
				a_color: 		'D14747',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '452',
internalId:  '',
customField: '20100829-205559'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22601',
internalId:  '',
customField: '20100829-204110'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20100829-201735'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8201',
internalId:  '',
customField: '20100727-142541'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10501',
internalId:  '',
customField: '20100727-135808'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '473',
internalId:  '',
customField: '20080629-220101'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11301',
internalId:  '',
customField: '20100210-123852'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39582',
internalId:  '',
customField: '20091103-095122'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18301',
internalId:  '',
customField: '20091103-090919'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39545',
internalId:  '',
customField: '20091103-100745'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11322',
internalId:  '',
customField: '20091103-102003'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12501',
internalId:  '',
customField: '20080715-063444'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39554',
internalId:  '',
customField: '20091103-091331'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27022',
internalId:  '',
customField: '20080629-215836'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14101',
internalId:  '',
customField: '20070303-150359'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11343',
internalId:  '',
customField: '20091104-051548'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '536',
internalId:  '',
customField: '20070210-204144'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26101',
internalId:  '',
customField: '20100727-162040'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '557',
internalId:  '',
customField: '20070210-204402'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39655',
internalId:  '',
customField: '20091103-183852'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39698',
internalId:  '',
customField: '20100210-125635'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39563',
internalId:  '',
customField: '20091103-101306'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39728',
internalId:  '',
customField: '20100829-205308'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INX23Z';
var companyName   = 'Neighborhood+Playhouse+Junior+School';
var htmlTitle	  = 'Neighborhood+Playhouse+Junior+School+Information';
var metaKeywords  = 'acting%2C+theatre%2C+classes%2C+children%2C+new+york+city%2C+nyc%2C+ny%2C+singing%2C+dancing%2C+youth%2C+teen%2C+neighborhood%2C+playhouse%2C+young+people%2C+creative+drama%2C+workshops%2C+summer%2C+program%2C+improvisation%2C+improv%2C+dance%2C+sing%2C+act%2C+imagination%2C+meisner%2C+technique%2C+camp%2C+presentation%2C+summer+theatre+camp%2C+theater%2C+kids';
var metaContents  = 'acting%2C+singing%2C+dance+for+children+and+young+adults+in+new+york+city';
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();
};
