/* [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','4536',jdecode('Home'),jdecode(''),'/4536.html','true',[],'',''],
	['PAGE','5914',jdecode('%C3%9Cber+mich'),jdecode(''),'/5914.html','true',[],'',''],
	['PAGE','4593',jdecode('Katzen'),jdecode(''),'/4593/index.html','true',[ 
		['PAGE','4620',jdecode('Micio'),jdecode(''),'/4593/4620.html','true',[],'',''],
		['PAGE','4647',jdecode('Maraja'),jdecode(''),'/4593/4647.html','true',[],'',''],
		['PAGE','4674',jdecode('Nyali'),jdecode(''),'/4593/4674.html','true',[],'',''],
		['PAGE','5142',jdecode('Nyangena+Jasha'),jdecode(''),'/4593/5142.html','true',[],'',''],
		['PAGE','24583',jdecode('Emmy+Lou'),jdecode(''),'/4593/24583.html','true',[],'',''],
		['PAGE','24727',jdecode('Samira+Mali'),jdecode(''),'/4593/24727.html','true',[],'',''],
		['PAGE','24892',jdecode('Blue+Angel'),jdecode(''),'/4593/24892.html','true',[],'',''],
		['PAGE','24901',jdecode('Sira'),jdecode(''),'/4593/24901.html','true',[],'','']
	],'',''],
	['PAGE','68101',jdecode('Kitten'),jdecode(''),'/68101/index.html','true',[ 
		['PAGE','68122',jdecode('Aktuelle+Kittenstube'),jdecode(''),'/68101/68122.html','true',[],'',''],
		['PAGE','4701',jdecode('2008'),jdecode(''),'/68101/4701.html','false',[],'','']
	],'',''],
	['PAGE','4809',jdecode('Pl%C3%A4ne'),jdecode(''),'/4809.html','true',[],'',''],
	['PAGE','76301',jdecode('Schnappsch%C3%BCsse'),jdecode(''),'/76301.html','true',[],'',''],
	['PAGE','80001',jdecode('Galerie'),jdecode(''),'/80001.html','true',[],'',''],
	['PAGE','23644',jdecode('Hunde'),jdecode(''),'/23644.html','true',[],'',''],
	['PAGE','4836',jdecode('Kontakt'),jdecode(''),'/4836.html','true',[],'',''],
	['PAGE','22102',jdecode('G%C3%A4stebuch'),jdecode(''),'/22102/index.html','true',[ 
		['PAGE','22103',jdecode('Eintr%C3%A4ge'),jdecode(''),'/22102/22103.html','false',[],'','']
	],'',''],
	['PAGE','22544',jdecode('Ihr+Weg+zu+uns'),jdecode(''),'/22544.html','true',[],'',''],
	['PAGE','22574',jdecode('Anfahrt'),jdecode(''),'/22574.html','true',[],'',''],
	['PAGE','72501',jdecode('Links'),jdecode(''),'/72501.html','true',[],'','']];
var siteelementCount=24;
theSitetree.topTemplateName='Bloom';
theSitetree.paletteFamily='FBE098';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='33065';
theSitetree.graphicsetId='14049';
theSitetree.contentColor='232323';
theSitetree.contentBGColor='FBE098';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Bloom',
				paletteFamily: 	'FBE098',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'33065',
				graphicsetId: 	'14049',
				contentColor: 	'232323',
				contentBGColor: 'FBE098',
				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['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4536',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5914',
internalId:  '',
customField: '20100617-110032'
};
webappMappings['1002']=webappMappings['1002-22102ABW0X0IN216T']={
webappId:    '1002',
documentId:  '22102',
internalId:  '22102ABW0X0IN216T',
customField: 'icq=false'
};
webappMappings['1501']=webappMappings['1501-3326689']={
webappId:    '1501',
documentId:  '4536',
internalId:  '3326689',
customField: '1501'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '22544',
internalId:  'routing',
customField: 'de_CH'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '22574',
internalId:  'location',
customField: 'language:de;country:CH;isIncluded:false;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4536',
internalId:  '',
customField: '20100615-221211'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4593',
internalId:  '',
customField: '20081019-130005'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4620',
internalId:  '',
customField: '20081019-130056'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4647',
internalId:  '',
customField: '20081019-130550'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4674',
internalId:  '',
customField: '20081013-104200'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5142',
internalId:  '',
customField: '20081019-130701'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24583',
internalId:  '',
customField: '20081013-104300'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24727',
internalId:  '',
customField: '20081019-130446'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24892',
internalId:  '',
customField: '20081019-130809'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24901',
internalId:  '',
customField: '20080717-085426'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '68101',
internalId:  '',
customField: '20080716-210118'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '68122',
internalId:  '',
customField: '20100613-223543'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4701',
internalId:  '',
customField: '20081019-131035'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4809',
internalId:  '',
customField: '20100615-221440'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76301',
internalId:  '',
customField: '20080924-103707'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80001',
internalId:  '',
customField: '20080924-104401'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23644',
internalId:  '',
customField: '20080924-102457'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4836',
internalId:  '',
customField: '20100615-221701'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22102',
internalId:  '',
customField: '20080717-091528'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22103',
internalId:  '',
customField: '20060410-141423'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22544',
internalId:  '',
customField: '20080717-091252'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22574',
internalId:  '',
customField: '20080717-091314'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72501',
internalId:  '',
customField: '20100616-121215'
};
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0IN216T';
var companyName   = 'Jamena%27s+Norwegische+Waldkatzen';
var htmlTitle	  = '';
var metaKeywords  = 'Waldkatzen%2C+Norwegische%2C+Jamena%27s%2C+Honauer';
var metaContents  = '';
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();
};
