/* [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','56101',jdecode('INTRO'),jdecode(''), jdecode('%2F56101.html'), 'false',[],'',''],
	['PAGE','4901',jdecode('Home'),jdecode(''), jdecode('%2F4901.html'), 'true',[],'',''],
	['PAGE','55101',jdecode('History'),jdecode(''), jdecode('%2F55101.html'), 'true',[],'',''],
	['PAGE','58801',jdecode('Who%26%23x27%3Bs+Who'),jdecode(''), jdecode('%2F58801%2Findex.html'), 'true',[ 
		['PAGE','56122',jdecode('Judith+Lungen'),jdecode(''), jdecode('%2F58801%2F56122.html'), 'true',[],'',''],
		['PAGE','56164',jdecode('Sven+Alexanders'),jdecode(''), jdecode('%2F58801%2F56164.html'), 'true',[],'',''],
		['PAGE','166730',jdecode('Lynn+%28Pheasant%29+Welden'),jdecode(''), jdecode('%2F58801%2F166730.html'), 'true',[],'',''],
		['PAGE','56227',jdecode('Chris+Houston'),jdecode(''), jdecode('%2F58801%2F56227.html'), 'true',[],'',''],
		['PAGE','74401',jdecode('Lorenzo+Savignano'),jdecode(''), jdecode('%2F58801%2F74401.html'), 'true',[],'',''],
		['PAGE','56206',jdecode('George+Andrews'),jdecode(''), jdecode('%2F58801%2F56206.html'), 'false',[],'','']
	],'',''],
	['PAGE','164330',jdecode('Our+Angels'),jdecode(''), jdecode('%2F164330.html'), 'true',[],'',''],
	['PAGE','9022',jdecode('Projects'),jdecode(''), jdecode('%2F9022%2Findex.html'), 'true',[ 
		['PAGE','61622',jdecode('Veneration'),jdecode(''), jdecode('%2F9022%2F61622.html'), 'true',[],'',''],
		['PAGE','61601',jdecode('Chapeau+Noir'),jdecode(''), jdecode('%2F9022%2F61601.html'), 'true',[],'',''],
		['PAGE','81701',jdecode('Da+Doo+Ron+Ron'),jdecode(''), jdecode('%2F9022%2F81701.html'), 'false',[],'','']
	],'',''],
	['PAGE','9085',jdecode('Representation'),jdecode(''), jdecode('%2F9085.html'), 'true',[],'',''],
	['PAGE','9106',jdecode('Company+Statement'),jdecode(''), jdecode('%2F9106.html'), 'true',[],'',''],
	['PAGE','9127',jdecode('Contact'),jdecode(''), jdecode('%2F9127.html'), 'true',[],'',''],
	['PAGE','52901',jdecode('Links'),jdecode(''), jdecode('%2F52901.html'), 'true',[],'','']];
var siteelementCount=19;
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 prodDef={
  wl_name: 'endurance',
  product: 'WSCSYSSSSLY0XRN4'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Spectrum',
				paletteFamily: 	'000020',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10417',
				graphicsetId: 	'10697',
				contentColor: 	'FFFFFF',
				contentBGColor: '000000',
				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: '20120110-002112'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '166730',
internalId:  '',
customField: '20120208-031652'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9022',
internalId:  '',
customField: '20120208-004048'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '164330',
internalId:  '',
customField: '20120208-031914'
};
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: '20120208-003530'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56164',
internalId:  '',
customField: '20120208-003413'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56122',
internalId:  '',
customField: '20120208-003006'
};
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: '20120208-003249'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52901',
internalId:  '',
customField: '20120208-032500'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56206',
internalId:  '',
customField: '20110322-044019'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55101',
internalId:  '',
customField: '20091111-001825'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58801',
internalId:  '',
customField: '20120103-040924'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61601',
internalId:  '',
customField: '20120129-064159'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61622',
internalId:  '',
customField: '20120208-004202'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81701',
internalId:  '',
customField: '20090407-145840'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4901',
internalId:  '1006',
customField: '1006'
};
var webAppHostname = 'cgiwsc.enhancedsitebuilder.com:80';
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0IN319T';
var companyName   = 'Piccolo+Productions+LLC';
var htmlTitle	  = 'Piccolo+Productions';
var metaKeywords  = 'Judith+Lungen%2C+Veneration%2C+Roberto+Benigni%2C+Chris+Houston%2C+Bernie+Barr%2C+Mountaindale+Playhouse%2C+Rudolf+Nureyev%2C+Titof+Dasse%2C+Walker+Books%2C+Chapeau+Noir';
var metaContents  = 'Piccolo+Productions+is+an+entertainment+development+company.++We+create+motion+pictures+and+multi-media+theatrical+productions+that+enchant%2C+entertain+and+inspire+the+human+spirit.';
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();
};

