/* [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','26',jdecode('Home'),jdecode(''), jdecode('%2F26.html'), 'true',[],'',''],
	['PAGE','3040',jdecode('Die+Praxis'),jdecode(''), jdecode('%2F3040.html'), 'true',[],'',''],
	['PAGE','1053',jdecode('Das+Team'),jdecode(''), jdecode('%2F1053.html'), 'true',[],'',''],
	['PAGE','2979',jdecode('Praxisphilosophie'),jdecode(''), jdecode('%2F2979.html'), 'true',[],'',''],
	['PAGE','38211',jdecode('Hautkrebs-Check'),jdecode(''), jdecode('%2F38211.html'), 'true',[],'',''],
	['PAGE','36211',jdecode('Grippeimpfung'),jdecode(''), jdecode('%2F36211.html'), 'true',[],'',''],
	['PAGE','1071',jdecode('Praxisurlaub'),jdecode(''), jdecode('%2F1071.html'), 'true',[],'',''],
	['PAGE','37711',jdecode('Reiseimpfungen'),jdecode(''), jdecode('%2F37711.html'), 'true',[],'',''],
	['PAGE','1115',jdecode('Impressum'),jdecode(''), jdecode('%2F1115.html'), 'true',[],'','']];
var siteelementCount=9;
theSitetree.topTemplateName='Seifenblase';
theSitetree.paletteFamily='ADADAD';
theSitetree.keyvisualId='2344';
theSitetree.keyvisualName='aerzte2.jpg';
theSitetree.fontsetId='379';
theSitetree.graphicsetId='429';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'DE'
};
var prodDef={
  wl_name: 'netcologne',
  product: 'WSCSYSSSSLYTCPL1'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Seifenblase',
				paletteFamily: 	'ADADAD',
				keyvisualId: 	'2344',
				keyvisualName: 	'aerzte2.jpg',
				fontsetId: 		'379',
				graphicsetId: 	'429',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'FFFFFF',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'999999',
				e_color: 		'666666',
				f_color: 		'CCCCCC',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '26',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26',
internalId:  '',
customField: '20111214-070709'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37711',
internalId:  '',
customField: '20110401-182834'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1071',
internalId:  '',
customField: '20111214-071442'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38211',
internalId:  '',
customField: '20110401-184935'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1053',
internalId:  '',
customField: '20100214-222735'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3040',
internalId:  '',
customField: '20090930-093537'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2979',
internalId:  '',
customField: '20090629-123134'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1115',
internalId:  '',
customField: '20111214-072352'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36211',
internalId:  '',
customField: '20111030-225057'
};
var webAppHostname = 'cm4all.netcologne.de:80';
var canonHostname = 'cm4all4.netcologne.de';
var accountId     = 'ANC010IN2JCC';
var companyName   = 'Praxis+Dr.+med.+Klaus+Leonards';
var htmlTitle	  = 'Praxis+Dr.+med.+Klaus+Leonards+in+K%C3%B6ln+-+Nippes+mit+den+Zusatzbezeichnungen+Akupunktur%2C+Chirotherapie%2C+Sportmedizin+und+Naturheilverfahren.+Weitere+Taetigkeitsschwerpunkte%3A+Schmerztherapie+und+Reisemedizin.';
var metaKeywords  = 'Arzt%2C+Praxis%2C+Leonards%2C+Kln%2C+Nippes%2C+Akupunktur%2C+Allgemeinmedizin%2C+Chirotherapie%2C+Gelbfieberimpfung%2C+Gesundheitsvorsorge%2C+Hautkrebsscreening%2C+Impfung%2C+Krebsvorsorge%2C+Naturheilverfahren%2C+Neuraltherapie%2C+Prvention%2C+Reisemedizin%2C+Schmerztherapie%2C+Sportmedizin%2C+Terminpraxis%2C+Vorsorgeuntersuchung%2C+';
var metaContents  = 'Arzt%2C+Praxis%2C+Leonards%2C+Kln%2C+Nippes%2C+Akupunktur%2C+Allgemeinmedizin%2C+Chirotherapie%2C+Gelbfieberimpfung%2C+Gesundheitsvorsorge%2C+Hautkrebsscreening%2C+Impfung%2C+Krebsvorsorge%2C+Naturheilverfahren%2C+Neuraltherapie%2C+Prvention%2C+Reisemedizin%2C+Schmerztherapie%2C+Sportmedizin%2C+Terminpraxis%2C+Vorsorgeuntersuchung%2C+';
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();
};

