/* [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','4596',jdecode('home'),jdecode(''), jdecode('%2F4596.html'), 'true',[],'',''],
	['PAGE','5839',jdecode('bilder'),jdecode(''), jdecode('%2F5839%2Findex.html'), 'true',[ 
		['PAGE','12286',jdecode('%3E+gesichter'),jdecode(''), jdecode('%2F5839%2F12286.html'), 'true',[],'',''],
		['PAGE','11505',jdecode('%3E+h%C3%A4user'),jdecode(''), jdecode('%2F5839%2F11505.html'), 'true',[],'',''],
		['PAGE','10804',jdecode('%3E+landschaften'),jdecode(''), jdecode('%2F5839%2F10804.html'), 'true',[],'',''],
		['PAGE','12754',jdecode('%3E+musik'),jdecode(''), jdecode('%2F5839%2F12754.html'), 'true',[],'',''],
		['PAGE','11965',jdecode('%3E+strukturen'),jdecode(''), jdecode('%2F5839%2F11965.html'), 'true',[],'','']
	],'',''],
	['PAGE','33595',jdecode('blog'),jdecode(''), jdecode('%2F33595.html'), 'true',[],'',''],
	['PAGE','15495',jdecode('projekte'),jdecode(''), jdecode('%2F15495.html'), 'true',[],'',''],
	['PAGE','6539',jdecode('stimmen'),jdecode(''), jdecode('%2F6539.html'), 'true',[],'',''],
	['PAGE','5201',jdecode('profil'),jdecode(''), jdecode('%2F5201.html'), 'true',[],'',''],
	['PAGE','5501',jdecode('kontakt'),jdecode(''), jdecode('%2F5501%2Findex.html'), 'true',[ 
		['PAGE','17003',jdecode('%3E+anfahrt'),jdecode(''), jdecode('%2F5501%2F17003.html'), 'true',[],'','']
	],'',''],
	['PAGE','7233',jdecode('g%C3%A4stebuch'),jdecode(''), jdecode('%2F7233%2Findex.html'), 'true',[ 
		['PAGE','7234',jdecode('%3E+eintr%C3%A4ge'),jdecode(''), jdecode('%2F7233%2F7234.html'), 'false',[],'','']
	],'',''],
	['PAGE','30495',jdecode('links'),jdecode(''), jdecode('%2F30495.html'), 'true',[],'','']];
var siteelementCount=16;
theSitetree.topTemplateName='Akropolis';
theSitetree.paletteFamily='A4A4AC';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10553';
theSitetree.graphicsetId='10451';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='A4A4AC';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'hostpoint',
  product: 'WSCSYSSSSLYTC21F'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Akropolis',
				paletteFamily: 	'A4A4AC',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10553',
				graphicsetId: 	'10451',
				contentColor: 	'FFFFFF',
				contentBGColor: 'A4A4AC',
				a_color: 		'A4A4AC',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4596',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']=webappMappings['1002-7233ahp010inejtw']={
webappId:    '1002',
documentId:  '7233',
internalId:  '7233ahp010inejtw',
customField: 'icq=false'
};
webappMappings['7060']=webappMappings['7060-7dadd0078b6f5ccd3bf7875bcaf56272']={
webappId:    '7060',
documentId:  '10804',
internalId:  '7dadd0078b6f5ccd3bf7875bcaf56272',
customField: 'language:de;country:CH;'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '17003',
internalId:  'location',
customField: 'language:de;country:CH;isIncluded:false;'
};
webappMappings['7060']=webappMappings['7060-cb170ce9618fc5c6cf161805c8c15204']={
webappId:    '7060',
documentId:  '11505',
internalId:  'cb170ce9618fc5c6cf161805c8c15204',
customField: 'language:de;country:CH;'
};
webappMappings['7060']=webappMappings['7060-1e8497ac0ffaf8de53f6422f8036c2fe']={
webappId:    '7060',
documentId:  '11965',
internalId:  '1e8497ac0ffaf8de53f6422f8036c2fe',
customField: 'language:de;country:CH;'
};
webappMappings['7060']=webappMappings['7060-23e509609797ea60d5c8fd6b061425f6']={
webappId:    '7060',
documentId:  '12286',
internalId:  '23e509609797ea60d5c8fd6b061425f6',
customField: 'language:de;country:CH;'
};
webappMappings['7060']=webappMappings['7060-ace2fbfbe5d170f69e2967b008889d84']={
webappId:    '7060',
documentId:  '12754',
internalId:  'ace2fbfbe5d170f69e2967b008889d84',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4596',
internalId:  '',
customField: '20111207-171443'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5201',
internalId:  '',
customField: '20080812-222117'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5839',
internalId:  '',
customField: '20111130-220425'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12286',
internalId:  '',
customField: '20060109-021338'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11505',
internalId:  '',
customField: '20060109-013048'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10804',
internalId:  '',
customField: '20060109-013106'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12754',
internalId:  '',
customField: '20060109-023517'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11965',
internalId:  '',
customField: '20060109-014040'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15495',
internalId:  '',
customField: '20080811-215402'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6539',
internalId:  '',
customField: '20111130-220025'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5501',
internalId:  '',
customField: '20111130-172136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17003',
internalId:  '',
customField: '20060816-000211'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7233',
internalId:  '',
customField: '20060108-115625'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7234',
internalId:  '',
customField: '20060108-124429'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30495',
internalId:  '',
customField: '20111207-174051'
};
webappMappings['7050']=webappMappings['7050-486']={
webappId:    '7050',
documentId:  '33595',
internalId:  '486',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33595',
internalId:  '',
customField: '20111207-172444'
};
var webAppHostname = 'cgi.webomat.ch:80';
var canonHostname = 'webomat02.hostpoint.ch';
var accountId     = 'Ahp010INEJTW';
var companyName   = 'dieter+langhart';
var htmlTitle	  = 'dieter+langhart';
var metaKeywords  = 'dieter+langhart+text+texte+texts+gestaltung+layout+transalation+%EF%BF%BDbersetzung+fotografie+photography+redaktion+journalismus+schulung+unterricht+teaching+englisch+english';
var metaContents  = 'dieter+langhart';
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();
};

