/* [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','4513',jdecode('Home'),jdecode(''), jdecode('%2F4513.html'), 'true',[],'',''],
	['PAGE','5302',jdecode('Wer+sind+wir%3F'),jdecode(''), jdecode('%2F5302%2Findex.html'), 'true',[ 
		['PAGE','5329',jdecode('unser+Ensemble'),jdecode(''), jdecode('%2F5302%2F5329.html'), 'true',[],'',''],
		['PAGE','14819',jdecode('unsere+Zukunft'),jdecode(''), jdecode('%2F5302%2F14819.html'), 'true',[],'','']
	],'',''],
	['PAGE','5356',jdecode('Kontakt'),jdecode(''), jdecode('%2F5356%2Findex.html'), 'true',[ 
		['PAGE','20064',jdecode('Kontakt+%28Folgeseite%29'),jdecode(''), jdecode('%2F5356%2F20064.html'), 'false',[],'','']
	],'',''],
	['PAGE','5491',jdecode('Vereins-Chronik'),jdecode(''), jdecode('%2F5491.html'), 'true',[],'',''],
	['PAGE','5383',jdecode('Wo+sind+wir%3F'),jdecode(''), jdecode('%2F5383%2Findex.html'), 'true',[ 
		['PAGE','11329',jdecode('Vereinslokal'),jdecode(''), jdecode('%2F5383%2F11329.html'), 'true',[],'',''],
		['PAGE','18193',jdecode('Lageplan'),jdecode(''), jdecode('%2F5383%2F18193.html'), 'true',[],'',''],
		['PAGE','96091',jdecode('Routenplaner+zu+uns'),jdecode(''), jdecode('%2F5383%2F96091.html'), 'true',[],'','']
	],'',''],
	['PAGE','5437',jdecode('Mein+neues+Hobby'),jdecode(''), jdecode('%2F5437%2Findex.html'), 'true',[ 
		['PAGE','8405',jdecode('Wer+kann+mitmachen%3F'),jdecode(''), jdecode('%2F5437%2F8405.html'), 'true',[],'',''],
		['PAGE','8432',jdecode('Was+kostet+es%3F'),jdecode(''), jdecode('%2F5437%2F8432.html'), 'true',[],'',''],
		['PAGE','8459',jdecode('Welche+Bedingungen%3F'),jdecode(''), jdecode('%2F5437%2F8459.html'), 'true',[],'',''],
		['PAGE','8486',jdecode('Was+ist+eine+Theatersaison%3F'),jdecode(''), jdecode('%2F5437%2F8486.html'), 'true',[],'',''],
		['PAGE','8513',jdecode('Was+ist+noch+zu+tun%3F'),jdecode(''), jdecode('%2F5437%2F8513.html'), 'true',[],'',''],
		['PAGE','8540',jdecode('Was+sind+unsere+Ziele%3F'),jdecode(''), jdecode('%2F5437%2F8540.html'), 'true',[],'',''],
		['PAGE','8567',jdecode('Was+brauche+ich+noch%3F'),jdecode(''), jdecode('%2F5437%2F8567.html'), 'true',[],'','']
	],'',''],
	['PAGE','5545',jdecode('Theater-Auff%C3%BChrungen'),jdecode(''), jdecode('%2F5545%2Findex.html'), 'true',[ 
		['PAGE','7665',jdecode('Spielkalender+1-Akter'),jdecode(''), jdecode('%2F5545%2F7665.html'), 'true',[],'',''],
		['PAGE','8156',jdecode('Spielkalender+Mehrakter'),jdecode(''), jdecode('%2F5545%2F8156.html'), 'true',[],'',''],
		['PAGE','12329',jdecode('fr%C3%BChere+Theater'),jdecode(''), jdecode('%2F5545%2F12329.html'), 'true',[],'','']
	],'',''],
	['PAGE','5518',jdecode('Theater-Shop'),jdecode(''), jdecode('%2F5518.html'), 'true',[],'',''],
	['PAGE','5572',jdecode('Presse'),jdecode(''), jdecode('%2F5572.html'), 'true',[],'',''],
	['PAGE','8594',jdecode('Man+kann+uns+mieten'),jdecode(''), jdecode('%2F8594%2Findex.html'), 'true',[ 
		['PAGE','13229',jdecode('Mietans%C3%A4tze'),jdecode(''), jdecode('%2F8594%2F13229.html'), 'true',[],'','']
	],'',''],
	['PAGE','5599',jdecode('Weitere+Aktivit%C3%A4ten'),jdecode(''), jdecode('%2F5599%2Findex.html'), 'true',[ 
		['PAGE','7773',jdecode('Ausfl%C3%BCge'),jdecode(''), jdecode('%2F5599%2F7773.html'), 'true',[],'',''],
		['PAGE','7719',jdecode('Inself%C3%A4scht'),jdecode(''), jdecode('%2F5599%2F7719.html'), 'true',[],'',''],
		['PAGE','201701',jdecode('Rund+um+die+Auff%C3%BChrung'),jdecode(''), jdecode('%2F5599%2F201701.html'), 'true',[],'',''],
		['PAGE','7692',jdecode('Spiel+und+Spass'),jdecode(''), jdecode('%2F5599%2F7692.html'), 'true',[],'',''],
		['PAGE','7746',jdecode('Weihnachtsfeier'),jdecode(''), jdecode('%2F5599%2F7746.html'), 'true',[],'',''],
		['PAGE','182301',jdecode('Weiterbildung'),jdecode(''), jdecode('%2F5599%2F182301.html'), 'true',[],'',''],
		['PAGE','10104',jdecode('W%C3%BCmmetfest'),jdecode(''), jdecode('%2F5599%2F10104.html'), 'true',[],'','']
	],'',''],
	['PAGE','5626',jdecode('weitere+Kontakte'),jdecode(''), jdecode('%2F5626%2Findex.html'), 'true',[ 
		['PAGE','227743',jdecode('Allgemeine+Links'),jdecode(''), jdecode('%2F5626%2F227743.html'), 'true',[],'',''],
		['PAGE','227701',jdecode('Theaterlinks'),jdecode(''), jdecode('%2F5626%2F227701.html'), 'true',[],'',''],
		['PAGE','227722',jdecode('K%C3%BCnstlerlinks'),jdecode(''), jdecode('%2F5626%2F227722.html'), 'true',[],'','']
	],'',''],
	['PAGE','6002',jdecode('G%C3%A4stebuch'),jdecode(''), jdecode('%2F6002%2Findex.html'), 'true',[ 
		['PAGE','6003',jdecode('Eintr%C3%A4ge'),jdecode(''), jdecode('%2F6002%2F6003.html'), 'false',[],'','']
	],'','']];
var siteelementCount=41;
theSitetree.topTemplateName='Logg';
theSitetree.paletteFamily='1D6C89';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='423';
theSitetree.graphicsetId='470';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='1D6C89';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2MX'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Logg',
				paletteFamily: 	'1D6C89',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'423',
				graphicsetId: 	'470',
				contentColor: 	'FFFFFF',
				contentBGColor: '1D6C89',
				a_color: 		'1D6C89',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4513',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5599',
internalId:  '',
customField: '20111122-095059'
};
webappMappings['1002']=webappMappings['1002-6002ABW0X0INXEGY']={
webappId:    '1002',
documentId:  '6002',
internalId:  '6002ABW0X0INXEGY',
customField: 'icq=false'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '18193',
internalId:  'location',
customField: 'location'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '182301',
internalId:  '',
customField: '20101025-075107'
};
webappMappings['1501']=webappMappings['1501-1622982']={
webappId:    '1501',
documentId:  '4513',
internalId:  '1622982',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4513',
internalId:  '',
customField: '20110729-101830'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '201701',
internalId:  '',
customField: '20110404-074243'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '96091',
internalId:  'routing',
customField: 'de_CH'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7719',
internalId:  '',
customField: '20111122-101255'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5545',
internalId:  '',
customField: '20120130-082103'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7665',
internalId:  '',
customField: '20120130-082228'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5302',
internalId:  '',
customField: '20111116-120738'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5329',
internalId:  '',
customField: '20120118-123728'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14819',
internalId:  '',
customField: '20080609-080344'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5356',
internalId:  '',
customField: '20120118-124147'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20064',
internalId:  '',
customField: '20030908-123133'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5383',
internalId:  '',
customField: '20100611-102128'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11329',
internalId:  '',
customField: '20080731-074129'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18193',
internalId:  '',
customField: '20111208-073045'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96091',
internalId:  '',
customField: '20100430-104030'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5437',
internalId:  '',
customField: '20110114-075215'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8405',
internalId:  '',
customField: '20080616-082211'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8432',
internalId:  '',
customField: '20080609-072313'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8459',
internalId:  '',
customField: '20080609-073059'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8486',
internalId:  '',
customField: '20080609-073713'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8513',
internalId:  '',
customField: '20080609-073849'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8540',
internalId:  '',
customField: '20080609-074859'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8567',
internalId:  '',
customField: '20080609-074736'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5491',
internalId:  '',
customField: '20111122-101433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5518',
internalId:  '',
customField: '20110525-124636'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8156',
internalId:  '',
customField: '20120130-082852'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12329',
internalId:  '',
customField: '20110622-135231'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5572',
internalId:  '',
customField: '20110407-125114'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8594',
internalId:  '',
customField: '20081217-072645'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13229',
internalId:  '',
customField: '20090507-075658'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7692',
internalId:  '',
customField: '20110622-135142'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7746',
internalId:  '',
customField: '20111219-170626'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7773',
internalId:  '',
customField: '20110510-074512'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10104',
internalId:  '',
customField: '20091021-065725'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5626',
internalId:  '',
customField: '20111122-094633'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6002',
internalId:  '',
customField: '20031007-154045'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6003',
internalId:  '',
customField: '20031007-154139'
};
webappMappings['7008']=webappMappings['7008-2725']={
webappId:    '7008',
documentId:  '5356',
internalId:  '2725',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '227701',
internalId:  '-',
customField: '20120106-081137'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '227722',
internalId:  '-',
customField: '20120106-082922'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '227743',
internalId:  '-',
customField: '20111122-093558'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0INXEGY';
var companyName   = 'Z%C3%BCrcher+Freizeit-B%C3%BChne';
var htmlTitle	  = 'Z%C3%BCrcher+Freizeit-B%C3%BChne';
var metaKeywords  = 'Zuercher+Freizeit-BuehneVolkstheaterZFBAmateurtheaterTheaterverein1-Akter3-AkterTheater+mietenAuffuehrungInselfaeschtTheaterspielenKasperlitheaterz%C3%BCrcher+freizeit-b%C3%BChne';
var metaContents  = 'Zuercher+Freizeit-BuehneVolkstheaterZFBAmateurtheaterTheatervereinAuftritteTheaterspielenz%C3%BCrcher+freizeit-b%C3%BChneFreizeitZ%C3%BCrichTheaterZ%C3%BCrichMundarttheaterDialekttheaterWerdinsel';
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();
};

