/* [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','4584',jdecode('Index'),jdecode(''),'/4584.html','true',[],'',''],
	['PAGE','4668',jdecode('Wir+%C3%BCber+uns'),jdecode(''),'/4668/index.html','true',[ 
		['PAGE','4695',jdecode('Was+machen+wir'),jdecode(''),'/4668/4695.html','true',[],'',''],
		['PAGE','4722',jdecode('Mitgliedschaft'),jdecode(''),'/4668/4722.html','true',[],'','']
	],'',''],
	['PAGE','4776',jdecode('Aktuelles'),jdecode(''),'/4776/index.html','true',[ 
		['PAGE','4830',jdecode('Jahresprogramm'),jdecode(''),'/4776/4830.html','true',[],'','']
	],'',''],
	['PAGE','46256',jdecode('Ausstellung+2002'),jdecode(''),'/46256.html','true',[],'',''],
	['PAGE','51692',jdecode('Ausstellung+2006'),jdecode(''),'/51692.html','true',[],'',''],
	['PAGE','54574',jdecode('Ausstellung+2009'),jdecode(''),'/54574.html','true',[],'',''],
	['PAGE','19275',jdecode('Unsere+V%C3%B6gel'),jdecode(''),'/19275/index.html','true',[ 
		['PAGE','41501',jdecode('Wellensittich'),jdecode(''),'/19275/41501.html','true',[],'',''],
		['PAGE','41775',jdecode('Nymphensittich'),jdecode(''),'/19275/41775.html','true',[],'',''],
		['PAGE','41829',jdecode('Rostkappenpapagei'),jdecode(''),'/19275/41829.html','true',[],'',''],
		['PAGE','41802',jdecode('Neu+Guinea+Edelpapagei'),jdecode(''),'/19275/41802.html','true',[],'',''],
		['PAGE','41856',jdecode('Sonnensittich'),jdecode(''),'/19275/41856.html','true',[],'',''],
		['PAGE','43301',jdecode('Schwalbensittich'),jdecode(''),'/19275/43301.html','true',[],'',''],
		['PAGE','49301',jdecode('Amerik.+Stelzenl%C3%A4ufer'),jdecode(''),'/19275/49301.html','true',[],'',''],
		['PAGE','49739',jdecode('Balistar'),jdecode(''),'/19275/49739.html','true',[],'','']
	],'',''],
	['PAGE','4884',jdecode('Kontakt'),jdecode(''),'/4884/index.html','true',[ 
		['PAGE','16422',jdecode('Kontakt+%28Folgeseite%29'),jdecode(''),'/4884/16422.html','false',[],'','']
	],'',''],
	['PAGE','7202',jdecode('G%C3%A4stebuch'),jdecode(''),'/7202/index.html','true',[ 
		['PAGE','7203',jdecode('Eintr%C3%A4ge'),jdecode(''),'/7202/7203.html','false',[],'','']
	],'','']];
var siteelementCount=22;
theSitetree.topTemplateName='Profile';
theSitetree.paletteFamily='990000';
theSitetree.keyvisualId='1280';
theSitetree.keyvisualName='feder.jpg';
theSitetree.fontsetId='191';
theSitetree.graphicsetId='232';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Profile',
				paletteFamily: 	'990000',
				keyvisualId: 	'1280',
				keyvisualName: 	'feder.jpg',
				fontsetId: 		'191',
				graphicsetId: 	'232',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'990000',
				b_color: 		'333333',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4776',
internalId:  '',
customField: '20100608-223928'
};
webappMappings['1002']=webappMappings['1002-7202ABW0X0INX34G']={
webappId:    '1002',
documentId:  '7202',
internalId:  '7202ABW0X0INX34G',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4830',
internalId:  '',
customField: '20100406-224928'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4584',
internalId:  '',
customField: '20100608-224050'
};
webappMappings['1501']=webappMappings['1501-1828166']={
webappId:    '1501',
documentId:  '4584',
internalId:  '1828166',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54574',
internalId:  '',
customField: '20100117-011113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4884',
internalId:  '',
customField: '20090223-160222'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4668',
internalId:  '',
customField: '20090620-170102'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4695',
internalId:  '',
customField: '20090620-170510'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4722',
internalId:  '',
customField: '20090620-172153'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46256',
internalId:  '',
customField: '20061102-085203'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51692',
internalId:  '',
customField: '20090223-161749'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19275',
internalId:  '',
customField: '20090620-171058'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41501',
internalId:  '',
customField: '20090620-171139'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41775',
internalId:  '',
customField: '20060313-185538'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41829',
internalId:  '',
customField: '20060313-185343'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41802',
internalId:  '',
customField: '20060313-185314'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41856',
internalId:  '',
customField: '20060313-185152'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43301',
internalId:  '',
customField: '20060313-185020'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49301',
internalId:  '',
customField: '20060313-185050'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49739',
internalId:  '',
customField: '20080404-150153'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16422',
internalId:  '',
customField: '20050213-153633'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7202',
internalId:  '',
customField: '20040214-215000'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7203',
internalId:  '',
customField: '20040211-202227'
};
webappMappings['7008']=webappMappings['7008-5590']={
webappId:    '7008',
documentId:  '4884',
internalId:  '5590',
customField: 'language:de;country:CH;'
};
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0INX34G';
var companyName   = 'Exotis%2C+Sektion+Aaretal';
var htmlTitle	  = 'Exotis%2C+Sektion+Aaretal+-+Homepage';
var metaKeywords  = 'Exotis%2C+Papageien%2C+Papagei%2C+V%EF%BF%BDgel%2C+Vogelzucht%2C+Aaretal%2C+Ausstellung%2C+Vogelhaltung%2C+Finken%2C+Kanarien%2C+Sittiche%2C+Zierv%EF%BF%BDgel%2C+Kakadu%2C+Zucht%2C+Weichfresser%2C+Verein%2C+Arterhaltung%2C+Artenschutz%2C+Sittich%2C+Wellensittich%2C+Graupapagei%2C+Ara%2C+Voliere%2C+Lori%2C+M%EF%BF%BDriken%2C+Wildegg%2C+Prachtfinken%2C+Haltebewilligung%2C+Vogelpflege%2C+Star%2C+Staren%2C+Wachtel%2C+Zwergwachtel%2C+Vogelb%EF%BF%BDrse%2C';
var metaContents  = 'Zucht+und+Pflege+exotischer+V%EF%BF%BDgel%2C+Haltung+von+Vogelarten+wie+Finken+Sittiche+Papageien+oder+Weichfresser';
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();
};
