/* [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(''),'/501/index.html','true',[ 
		['PAGE','15501',jdecode('Home+%28Folgeseite%29'),jdecode(''),'/501/15501.html','false',[],'','']
	],'',''],
	['PAGE','552',jdecode('About+Me'),jdecode(''),'/552.html','true',[],'',''],
	['PAGE','573',jdecode('News'),jdecode(''),'/573.html','true',[],'',''],
	['PAGE','106101',jdecode('Hansi-Fete+2010+Hamburg'),jdecode(''),'/106101.html','true',[],'',''],
	['PAGE','104401',jdecode('Tour+2011'),jdecode(''),'/104401.html','true',[],'',''],
	['PAGE','594',jdecode('Radio+BeO'),jdecode(''),'/594.html','true',[],'',''],
	['PAGE','77101',jdecode('Radiotipps'),jdecode(''),'/77101.html','true',[],'',''],
	['PAGE','30401',jdecode('Hansi+im+TV'),jdecode(''),'/30401.html','true',[],'',''],
	['PAGE','78201',jdecode('Ehrung+in+Bremen'),jdecode(''),'/78201.html','true',[],'',''],
	['PAGE','79601',jdecode('Tour+2009'),jdecode(''),'/79601.html','true',[],'',''],
	['PAGE','86001',jdecode('Tour+2009+-+mit+Freunden'),jdecode(''),'/86001.html','true',[],'',''],
	['PAGE','88601',jdecode('Till+Br%C3%B6nner+und+Hansi'),jdecode(''),'/88601.html','true',[],'',''],
	['PAGE','91901',jdecode('James+Last+in+Moskau+2009'),jdecode(''),'/91901.html','true',[],'',''],
	['PAGE','100601',jdecode('Erlend+Krauser+spielt+Hurt'),jdecode(''),'/100601.html','true',[],'',''],
	['PAGE','636',jdecode('Tour+2007'),jdecode(''),'/636.html','true',[],'',''],
	['PAGE','657',jdecode('London+2007-Galerie'),jdecode(''),'/657.html','true',[],'',''],
	['PAGE','19001',jdecode('Zwischen+den+Konzerten'),jdecode(''),'/19001.html','true',[],'',''],
	['PAGE','615',jdecode('Duderstadt+2006'),jdecode(''),'/615.html','true',[],'',''],
	['PAGE','678',jdecode('Tour+2004'),jdecode(''),'/678.html','true',[],'',''],
	['PAGE','699',jdecode('Freunde%2FFriends'),jdecode(''),'/699.html','true',[],'',''],
	['PAGE','48301',jdecode('Im+Wandel+der+Zeit'),jdecode(''),'/48301.html','true',[],'',''],
	['PAGE','24701',jdecode('FILM%3A+M%C3%A4nner%2FFrauen'),jdecode(''),'/24701.html','true',[],'',''],
	['PAGE','64801',jdecode('Karikaturen'),jdecode(''),'/64801.html','true',[],'',''],
	['PAGE','741',jdecode('Julia+Hagne'),jdecode(''),'/741.html','true',[],'',''],
	['PAGE','783',jdecode('Links'),jdecode(''),'/783.html','true',[],'',''],
	['PAGE','720',jdecode('Switzerland'),jdecode(''),'/720.html','true',[],'',''],
	['PAGE','101801',jdecode('Berner+Oberland'),jdecode(''),'/101801.html','true',[],'',''],
	['PAGE','762',jdecode('Ausflug+nach+York'),jdecode(''),'/762.html','true',[],'',''],
	['PAGE','68001',jdecode('CHINA+2008+-+2010'),jdecode(''),'/68001.html','true',[],'',''],
	['PAGE','56301',jdecode('Colour+and+Needles'),jdecode(''),'/56301.html','true',[],'',''],
	['PAGE','103501',jdecode('Kurioses+aus+dem+Alltag'),jdecode(''),'/103501.html','true',[],'',''],
	['PAGE','5506',jdecode('G%C3%A4stebuch'),jdecode(''),'/5506/index.html','true',[ 
		['PAGE','5501',jdecode('Eintr%C3%A4ge'),jdecode(''),'/5506/5501.html','false',[],'','']
	],'','']];
var siteelementCount=34;
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 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: '20100816-011435'
};
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: '20100506-114402'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24701',
internalId:  '',
customField: '20100430-091605'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '594',
internalId:  '',
customField: '20100816-011321'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30401',
internalId:  '',
customField: '20090308-023743'
};
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: '20100725-122911'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '783',
internalId:  '',
customField: '20100606-204932'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '103501',
internalId:  '',
customField: '20100301-123745'
};
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: '20100504-091219'
};
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: '20100114-104451'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '101801',
internalId:  '',
customField: '20100620-212446'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '104401',
internalId:  '',
customField: '20100506-114012'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '106101',
internalId:  '',
customField: '20100508-220413'
};
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();
};
