/* [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 theSitetree=[ 
	['PAGE','56101',jdecode('Intro'),jdecode(''),'/56101.html','true',[],''],
	['PAGE','4901',jdecode('Home'),jdecode(''),'/4901.html','true',[],''],
	['PAGE','55101',jdecode('History'),jdecode(''),'/55101.html','true',[],''],
	['PAGE','58801',jdecode('Who%26%23x27%3Bs+Who'),jdecode(''),'/58801/index.html','true',[ 
		['PAGE','56122',jdecode('Judith+Lungen'),jdecode(''),'/58801/56122.html','true',[],''],
		['PAGE','56227',jdecode('Chris+Houston'),jdecode(''),'/58801/56227.html','true',[],''],
		['PAGE','74401',jdecode('Lorenzo+Savignano'),jdecode(''),'/58801/74401.html','true',[],''],
		['PAGE','56164',jdecode('Sven+Alexanders'),jdecode(''),'/58801/56164.html','true',[],''],
		['PAGE','56206',jdecode('George+Andrews'),jdecode(''),'/58801/56206.html','true',[],'']
	],''],
	['PAGE','9022',jdecode('Projects'),jdecode(''),'/9022/index.html','true',[ 
		['PAGE','61622',jdecode('Veneration'),jdecode(''),'/9022/61622.html','true',[],''],
		['PAGE','61601',jdecode('Chapeau+Noir'),jdecode(''),'/9022/61601.html','true',[],''],
		['PAGE','81701',jdecode('Da+Doo+Ron+Ron'),jdecode(''),'/9022/81701.html','true',[],'']
	],''],
	['PAGE','9106',jdecode('Company+Statement'),jdecode(''),'/9106.html','true',[],''],
	['PAGE','9127',jdecode('Contact'),jdecode(''),'/9127.html','true',[],''],
	['PAGE','9085',jdecode('Representation'),jdecode(''),'/9085.html','true',[],''],
	['PAGE','52901',jdecode('Links'),jdecode(''),'/52901.html','true',[],'']];
var siteelementCount=17;
theSitetree.topTemplateName='Spectrum';
theSitetree.paletteFamily='000020';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10417';
theSitetree.graphicsetId='10697';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='000000';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Spectrum',
				paletteFamily: 	'000020',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10417',
				graphicsetId: 	'10697',
				contentColor: 	'FFFFFF',
				contentBGColor: '000000',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4901',
internalId:  '',
customField: '20090416-014753'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9022',
internalId:  '',
customField: '20090407-172819'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56101',
internalId:  '',
customField: '20090502-013457'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9085',
internalId:  '',
customField: '20090406-081213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9106',
internalId:  '',
customField: '20090406-094214'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9127',
internalId:  '',
customField: '20090526-190731'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74401',
internalId:  '',
customField: '20100720-182605'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56164',
internalId:  '',
customField: '20090410-213300'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56122',
internalId:  '',
customField: '20100530-033423'
};
webappMappings['7008']=webappMappings['7008-14534']={
webappId:    '7008',
documentId:  '9127',
internalId:  '14534',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56227',
internalId:  '',
customField: '20100720-182426'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52901',
internalId:  '',
customField: '20100720-182825'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56206',
internalId:  '',
customField: '20090420-221850'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55101',
internalId:  '',
customField: '20091111-001825'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58801',
internalId:  '',
customField: '20090413-122445'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61601',
internalId:  '',
customField: '20100519-023340'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61622',
internalId:  '',
customField: '20090428-183619'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81701',
internalId:  '',
customField: '20090407-145840'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '56101',
internalId:  '1006',
customField: '1006'
};
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0IN319T';
var companyName   = 'Piccolo+Productions+LLC';
var htmlTitle	  = 'Piccolo+Productions';
var metaKeywords  = 'Judith+Lungen%2C+Chris+Houston%2C+Bernie+Barr%2C+Chapeau+Noir%2C+Veneration+of+the+Holy+Mother%2C+Titof+Dasse%2C+Tina+Cannon%2C+Eboni+Adams%2C+Mountaindale+Playhouse%2C+Roberto+Benigni%2C+Sven+Alexander%2C+';
var metaContents  = 'Piccolo+Productions+creates+theatrical+productions+that+enchant%2C+entertain+and+inspire+the+human+spirit%21';
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();
};
