/* [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','4901',jdecode('Home'),jdecode(''), jdecode('%2F4901%2Findex.html'), 'true',[ 
		['PAGE','19201',jdecode('Das+sind+wir'),jdecode(''), jdecode('%2F4901%2F19201.html'), 'true',[],'',''],
		['PAGE','17901',jdecode('Kontakt'),jdecode(''), jdecode('%2F4901%2F17901.html'), 'true',[],'',''],
		['PAGE','67301',jdecode('Hier+finden+Sie+uns+'),jdecode(''), jdecode('%2F4901%2F67301.html'), 'true',[],'','']
	],'',''],
	['PAGE','6101',jdecode('Ausstellungen'),jdecode(''), jdecode('%2F6101%2Findex.html'), 'true',[ 
		['PAGE','6143',jdecode('Aktuell'),jdecode(''), jdecode('%2F6101%2F6143.html'), 'true',[],'','']
	],'',''],
	['PAGE','6501',jdecode('Unsere+R%C3%A4ume'),jdecode(''), jdecode('%2F6501%2Findex.html'), 'true',[ 
		['PAGE','6522',jdecode('Innenraum'),jdecode(''), jdecode('%2F6501%2F6522.html'), 'true',[],'',''],
		['PAGE','6543',jdecode('Aussenraum'),jdecode(''), jdecode('%2F6501%2F6543.html'), 'true',[],'',''],
		['PAGE','45301',jdecode('Impressionen'),jdecode(''), jdecode('%2F6501%2F45301.html'), 'true',[],'','']
	],'',''],
	['PAGE','20401',jdecode('Matin%C3%A9es'),jdecode(''), jdecode('%2F20401.html'), 'true',[],'',''],
	['PAGE','37501',jdecode('Dorffest+2004'),jdecode(''), jdecode('%2F37501.html'), 'true',[],'',''],
	['PAGE','19301',jdecode('Unsere+Umgebung+'),jdecode(''), jdecode('%2F19301%2Findex.html'), 'true',[ 
		['PAGE','76101',jdecode('Unser+Garten+'),jdecode(''), jdecode('%2F19301%2F76101.html'), 'true',[],'',''],
		['PAGE','76122',jdecode('Unsere+H%C3%BChner+'),jdecode(''), jdecode('%2F19301%2F76122.html'), 'true',[],'','']
	],'',''],
	['PAGE','49401',jdecode('Links'),jdecode(''), jdecode('%2F49401.html'), 'true',[],'',''],
	['PAGE','67101',jdecode('G%C3%A4stebuch+'),jdecode(''), jdecode('%2F67101.html'), 'true',[],'',''],
	['PAGE','8301',jdecode('K%C3%BCnstlerInnen'),jdecode(''), jdecode('%2F8301%2Findex.html'), 'true',[ 
		['PAGE','8427',jdecode('Barcelo+Anette+'),jdecode(''), jdecode('%2F8301%2F8427.html'), 'true',[],'',''],
		['PAGE','34501',jdecode('B%C3%BCrgin+Eliana+'),jdecode(''), jdecode('%2F8301%2F34501.html'), 'true',[],'',''],
		['PAGE','41301',jdecode('Buchser+Markus'),jdecode(''), jdecode('%2F8301%2F41301.html'), 'true',[],'',''],
		['PAGE','8448',jdecode('Dettwiler+Thomas'),jdecode(''), jdecode('%2F8301%2F8448.html'), 'true',[],'',''],
		['PAGE','8406',jdecode('Glatt+Brigitta'),jdecode(''), jdecode('%2F8301%2F8406.html'), 'true',[],'',''],
		['PAGE','69401',jdecode('H%C3%A4nni+Irene'),jdecode(''), jdecode('%2F8301%2F69401.html'), 'true',[],'',''],
		['PAGE','8385',jdecode('Hediger+Barbara'),jdecode(''), jdecode('%2F8301%2F8385.html'), 'true',[],'',''],
		['PAGE','8364',jdecode('Hegi+Lilot'),jdecode(''), jdecode('%2F8301%2F8364.html'), 'true',[],'',''],
		['PAGE','40701',jdecode('Helfenstein+Therese'),jdecode(''), jdecode('%2F8301%2F40701.html'), 'true',[],'',''],
		['PAGE','48001',jdecode('Hofer+Bruno+'),jdecode(''), jdecode('%2F8301%2F48001.html'), 'true',[],'',''],
		['PAGE','15843',jdecode('Ineichen+Kurt+'),jdecode(''), jdecode('%2F8301%2F15843.html'), 'true',[],'',''],
		['PAGE','34901',jdecode('Ittensohn+Beatrice'),jdecode(''), jdecode('%2F8301%2F34901.html'), 'true',[],'',''],
		['PAGE','47701',jdecode('Kaeser+Sebastian+'),jdecode(''), jdecode('%2F8301%2F47701.html'), 'true',[],'',''],
		['PAGE','53201',jdecode('Maag+Annemarie'),jdecode(''), jdecode('%2F8301%2F53201.html'), 'true',[],'',''],
		['PAGE','8343',jdecode('Raileanu+Dorin+'),jdecode(''), jdecode('%2F8301%2F8343.html'), 'true',[],'',''],
		['PAGE','47301',jdecode('Roccisano+Alfredo'),jdecode(''), jdecode('%2F8301%2F47301.html'), 'true',[],'',''],
		['PAGE','88901',jdecode('Schaertlin+Kitty'),jdecode(''), jdecode('%2F8301%2F88901.html'), 'true',[],'',''],
		['PAGE','74801',jdecode('Schweingruber+Heinz+'),jdecode(''), jdecode('%2F8301%2F74801.html'), 'true',[],'',''],
		['PAGE','53601',jdecode('Shuler+Esther+'),jdecode(''), jdecode('%2F8301%2F53601.html'), 'true',[],'',''],
		['PAGE','15801',jdecode('Thommen+Peter+'),jdecode(''), jdecode('%2F8301%2F15801.html'), 'true',[],'',''],
		['PAGE','13743',jdecode('Urs+G.+Troxler'),jdecode(''), jdecode('%2F8301%2F13743.html'), 'true',[],'',''],
		['PAGE','13722',jdecode('Tschudin+Rudolf+'),jdecode(''), jdecode('%2F8301%2F13722.html'), 'true',[],'',''],
		['PAGE','34101',jdecode('Urban+Kr%C3%A4uchi+Eva'),jdecode(''), jdecode('%2F8301%2F34101.html'), 'true',[],'',''],
		['PAGE','13764',jdecode('Vogler+Marianne+'),jdecode(''), jdecode('%2F8301%2F13764.html'), 'true',[],'',''],
		['PAGE','68001',jdecode('Winkler+Arlette'),jdecode(''), jdecode('%2F8301%2F68001.html'), 'true',[],'',''],
		['PAGE','8322',jdecode('Wirz+Uli+'),jdecode(''), jdecode('%2F8301%2F8322.html'), 'true',[],'','']
	],'','']];
var siteelementCount=44;
theSitetree.topTemplateName='Eatdrink';
theSitetree.paletteFamily='7575CE';
theSitetree.keyvisualId='3358';
theSitetree.keyvisualName='kv_3358.jpg';
theSitetree.fontsetId='10425';
theSitetree.graphicsetId='10738';
theSitetree.contentColor='5757DA';
theSitetree.contentBGColor='FFFFFF';
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: 			'Eatdrink',
				paletteFamily: 	'7575CE',
				keyvisualId: 	'3358',
				keyvisualName: 	'kv_3358.jpg',
				fontsetId: 		'10425',
				graphicsetId: 	'10738',
				contentColor: 	'5757DA',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'1B1B6F',
				e_color: 		'1B1B6F',
				f_color: 		'1B1B6F',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4901',
internalId:  '',
customField: '20110808-203315'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6101',
internalId:  '',
customField: '20100301-093333'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6143',
internalId:  '',
customField: '20110923-165245'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19201',
internalId:  '',
customField: '20100424-210210'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6501',
internalId:  '',
customField: '20100314-155511'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6522',
internalId:  '',
customField: '20100318-093320'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6543',
internalId:  '',
customField: '20100322-083257'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8301',
internalId:  '',
customField: '20100301-165038'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8322',
internalId:  '',
customField: '20100314-164346'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8343',
internalId:  '',
customField: '20100314-165025'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8364',
internalId:  '',
customField: '20100320-191848'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8406',
internalId:  '',
customField: '20100316-164040'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8385',
internalId:  '',
customField: '20100322-082336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8427',
internalId:  '',
customField: '20101008-142415'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8448',
internalId:  '',
customField: '20100424-224413'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15843',
internalId:  '',
customField: '20100318-074630'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13722',
internalId:  '',
customField: '20100318-074523'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13743',
internalId:  '',
customField: '20100307-230420'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15801',
internalId:  '',
customField: '20100316-221512'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13764',
internalId:  '',
customField: '20100326-081606'
};
webappMappings['7008']=webappMappings['7008-9162']={
webappId:    '7008',
documentId:  '17901',
internalId:  '9162',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17901',
internalId:  '',
customField: '20100318-092852'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19301',
internalId:  '',
customField: '20100314-174013'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20401',
internalId:  '',
customField: '20110514-120243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34101',
internalId:  '',
customField: '20100311-232927'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34501',
internalId:  '',
customField: '20100424-231706'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34901',
internalId:  '',
customField: '20100316-223822'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37501',
internalId:  '',
customField: '20100322-092601'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40701',
internalId:  '',
customField: '20100327-173315'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41301',
internalId:  '',
customField: '20100314-164643'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45301',
internalId:  '',
customField: '20110923-172053'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47301',
internalId:  '',
customField: '20100314-165117'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47701',
internalId:  '',
customField: '20100314-164903'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48001',
internalId:  '',
customField: '20100314-164737'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49401',
internalId:  '',
customField: '20100512-170500'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53201',
internalId:  '',
customField: '20100314-220451'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53601',
internalId:  '',
customField: '20110808-204635'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '68001',
internalId:  '',
customField: '20100406-094209'
};
webappMappings['1002']=webappMappings['1002-67101abw330ineuqk']={
webappId:    '1002',
documentId:  '67101',
internalId:  '67101abw330ineuqk',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67101',
internalId:  '',
customField: '20100320-182233'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67301',
internalId:  '',
customField: '20110512-223204'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '67301',
internalId:  'routing',
customField: 'de_CH'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69401',
internalId:  '',
customField: '20100322-093732'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74801',
internalId:  '',
customField: '20100326-160954'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76101',
internalId:  '',
customField: '20100327-185943'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76122',
internalId:  '',
customField: '20100327-183054'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4901',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88901',
internalId:  '',
customField: '20100512-164413'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW330INEUQK';
var companyName   = 'raum22++++++kultur+in+kilchberg';
var htmlTitle	  = '';
var metaKeywords  = '';
var metaContents  = '';
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();
};

