/* [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','501',jdecode('Home+%2B+Feedback'),jdecode(''), jdecode('%2F501%2Findex.html'), 'true',[ 
		['PAGE','15501',jdecode('Home+%28Folgeseite%29'),jdecode(''), jdecode('%2F501%2F15501.html'), 'false',[],'','']
	],'',''],
	['PAGE','121201',jdecode('18.+Trucker+Festival'),jdecode(''), jdecode('%2F121201.html'), 'true',[],'',''],
	['PAGE','552',jdecode('About+Me'),jdecode(''), jdecode('%2F552.html'), 'true',[],'',''],
	['PAGE','573',jdecode('News'),jdecode(''), jdecode('%2F573.html'), 'true',[],'',''],
	['PAGE','106101',jdecode('Hansi-Fete+2010+Hamburg'),jdecode(''), jdecode('%2F106101.html'), 'true',[],'',''],
	['PAGE','104401',jdecode('Tour+2011'),jdecode(''), jdecode('%2F104401.html'), 'true',[],'',''],
	['PAGE','594',jdecode('Radio+BeO'),jdecode(''), jdecode('%2F594.html'), 'true',[],'',''],
	['PAGE','77101',jdecode('Radiotipps'),jdecode(''), jdecode('%2F77101.html'), 'true',[],'',''],
	['PAGE','30401',jdecode('Hansi+im+TV'),jdecode(''), jdecode('%2F30401.html'), 'true',[],'',''],
	['PAGE','78201',jdecode('Ehrung+in+Bremen'),jdecode(''), jdecode('%2F78201.html'), 'true',[],'',''],
	['PAGE','79601',jdecode('Tour+2009'),jdecode(''), jdecode('%2F79601.html'), 'true',[],'',''],
	['PAGE','86001',jdecode('Tour+2009+-+mit+Freunden'),jdecode(''), jdecode('%2F86001.html'), 'true',[],'',''],
	['PAGE','88601',jdecode('Till+Br%C3%B6nner+und+Hansi'),jdecode(''), jdecode('%2F88601.html'), 'true',[],'',''],
	['PAGE','91901',jdecode('James+Last+in+Moskau+2009'),jdecode(''), jdecode('%2F91901.html'), 'true',[],'',''],
	['PAGE','100601',jdecode('Erlend+Krauser+spielt+Hurt'),jdecode(''), jdecode('%2F100601.html'), 'true',[],'',''],
	['PAGE','636',jdecode('Tour+2007'),jdecode(''), jdecode('%2F636.html'), 'true',[],'',''],
	['PAGE','657',jdecode('London+2007-Galerie'),jdecode(''), jdecode('%2F657.html'), 'true',[],'',''],
	['PAGE','19001',jdecode('Zwischen+den+Konzerten'),jdecode(''), jdecode('%2F19001.html'), 'true',[],'',''],
	['PAGE','615',jdecode('Duderstadt+2006'),jdecode(''), jdecode('%2F615.html'), 'true',[],'',''],
	['PAGE','678',jdecode('Tour+2004'),jdecode(''), jdecode('%2F678.html'), 'true',[],'',''],
	['PAGE','699',jdecode('Freunde%2FFriends'),jdecode(''), jdecode('%2F699.html'), 'true',[],'',''],
	['PAGE','48301',jdecode('Im+Wandel+der+Zeit'),jdecode(''), jdecode('%2F48301.html'), 'true',[],'',''],
	['PAGE','24701',jdecode('FILM%3A+M%C3%A4nner%2FFrauen'),jdecode(''), jdecode('%2F24701.html'), 'true',[],'',''],
	['PAGE','64801',jdecode('Karikaturen'),jdecode(''), jdecode('%2F64801.html'), 'true',[],'',''],
	['PAGE','741',jdecode('Julia+Hagne'),jdecode(''), jdecode('%2F741.html'), 'true',[],'',''],
	['PAGE','783',jdecode('Links'),jdecode(''), jdecode('%2F783.html'), 'true',[],'',''],
	['PAGE','720',jdecode('Switzerland'),jdecode(''), jdecode('%2F720.html'), 'true',[],'',''],
	['PAGE','101801',jdecode('Berner+Oberland'),jdecode(''), jdecode('%2F101801.html'), 'true',[],'',''],
	['PAGE','762',jdecode('Ausflug+nach+York'),jdecode(''), jdecode('%2F762.html'), 'true',[],'',''],
	['PAGE','68001',jdecode('CHINA+2008+-+2010'),jdecode(''), jdecode('%2F68001.html'), 'true',[],'',''],
	['PAGE','56301',jdecode('Colour+and+Needles'),jdecode(''), jdecode('%2F56301.html'), 'true',[],'',''],
	['PAGE','103501',jdecode('Kurioses+aus+dem+Alltag'),jdecode(''), jdecode('%2F103501.html'), 'true',[],'',''],
	['PAGE','5506',jdecode('G%C3%A4stebuch'),jdecode(''), jdecode('%2F5506%2Findex.html'), 'true',[ 
		['PAGE','5501',jdecode('Eintr%C3%A4ge'),jdecode(''), jdecode('%2F5506%2F5501.html'), 'false',[],'','']
	],'','']];
var siteelementCount=35;
theSitetree.topTemplateName='Displace';
theSitetree.paletteFamily='CFCFCF';
theSitetree.keyvisualId='11075';
theSitetree.keyvisualName='kv_11075.jpg';
theSitetree.fontsetId='31958';
theSitetree.graphicsetId='13799';
theSitetree.contentColor='342500';
theSitetree.contentBGColor='CFCFCF';
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: 	'CFCFCF',
				keyvisualId: 	'11075',
				keyvisualName: 	'kv_11075.jpg',
				fontsetId: 		'31958',
				graphicsetId: 	'13799',
				contentColor: 	'342500',
				contentBGColor: 'CFCFCF',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['1002']=webappMappings['1002-5506abw0x0in2f04']={
webappId:    '1002',
documentId:  '5506',
internalId:  '5506abw0x0in2f04',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20120115-002103'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '77101',
internalId:  '',
customField: '20090317-151811'
};
webappMappings['7008']=webappMappings['7008-3115']={
webappId:    '7008',
documentId:  '501',
internalId:  '3115',
customField: 'language:de;country:CH;'
};
webappMappings['1501']=webappMappings['1501-18030140']={
webappId:    '1501',
documentId:  '501',
internalId:  '18030140',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15501',
internalId:  '',
customField: '20071014-225528'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '552',
internalId:  '',
customField: '20090317-153620'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '573',
internalId:  '',
customField: '20111229-082741'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24701',
internalId:  '',
customField: '20100430-091605'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '594',
internalId:  '',
customField: '20120115-002611'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30401',
internalId:  '',
customField: '20110628-092339'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '678',
internalId:  '',
customField: '20071014-220630'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '615',
internalId:  '',
customField: '20080305-003920'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '636',
internalId:  '',
customField: '20070928-211250'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '657',
internalId:  '',
customField: '20080305-003638'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19001',
internalId:  '',
customField: '20080511-004250'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '699',
internalId:  '',
customField: '20080502-013459'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48301',
internalId:  '',
customField: '20080304-104921'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64801',
internalId:  '',
customField: '20080814-030227'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '720',
internalId:  '',
customField: '20091213-224858'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78201',
internalId:  '',
customField: '20090417-002000'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '741',
internalId:  '',
customField: '20100113-173638'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '762',
internalId:  '',
customField: '20071007-220309'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '68001',
internalId:  '',
customField: '20100906-171952'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '783',
internalId:  '',
customField: '20110628-085019'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '103501',
internalId:  '',
customField: '20110818-120311'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56301',
internalId:  '',
customField: '20090816-235918'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5506',
internalId:  '',
customField: '20071103-213803'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5501',
internalId:  '',
customField: '20070829-212535'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '86001',
internalId:  '',
customField: '20100103-013318'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79601',
internalId:  '',
customField: '20110628-085707'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88601',
internalId:  '',
customField: '20090706-015015'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91901',
internalId:  '',
customField: '20100508-221058'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '100601',
internalId:  '',
customField: '20111114-233605'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '101801',
internalId:  '',
customField: '20100620-212446'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '104401',
internalId:  '',
customField: '20110430-032104'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '106101',
internalId:  '',
customField: '20100508-220413'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '121201',
internalId:  '',
customField: '20110727-115449'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0IN2F04';
var companyName   = 'Peter+Gertsch';
var htmlTitle	  = 'James+Last+-+Fan+No+1+of+Switzerland+-+Peter+Gertsch+-+Wengen';
var metaKeywords  = 'James+Last+Peter+Gertsch+Wengen+Radio+Berner+Oberland';
var metaContents  = 'James+Last';
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();
};

