/* [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','2801',jdecode('Buchverlag'),jdecode(''),'/2801.html','true',[],'',''],
	['PAGE','3001',jdecode('Lehrbuch+f%C3%BCr+NFS'),jdecode(''),'/3001/index.html','true',[ 
		['PAGE','9001',jdecode('LNS+-+Die+Autoren'),jdecode(''),'/3001/9001.html','true',[],'',''],
		['PAGE','9201',jdecode('LNS+-+Inhaltsverzeichnis'),jdecode(''),'/3001/9201.html','true',[],'',''],
		['PAGE','9222',jdecode('LNS+-+Beispielseiten'),jdecode(''),'/3001/9222.html','true',[],'','']
	],'',''],
	['PAGE','3022',jdecode('Schnell%C3%BCbersicht'),jdecode(''),'/3022/index.html','true',[ 
		['PAGE','10901',jdecode('S%C3%9C+-+Beispielseiten'),jdecode(''),'/3022/10901.html','true',[],'','']
	],'',''],
	['PAGE','3043',jdecode('Med-+u.+Menschliches'),jdecode(''),'/3043/index.html','true',[ 
		['PAGE','10922',jdecode('Med.%2C+Mensch.%2C+Musikal.'),jdecode(''),'/3043/10922.html','true',[],'',''],
		['PAGE','12722',jdecode('MMM+-+Gedichtbeispiele'),jdecode(''),'/3043/12722.html','true',[],'',''],
		['PAGE','10943',jdecode('Med.%2C+Mensch%2C+kunterbunt'),jdecode(''),'/3043/10943.html','true',[],'',''],
		['PAGE','13201',jdecode('MMKK+-+Inhalt'),jdecode(''),'/3043/13201.html','true',[],'',''],
		['PAGE','12743',jdecode('MMKK+-+Gedichtbeispiele'),jdecode(''),'/3043/12743.html','true',[],'','']
	],'',''],
	['PAGE','3064',jdecode('Buch-Shop'),jdecode(''),'/3064.html','true',[],'',''],
	['PAGE','13901',jdecode('Fachbuch+-+Album'),jdecode(''),'/13901.html','true',[],'',''],
	['PAGE','3106',jdecode('G%C3%A4stebuch'),jdecode(''),'/3106.html','true',[],'',''],
	['PAGE','3127',jdecode('Kontakt'),jdecode(''),'/3127.html','true',[],'','']];
var siteelementCount=17;
theSitetree.topTemplateName='Celebration2';
theSitetree.paletteFamily='8F00C4';
theSitetree.keyvisualId='10014';
theSitetree.keyvisualName='kv_10014.jpg';
theSitetree.fontsetId='17745';
theSitetree.graphicsetId='13113';
theSitetree.contentColor='1052A6';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'DE'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Celebration2',
				paletteFamily: 	'8F00C4',
				keyvisualId: 	'10014',
				keyvisualName: 	'kv_10014.jpg',
				fontsetId: 		'17745',
				graphicsetId: 	'13113',
				contentColor: 	'1052A6',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2801',
internalId:  '',
customField: '20100418-064247'
};
webappMappings['7002']=webappMappings['7002-1217']={
webappId:    '7002',
documentId:  '3106',
internalId:  '1217',
customField: 'language:de;country:DE;'
};
webappMappings['7008']=webappMappings['7008-1442']={
webappId:    '7008',
documentId:  '3127',
internalId:  '1442',
customField: 'language:de;country:DE;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2801',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3001',
internalId:  '',
customField: '20090530-121102'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3022',
internalId:  '',
customField: '20090601-134114'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3043',
internalId:  '',
customField: '20090530-121413'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3064',
internalId:  '',
customField: '20090710-124331'
};
webappMappings['1501']=webappMappings['1501-2841210']={
webappId:    '1501',
documentId:  '2801',
internalId:  '2841210',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3106',
internalId:  '',
customField: '20090530-051951'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3127',
internalId:  '',
customField: '20090530-075438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9001',
internalId:  '',
customField: '20090530-082111'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9201',
internalId:  '',
customField: '20090530-074423'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9222',
internalId:  '',
customField: '20090530-080159'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10922',
internalId:  '',
customField: '20090530-121451'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10901',
internalId:  '',
customField: '20090530-094205'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10943',
internalId:  '',
customField: '20090530-121535'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12722',
internalId:  '',
customField: '20090530-100055'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12743',
internalId:  '',
customField: '20090530-100246'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13901',
internalId:  '',
customField: '20090530-131350'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13201',
internalId:  '',
customField: '20090530-100728'
};
var canonHostname = 'wsc.alfahosting.de';
var accountId     = 'AAHS10INXZ8J';
var companyName   = 'Verlag+Pachernegg+%26+Fachbuch-Shop';
var htmlTitle	  = 'Verlag+Pachernegg+und+Fachbuch-Shop';
var metaKeywords  = 'Buchverlag+Pachernegg+Fachb%C3%BCcher+aus+Medizin%2C+Notfallmedizin%2C+Sanit%C3%A4ts-+und+Rettungswesen%2C+Medizinrecht%2C+medizinische+Fortbildung.Buchhandel+von+Fachb%C3%BCchern%2C+medizinischen+Fachb%C3%BCchern%2C+Lehrb%C3%BCcher';
var metaContents  = 'Buchverlag+Pachernegg+Fachb%C3%BCcher+aus+Medizin%2C+Notfallmedizin%2C+Sanit%C3%A4ts-+und+Rettungswesen%2C+Medizinrecht%2C+medizinische+Fortbildung.Buchhandel+von+Fachb%C3%BCchern%2C+medizinischen+Fachb%C3%BCchern%2C+Lehrb%C3%BCcher';
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();
};

