/* [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','701',jdecode('Home'),jdecode(''), jdecode('%2F701.html'), 'true',[],'',''],
	['PAGE','4101',jdecode('Acting+Workshops'),jdecode(''), jdecode('%2F4101.html'), 'true',[],'',''],
	['PAGE','1885',jdecode('Musical+Theatre'),jdecode(''), jdecode('%2F1885.html'), 'true',[],'',''],
	['PAGE','4143',jdecode('Class+Updates'),jdecode(''), jdecode('%2F4143.html'), 'true',[],'',''],
	['PAGE','4122',jdecode('Registration'),jdecode(''), jdecode('%2F4122.html'), 'true',[],'',''],
	['PAGE','1801',jdecode('About+us'),jdecode(''), jdecode('%2F1801.html'), 'true',[],'',''],
	['PAGE','9901',jdecode('Ticketing+%26+Show+Info'),jdecode(''), jdecode('%2F9901%2Findex.html'), 'true',[ 
		['PAGE','4185',jdecode('Summer+Camps'),jdecode(''), jdecode('%2F9901%2F4185.html'), 'true',[],'','']
	],'','']];
var siteelementCount=8;
theSitetree.topTemplateName='Citylights';
theSitetree.paletteFamily='333366';
theSitetree.keyvisualId='10438';
theSitetree.keyvisualName='kv_10438.jpg';
theSitetree.fontsetId='26577';
theSitetree.graphicsetId='13401';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='333366';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'endurance',
  product: 'WSCSYSSSSLY0XRNC'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Citylights',
				paletteFamily: 	'333366',
				keyvisualId: 	'10438',
				keyvisualName: 	'kv_10438.jpg',
				fontsetId: 		'26577',
				graphicsetId: 	'13401',
				contentColor: 	'FFFFFF',
				contentBGColor: '333366',
				a_color: 		'3E3535',
				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['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '701',
internalId:  '',
customField: '20111009-112335'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4143',
internalId:  '',
customField: '20120118-110947'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4101',
internalId:  '',
customField: '20111118-172537'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1885',
internalId:  '',
customField: '20120118-110734'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4185',
internalId:  '',
customField: '20110822-135603'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1801',
internalId:  '',
customField: '20120112-165012'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4122',
internalId:  '',
customField: '20111118-173538'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9901',
internalId:  '',
customField: '20111222-084017'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '701',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '4185',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '4101',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '1885',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '4143',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '4122',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '1801',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '9901',
internalId:  '',
customField: 'language:en;country:US;'
};
var webAppHostname = 'cgiwsc.enhancedsitebuilder.com:80';
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0INXVFA';
var companyName   = '+++A+C+T+I+N+G+++N+A+T+U+R+A+L+L+Y';
var htmlTitle	  = '+++++++++++Acting+Naturally';
var metaKeywords  = 'Advanced+Acting%2C+ACTING+Classes%2C+MUSICAL+THEATRE+WORKSHOP.+Summer+camps%2C+Auditions%2C+Acting+Lessons%2C+Acting+PA%2C+Acting+Bucks+County%2C+Learn+Acting%2C+Acting+Camp%2C+Bucks+County+Acting%2C+Acting+for+kids%2C+Teen+Acting%2C+Boys+Dance+Too%21%2C+Seussical+Dance%2C+Musical+Theater%2C+Improvisation%2C+Theatre+Games%2C+Acting+Lessons+ages+8+-18%2C+Video+Production+Camp%2C+Musical+theater+Camp%2C+Summer+Camp%2C+Boys+and+Girls+Acting+Camp%2C+Acting+Workshops%2C+Neshaminy+Acting%2C+Teen+Improvisation%2C+Monologues%2C+Scene+Study%2C+Learn+Acting%2C+8+year+old+acting%2C+12+year+old+acting%2C+Bucks+County+Acting%2C+Yardley+Acting%2C+Newtown+Acting%2C+Pennsbury+Acting%2C+Council+Rock+Acting%2C+Bucks+County+Musical+Theater%2C+Acting+19067+area%2C++Performing+arts%2C++Pennsbury+Acting%2C+Newtown+Acting%2C+Morrisville+Acting%2C+Yardley+Community+Center%2C+Auditions+Yardley+Community+Centre%2C+Stephen+Casey';
var metaContents  = 'Acting+Classes.+MUSICAL+THEATRE.+Acting+Lessons%2C+Acting+in+Bucks+County%2C+Bucks+County+Acting+Camps%2C+Auditions%2C+Pennsbury+Acting+lessons%2C+Teen+acting%2C+Acting+for+theatre%2C++Summer+acting+camps%2C+8+-+18%2C+Acting+Workshops%2C+Lower+Makefield+Acting+Lessons%2C+Boys+Dance+Too%21%2C+Stephen+Casey%2C+Teen+Improvisation%2C+Bucks+County+Acting%2C+Yardley+acting%2C+Newtown+Acting%2C+Neshaminy%2CPennsbury%2C+Council+Rock%2C+Acting+for+boys+and+girls%2C+Musical+theater+for+boys+and+girls%2C+Improvisation%2C+Build+self+esteem%2C+build+confidence%2C+theater+games%2C+Acting+19067+area%2C++Singing+in+Musicals%2C+Singing%2C+Learn+acting%2C+Pennsbury+Drama%2C+Morrisville+Acting%2C+learn+Acting%2C+Yardley+Community+Center%2C+Auditions+for+Talent+Show%2C+Stephen+Casey%2C+dancing%2C+summer+acting+Camps';
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();
};

