/* [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','32',jdecode('Home'),jdecode(''),'/32.html','true',[],'',''],
	['PAGE','1395',jdecode('Supporters'),jdecode(''),'/1395.html','true',[],'',''],
	['PAGE','1359',jdecode('About+Us'),jdecode(''),'/1359.html','true',[],'',''],
	['PAGE','1907',jdecode('Executive+Board'),jdecode(''),'/1907.html','true',[],'',''],
	['PAGE','2463',jdecode('Contact+the+Staff'),jdecode(''),'/2463.html','true',[],'',''],
	['PAGE','35663',jdecode('Willy+Wonka+cast'),jdecode(''),'/35663.html','true',[],'',''],
	['PAGE','1309',jdecode('Guestbook'),jdecode(''),'/1309/index.html','true',[ 
		['PAGE','1308',jdecode('Read+Guestbook'),jdecode(''),'/1309/1308.html','false',[],'','']
	],'',''],
	['PAGE','1377',jdecode('Past+Shows'),jdecode(''),'/1377.html','true',[],'',''],
	['PAGE','23163',jdecode('%22Annie%22+Pictures'),jdecode(''),'/23163.html','true',[],'',''],
	['PAGE','7526',jdecode('%22Anything+Goes%22+Pics'),jdecode(''),'/7526.html','true',[],'',''],
	['PAGE','5337',jdecode('%22Oliver%22+Pictures'),jdecode(''),'/5337.html','true',[],'',''],
	['PAGE','29663',jdecode('%22Singin+in+the+Rain+Pics'),jdecode(''),'/29663.html','true',[],'',''],
	['PAGE','2113',jdecode('Sacred+Heart+Church'),jdecode(''),'/2113.html','true',[],'',''],
	['PAGE','2122',jdecode('Sacred+Heart+School'),jdecode(''),'/2122.html','true',[],'',''],
	['PAGE','7202',jdecode('Knights+of+Columbus'),jdecode(''),'/7202.html','true',[],'',''],
	['PAGE','11101',jdecode('In+Memoriam'),jdecode(''),'/11101.html','true',[],'','']];
var siteelementCount=17;
theSitetree.topTemplateName='Cinema';
theSitetree.paletteFamily='B00E18';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='16615';
theSitetree.graphicsetId='12208';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='B00E18';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Cinema',
				paletteFamily: 	'B00E18',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'16615',
				graphicsetId: 	'12208',
				contentColor: 	'000000',
				contentBGColor: 'B00E18',
				a_color: 		'000000',
				b_color: 		'C03E46',
				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['7060']=webappMappings['7060-64a7e133ec7f1e37d0b5448957bdabcc']={
webappId:    '7060',
documentId:  '5337',
internalId:  '64a7e133ec7f1e37d0b5448957bdabcc',
customField: 'language:en;country:US;'
};
webappMappings['1002']=webappMappings['1002-1309AHW050INX3KU']={
webappId:    '1002',
documentId:  '1309',
internalId:  '1309AHW050INX3KU',
customField: 'icq=false'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '32',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1395',
internalId:  '',
customField: '20100509-115419'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32',
internalId:  '',
customField: '20100628-203831'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35663',
internalId:  '',
customField: '20100702-215242'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1359',
internalId:  '',
customField: '20090430-211420'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23163',
internalId:  '',
customField: '20081125-220549'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1907',
internalId:  '',
customField: '20100509-114835'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2463',
internalId:  '',
customField: '20100509-115126'
};
webappMappings['1501']=webappMappings['1501-215235']={
webappId:    '1501',
documentId:  '32',
internalId:  '215235',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29663',
internalId:  '',
customField: '20091124-202158'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1309',
internalId:  '',
customField: '20091124-202232'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1308',
internalId:  '',
customField: '20081025-194415'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1377',
internalId:  '',
customField: '20091019-200559'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7526',
internalId:  '',
customField: '20071121-041743'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5337',
internalId:  '',
customField: '20071119-041501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2113',
internalId:  '',
customField: '20090729-182410'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2122',
internalId:  '',
customField: '20071119-041615'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7202',
internalId:  '',
customField: '20071119-043229'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11101',
internalId:  '',
customField: '20100509-121822'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INX3KU';
var companyName   = '++++++++++++++SACRED+HEART+PLAYERS';
var htmlTitle	  = 'Sacred+Heart+Players+-+Suffern%2C+NY';
var metaKeywords  = 'sacred+heart+players%2C+suffern%2C+new+york%2C+community+theatre%2C+sacred+heart+church';
var metaContents  = 'Sacred+Heart+players%2C+suffern%2C+New+York';
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();
};
