/* [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','4556',jdecode('HOME'),jdecode(''), jdecode('%2F4556.html'), 'true',[],'',''],
	['PAGE','4613',jdecode('%C3%9CBER+UNS'),jdecode(''), jdecode('%2F4613.html'), 'true',[],'',''],
	['PAGE','26046',jdecode('PROGRAMM'),jdecode(''), jdecode('%2F26046%2Findex.html'), 'false',[ 
		['PAGE','156821',jdecode('GEORGE'),jdecode(''), jdecode('%2F26046%2F156821.html'), 'true',[],'',''],
		['PAGE','156858',jdecode('SALA'),jdecode(''), jdecode('%2F26046%2F156858.html'), 'true',[],'',''],
		['PAGE','156867',jdecode('HORIZON'),jdecode(''), jdecode('%2F26046%2F156867.html'), 'true',[],'',''],
		['PAGE','156876',jdecode('FIRE+BIRDS'),jdecode(''), jdecode('%2F26046%2F156876.html'), 'true',[],'',''],
		['PAGE','156885',jdecode('ERICA+ARNOLD'),jdecode(''), jdecode('%2F26046%2F156885.html'), 'true',[],'',''],
		['PAGE','156894',jdecode('DJ+BENZ'),jdecode(''), jdecode('%2F26046%2F156894.html'), 'true',[],'',''],
		['PAGE','156903',jdecode('DJ+DUBI'),jdecode(''), jdecode('%2F26046%2F156903.html'), 'true',[],'',''],
		['PAGE','156972',jdecode('RAST-WISS'),jdecode(''), jdecode('%2F26046%2F156972.html'), 'true',[],'','']
	],'',''],
	['PAGE','55516',jdecode('INFORMATIONEN'),jdecode(''), jdecode('%2F55516.html'), 'true',[],'',''],
	['PAGE','151496',jdecode('ANFAHRT'),jdecode(''), jdecode('%2F151496.html'), 'true',[],'',''],
	['PAGE','140628',jdecode('SPONSOREN'),jdecode(''), jdecode('%2F140628.html'), 'true',[],'',''],
	['PAGE','4721',jdecode('KONTAKTE'),jdecode(''), jdecode('%2F4721.html'), 'true',[],'',''],
	['PAGE','156523',jdecode('VERMIETUNG'),jdecode(''), jdecode('%2F156523.html'), 'true',[],'',''],
	['PAGE','44487',jdecode('FRAGEN'),jdecode(''), jdecode('%2F44487%2Findex.html'), 'true',[ 
		['PAGE','44531',jdecode('QUESTIONS+%28Folgeseite%29'),jdecode(''), jdecode('%2F44487%2F44531.html'), 'false',[],'','']
	],'',''],
	['PAGE','147789',jdecode('FOTOS'),jdecode(''), jdecode('%2F147789%2Findex.html'), 'true',[ 
		['PAGE','153937',jdecode('AREAL+aufstellen'),jdecode(''), jdecode('%2F147789%2F153937.html'), 'true',[],'',''],
		['PAGE','157469',jdecode('Freitag+2010'),jdecode(''), jdecode('%2F147789%2F157469.html'), 'true',[],'','']
	],'',''],
	['PAGE','7489',jdecode('G%C3%84STEBUCH'),jdecode(''), jdecode('%2F7489%2Findex.html'), 'true',[ 
		['PAGE','7490',jdecode('LESEN'),jdecode(''), jdecode('%2F7489%2F7490.html'), 'true',[],'','']
	],'',''],
	['PAGE','8334',jdecode('LINKS'),jdecode(''), jdecode('%2F8334.html'), 'true',[],'','']];
var siteelementCount=24;
theSitetree.topTemplateName='Orbit';
theSitetree.paletteFamily='000000';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='174';
theSitetree.graphicsetId='206';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='000000';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'hostpoint',
  product: 'WSCSYSSSSLYTC21F'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Orbit',
				paletteFamily: 	'000000',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'174',
				graphicsetId: 	'206',
				contentColor: 	'FFFFFF',
				contentBGColor: '000000',
				a_color: 		'000000',
				b_color: 		'666666',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7008']=webappMappings['7008-840']={
webappId:    '7008',
documentId:  '44487',
internalId:  '840',
customField: 'language:de;country:CH;'
};
webappMappings['1002']=webappMappings['1002-7489AHOPT0IN3RSI']={
webappId:    '1002',
documentId:  '7489',
internalId:  '7489AHOPT0IN3RSI',
customField: 'icq=false'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4556',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '147789',
internalId:  '',
customField: '20100810-100107'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4556',
internalId:  '',
customField: '20111023-141531'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '151496',
internalId:  'location',
customField: 'language:de;country:CH;isIncluded:false;'
};
webappMappings['1501']=webappMappings['1501-12629163']={
webappId:    '1501',
documentId:  '4556',
internalId:  '12629163',
customField: '1501'
};
webappMappings['7060']=webappMappings['7060-506af0318fdb28874df9a9ed1e1b14e5']={
webappId:    '7060',
documentId:  '153937',
internalId:  '506af0318fdb28874df9a9ed1e1b14e5',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4613',
internalId:  '',
customField: '20111023-142029'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26046',
internalId:  '',
customField: '20110804-074409'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '156867',
internalId:  '',
customField: '20110524-212521'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '156876',
internalId:  '',
customField: '20110705-222606'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '156885',
internalId:  '',
customField: '20110524-212417'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '156821',
internalId:  '',
customField: '20110524-215700'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '156858',
internalId:  '',
customField: '20110524-215726'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55516',
internalId:  '',
customField: '20111023-142238'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '151496',
internalId:  '',
customField: '20080408-202451'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '140628',
internalId:  '',
customField: '20110804-074609'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4721',
internalId:  '',
customField: '20111005-093443'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44487',
internalId:  '',
customField: '20090413-155541'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44531',
internalId:  '',
customField: '20050226-164110'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '153937',
internalId:  '',
customField: '20110804-075351'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7489',
internalId:  '',
customField: '20070322-202924'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7490',
internalId:  '',
customField: '20050502-114322'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8334',
internalId:  '',
customField: '20111023-144328'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '156523',
internalId:  '',
customField: '20091006-171612'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '156894',
internalId:  '',
customField: '20110610-195711'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '156903',
internalId:  '',
customField: '20110610-195146'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '156972',
internalId:  '',
customField: '20110610-195801'
};
webappMappings['7060']=webappMappings['7060-adb893fd47a57209368dc4e6c80e0ddc']={
webappId:    '7060',
documentId:  '157469',
internalId:  'adb893fd47a57209368dc4e6c80e0ddc',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '157469',
internalId:  '',
customField: '20100807-121211'
};
var webAppHostname = 'cgi.webomat.ch:80';
var canonHostname = 'webomat01.hostpoint.ch';
var accountId     = 'AHOPT0IN3RSI';
var companyName   = 'SOMMERNACHT-FESTIVAL';
var htmlTitle	  = 'Sommernacht-Festival';
var metaKeywords  = 'SNF%2C+Sommernacht-Festival%2C+Jordan+Guggenmusig%2C+Betty++The+Surf-Maniacs%2C+Jordan%2C';
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();
};

