/* [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','301',jdecode('Home'),jdecode(''), jdecode('%2F301.html'), 'true',[],'',''],
	['PAGE','2048',jdecode('Kontakt'),jdecode(''), jdecode('%2F2048.html'), 'true',[],'',''],
	['PAGE','6501',jdecode('Anfahrt'),jdecode(''), jdecode('%2F6501.html'), 'true',[],'',''],
	['PAGE','1985',jdecode('Location'),jdecode(''), jdecode('%2F1985.html'), 'true',[],'',''],
	['PAGE','2111',jdecode('%C3%96ffnungszeiten'),jdecode(''), jdecode('%2F2111.html'), 'true',[],'',''],
	['PAGE','2006',jdecode('Veranstaltungen'),jdecode(''), jdecode('%2F2006.html'), 'true',[],'',''],
	['PAGE','1943',jdecode('DJ%26%23x27%3Bs'),jdecode(''), jdecode('%2F1943.html'), 'true',[],'',''],
	['PAGE','8901',jdecode('Bildergalerie'),jdecode(''), jdecode('%2F8901%2Findex.html'), 'true',[ 
		['PAGE','309323',jdecode('Seven+After+Party'),jdecode(''), jdecode('%2F8901%2F309323.html'), 'true',[],'',''],
		['PAGE','302523',jdecode('5+Jahre+Zanzibar+with+Resident+DJ%26%23x27%3Bs'),jdecode(''), jdecode('%2F8901%2F302523.html'), 'true',[],'',''],
		['PAGE','302544',jdecode('5+Jahre+Zanzibar+with+Mr.+Mike'),jdecode(''), jdecode('%2F8901%2F302544.html'), 'true',[],'',''],
		['PAGE','300323',jdecode('Mr.+Schweiz+on+Tour'),jdecode(''), jdecode('%2F8901%2F300323.html'), 'true',[],'',''],
		['PAGE','294712',jdecode('Apr%C3%A8s-Ski+Party'),jdecode(''), jdecode('%2F8901%2F294712.html'), 'true',[],'',''],
		['PAGE','291512',jdecode('Silvesterparty+10%2F11'),jdecode(''), jdecode('%2F8901%2F291512.html'), 'true',[],'',''],
		['PAGE','289112',jdecode('G%C3%B6tti+Zauber'),jdecode(''), jdecode('%2F8901%2F289112.html'), 'true',[],'',''],
		['PAGE','288812',jdecode('Music+Factory'),jdecode(''), jdecode('%2F8901%2F288812.html'), 'true',[],'',''],
		['PAGE','276712',jdecode('Saturday+Rotation'),jdecode(''), jdecode('%2F8901%2F276712.html'), 'true',[],'',''],
		['PAGE','276912',jdecode('Saisonpatronat+FC+Wohlen'),jdecode(''), jdecode('%2F8901%2F276912.html'), 'true',[],'',''],
		['PAGE','275312',jdecode('Golden+Night'),jdecode(''), jdecode('%2F8901%2F275312.html'), 'true',[],'',''],
		['PAGE','274512',jdecode('Kammer+Night'),jdecode(''), jdecode('%2F8901%2F274512.html'), 'true',[],'',''],
		['PAGE','271812',jdecode('Halloween+Party'),jdecode(''), jdecode('%2F8901%2F271812.html'), 'true',[],'',''],
		['PAGE','271012',jdecode('Halloween+House'),jdecode(''), jdecode('%2F8901%2F271012.html'), 'true',[],'',''],
		['PAGE','268312',jdecode('5.+Zanzi+Oktoberfest'),jdecode(''), jdecode('%2F8901%2F268312.html'), 'true',[],'',''],
		['PAGE','266812',jdecode('Adriano%26%23x27%3Bs+Birthday+Bash'),jdecode(''), jdecode('%2F8901%2F266812.html'), 'true',[],'',''],
		['PAGE','265612',jdecode('Beach+Soccer+Night'),jdecode(''), jdecode('%2F8901%2F265612.html'), 'true',[],'',''],
		['PAGE','257412',jdecode('Wonder+House+part+2'),jdecode(''), jdecode('%2F8901%2F257412.html'), 'true',[],'',''],
		['PAGE','255212',jdecode('Ladiesfirst'),jdecode(''), jdecode('%2F8901%2F255212.html'), 'true',[],'',''],
		['PAGE','254212',jdecode('Viva+la+Revolucion'),jdecode(''), jdecode('%2F8901%2F254212.html'), 'true',[],'',''],
		['PAGE','252912',jdecode('H%C3%A4xetanz'),jdecode(''), jdecode('%2F8901%2F252912.html'), 'true',[],'',''],
		['PAGE','252933',jdecode('Satisfied'),jdecode(''), jdecode('%2F8901%2F252933.html'), 'true',[],'',''],
		['PAGE','251112',jdecode('Rockclub+58+%26+Renelvis'),jdecode(''), jdecode('%2F8901%2F251112.html'), 'true',[],'',''],
		['PAGE','249712',jdecode('Super+Saturday'),jdecode(''), jdecode('%2F8901%2F249712.html'), 'true',[],'',''],
		['PAGE','249733',jdecode('Music+Factory+Clubbing'),jdecode(''), jdecode('%2F8901%2F249733.html'), 'true',[],'',''],
		['PAGE','247012',jdecode('Cosa+Nostra'),jdecode(''), jdecode('%2F8901%2F247012.html'), 'true',[],'',''],
		['PAGE','243912',jdecode('Zanzi+Paradies'),jdecode(''), jdecode('%2F8901%2F243912.html'), 'true',[],'',''],
		['PAGE','243012',jdecode('Stardust'),jdecode(''), jdecode('%2F8901%2F243012.html'), 'true',[],'',''],
		['PAGE','241412',jdecode('Sportlerball'),jdecode(''), jdecode('%2F8901%2F241412.html'), 'true',[],'',''],
		['PAGE','241433',jdecode('2.+Goldenball'),jdecode(''), jdecode('%2F8901%2F241433.html'), 'true',[],'',''],
		['PAGE','241112',jdecode('NUU+TUBE'),jdecode(''), jdecode('%2F8901%2F241112.html'), 'true',[],'',''],
		['PAGE','239212',jdecode('Cosa+Nostra'),jdecode(''), jdecode('%2F8901%2F239212.html'), 'true',[],'',''],
		['PAGE','237912',jdecode('Ladiesfirst'),jdecode(''), jdecode('%2F8901%2F237912.html'), 'true',[],'','']
	],'',''],
	['PAGE','1922',jdecode('Stars+for+free'),jdecode(''), jdecode('%2F1922.html'), 'true',[],'',''],
	['PAGE','63501',jdecode('Jobs'),jdecode(''), jdecode('%2F63501.html'), 'true',[],'','']];
var siteelementCount=43;
theSitetree.topTemplateName='Displace';
theSitetree.paletteFamily='2E2E2E';
theSitetree.keyvisualId='11075';
theSitetree.keyvisualName='kv_11075.jpg';
theSitetree.fontsetId='31958';
theSitetree.graphicsetId='13798';
theSitetree.contentColor='D8D8D5';
theSitetree.contentBGColor='2E2E2E';
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: 			'Displace',
				paletteFamily: 	'2E2E2E',
				keyvisualId: 	'11075',
				keyvisualName: 	'kv_11075.jpg',
				fontsetId: 		'31958',
				graphicsetId: 	'13798',
				contentColor: 	'D8D8D5',
				contentBGColor: '2E2E2E',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '6501',
internalId:  'location',
customField: 'language:de;country:CH;isIncluded:false;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '301',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-18614849']={
webappId:    '1501',
documentId:  '301',
internalId:  '18614849',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '301',
internalId:  '',
customField: '20120201-000810'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2048',
internalId:  '',
customField: '20110428-113841'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '291512',
internalId:  '',
customField: '20110201-105509'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6501',
internalId:  '',
customField: '20071119-184308'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1985',
internalId:  '',
customField: '20101201-165327'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2111',
internalId:  '',
customField: '20120102-145443'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '288812',
internalId:  '',
customField: '20101219-205409'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2006',
internalId:  '',
customField: '20120201-000501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1943',
internalId:  '',
customField: '20110516-174512'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8901',
internalId:  '',
customField: '20111031-230005'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '309323',
internalId:  '',
customField: '20110516-173959'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '237912',
internalId:  '',
customField: '20100201-150051'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '271012',
internalId:  '',
customField: '20101102-095837'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '289112',
internalId:  '',
customField: '20110103-190152'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1922',
internalId:  '',
customField: '20110516-173645'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63501',
internalId:  '',
customField: '20101201-164918'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '239212',
internalId:  '',
customField: '20100217-220254'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '243012',
internalId:  '',
customField: '20100217-231121'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '243912',
internalId:  '',
customField: '20100322-221703'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '257412',
internalId:  '',
customField: '20100901-101348'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '276712',
internalId:  '',
customField: '20101219-205024'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '275312',
internalId:  '',
customField: '20101129-223136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '271812',
internalId:  '',
customField: '20101116-151208'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '274512',
internalId:  '',
customField: '20101123-150319'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '302523',
internalId:  '',
customField: '20110516-173804'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '276912',
internalId:  '',
customField: '20101129-223852'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '294712',
internalId:  '',
customField: '20110321-095230'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '300323',
internalId:  '',
customField: '20110328-160146'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '302544',
internalId:  '',
customField: '20110328-161557'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '241112',
internalId:  '',
customField: '20100217-220324'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '241433',
internalId:  '',
customField: '20100217-220740'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '241412',
internalId:  '',
customField: '20100222-215302'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '247012',
internalId:  '',
customField: '20100405-133412'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '249733',
internalId:  '',
customField: '20100405-133740'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '249712',
internalId:  '',
customField: '20100416-103458'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '251112',
internalId:  '',
customField: '20100504-130407'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '252933',
internalId:  '',
customField: '20100504-130710'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '252912',
internalId:  '',
customField: '20100510-092951'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '254212',
internalId:  '',
customField: '20100513-183222'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '255212',
internalId:  '',
customField: '20100517-144850'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '265612',
internalId:  '',
customField: '20100920-104142'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '266812',
internalId:  '',
customField: '20101005-152649'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '268312',
internalId:  '',
customField: '20101101-174032'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0INE1PB';
var companyName   = 'ZANZIBAR+caf%C3%A9+%26+lounge';
var htmlTitle	  = 'Zanzibar+Wohlen';
var metaKeywords  = 'Zanzibar+Wohlen+DJ+Eric';
var metaContents  = 'Zanzibar+Wohlen+DJ+Eric';
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();
};

