/* [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','2612',jdecode('Home'),jdecode(''),'/2612.html','true',[],'',''],
	['PAGE','7412',jdecode('News'),jdecode(''),'/7412.html','true',[],'',''],
	['PAGE','7112',jdecode('Band'),jdecode(''),'/7112/index.html','true',[ 
		['PAGE','6633',jdecode('Bandinterview+Mai+2009'),jdecode(''),'/7112/6633.html','true',[],'',''],
		['PAGE','8112',jdecode('Marcellus+Wallace'),jdecode(''),'/7112/8112.html','true',[],'',''],
		['PAGE','8133',jdecode('Chris+Jakix'),jdecode(''),'/7112/8133.html','true',[],'',''],
		['PAGE','8154',jdecode('Mitch+Mackes'),jdecode(''),'/7112/8154.html','true',[],'',''],
		['PAGE','8175',jdecode('Mister+Wotz'),jdecode(''),'/7112/8175.html','true',[],'','']
	],'',''],
	['PAGE','7312',jdecode('Konzertberichte'),jdecode(''),'/7312/index.html','true',[ 
		['PAGE','9612',jdecode('Konzert+19.09.09'),jdecode(''),'/7312/9612.html','true',[],'',''],
		['PAGE','25012',jdecode('Konzert+23.10.09'),jdecode(''),'/7312/25012.html','true',[],'','']
	],'',''],
	['PAGE','12712',jdecode('Bilder'),jdecode(''),'/12712/index.html','true',[ 
		['PAGE','6612',jdecode('Pressebilder+und+mehr'),jdecode(''),'/12712/6612.html','true',[],'',''],
		['PAGE','13112',jdecode('Fotos+vom+Interview'),jdecode(''),'/12712/13112.html','true',[],'','']
	],'',''],
	['PAGE','7433',jdecode('Termine'),jdecode(''),'/7433.html','true',[],'',''],
	['PAGE','7454',jdecode('Gewinnspiele+und+mehr'),jdecode(''),'/7454.html','true',[],'',''],
	['PAGE','16412',jdecode('Songtexte'),jdecode(''),'/16412.html','true',[],'',''],
	['PAGE','16212',jdecode('R%C3%A4tsel'),jdecode(''),'/16212.html','true',[],'',''],
	['PAGE','7612',jdecode('G%C3%A4stebuch'),jdecode(''),'/7612.html','true',[],'',''],
	['PAGE','7475',jdecode('Impressum'),jdecode(''),'/7475.html','true',[],'','']];
var siteelementCount=20;
theSitetree.topTemplateName='Highway';
theSitetree.paletteFamily='168543';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='16855';
theSitetree.graphicsetId='12298';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='168543';
var localeDef={
  language: 'de',
  country: 'DE'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Highway',
				paletteFamily: 	'168543',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'16855',
				graphicsetId: 	'12298',
				contentColor: 	'FFFFFF',
				contentBGColor: '168543',
				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['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2612',
internalId:  '',
customField: '20091112-155129'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2612',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-3940385']={
webappId:    '1501',
documentId:  '2612',
internalId:  '3940385',
customField: '1501'
};
webappMappings['7060']=webappMappings['7060-8043fefd57fabe204d196cdd1ebc19e1']={
webappId:    '7060',
documentId:  '6612',
internalId:  '8043fefd57fabe204d196cdd1ebc19e1',
customField: 'language:de;country:DE;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6612',
internalId:  '',
customField: '20090922-094232'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6633',
internalId:  '',
customField: '20090922-013116'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7112',
internalId:  '',
customField: '20090924-174658'
};
webappMappings['7002']=webappMappings['7002-2372']={
webappId:    '7002',
documentId:  '7612',
internalId:  '2372',
customField: 'language:de;country:DE;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7412',
internalId:  '',
customField: '20091222-122606'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7312',
internalId:  '',
customField: '20090924-175223'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7433',
internalId:  '',
customField: '20091222-122718'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7454',
internalId:  '',
customField: '20091024-142350'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7612',
internalId:  '',
customField: '20090921-193320'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7475',
internalId:  '',
customField: '20090925-050338'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8112',
internalId:  '',
customField: '20090921-183321'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8133',
internalId:  '',
customField: '20090922-013207'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8154',
internalId:  '',
customField: '20090922-013228'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8175',
internalId:  '',
customField: '20090924-175741'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9612',
internalId:  '',
customField: '20090922-130915'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12712',
internalId:  '',
customField: '20090924-174859'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13112',
internalId:  '',
customField: '20090927-150756'
};
webappMappings['7060']=webappMappings['7060-259bdd5a7c3d77ddabbbcd55b0c6ba61']={
webappId:    '7060',
documentId:  '13112',
internalId:  '259bdd5a7c3d77ddabbbcd55b0c6ba61',
customField: 'language:de;country:DE;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16212',
internalId:  '',
customField: '20091007-081051'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16412',
internalId:  '',
customField: '20091102-204746'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25012',
internalId:  '',
customField: '20091024-141405'
};
var canonHostname = 'wsc.alfahosting.de';
var accountId     = 'AAHS10IN21U3';
var companyName   = 'MULTISTORY+PARKHAUS';
var htmlTitle	  = 'Die+Parkhaus+Fanpage';
var metaKeywords  = 'Parkhaus%2C+Band%2C+Stuttgart%2C+Fans%2C+Interviews%2C+Berichte%2C+Fotos%2C+Musik';
var metaContents  = 'Hier+gibt+es+alles+zur+Stuttgarter+Band+Parkhaus+-+von+Fans+f%C3%BCr+Fans.';
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();
};
