/* [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','401',jdecode('Home'),jdecode(''),'/401.html','true',[],'',''],
	['PAGE','30201',jdecode('Ferien+f%C3%BCr+ihr+Tier'),jdecode(''),'/30201.html','true',[],'',''],
	['PAGE','452',jdecode('Ueber+uns'),jdecode(''),'/452/index.html','true',[ 
		['PAGE','26601',jdecode('Meine+Hunde'),jdecode(''),'/452/26601.html','true',[],'',''],
		['PAGE','27701',jdecode('Meine+Katzen'),jdecode(''),'/452/27701.html','true',[],'',''],
		['PAGE','27722',jdecode('Meine+Sch%C3%A4fli'),jdecode(''),'/452/27722.html','true',[],'','']
	],'',''],
	['PAGE','41201',jdecode('Meine+Tierhaltung'),jdecode(''),'/41201.html','true',[],'',''],
	['PAGE','26101',jdecode('Tierkinder'),jdecode(''),'/26101/index.html','true',[ 
		['PAGE','26622',jdecode('Hundebaby%26%23x27%3Bs'),jdecode(''),'/26101/26622.html','true',[],'',''],
		['PAGE','26643',jdecode('Kaninchen+Baby%26%23x27%3Bs'),jdecode(''),'/26101/26643.html','true',[],'',''],
		['PAGE','26664',jdecode('Schaf+Baby%26%23x27%3Bs'),jdecode(''),'/26101/26664.html','true',[],'','']
	],'',''],
	['PAGE','22301',jdecode('Kerzen+und+Tiere'),jdecode(''),'/22301/index.html','true',[ 
		['PAGE','557',jdecode('Bienenwachskerzen'),jdecode(''),'/22301/557.html','true',[],'',''],
		['PAGE','599',jdecode('Seidenh%C3%BChner'),jdecode(''),'/22301/599.html','true',[],'',''],
		['PAGE','7143',jdecode('Brahma+H%C3%BChner'),jdecode(''),'/22301/7143.html','true',[],'',''],
		['PAGE','7101',jdecode('Aufzuchtl%C3%A4mmer-+tiere'),jdecode(''),'/22301/7101.html','true',[],'',''],
		['PAGE','7122',jdecode('Widder-Kaninchen'),jdecode(''),'/22301/7122.html','true',[],'',''],
		['PAGE','18401',jdecode('Bienen'),jdecode(''),'/22301/18401.html','true',[],'',''],
		['PAGE','18422',jdecode('Wachteln'),jdecode(''),'/22301/18422.html','true',[],'','']
	],'',''],
	['PAGE','641',jdecode('Gesucht'),jdecode(''),'/641.html','true',[],'',''],
	['PAGE','34501',jdecode('Abgabetiere'),jdecode(''),'/34501.html','true',[],'',''],
	['PAGE','746',jdecode('Kontakt'),jdecode(''),'/746.html','true',[],'',''],
	['PAGE','9601',jdecode('Bestellung+%2F+Anfrage+'),jdecode(''),'/9601.html','true',[],'',''],
	['PAGE','809',jdecode('Bison'),jdecode(''),'/809.html','true',[],'',''],
	['PAGE','6906',jdecode('G%C3%A4stebuch'),jdecode(''),'/6906/index.html','true',[ 
		['PAGE','6901',jdecode('Eintr%C3%A4ge'),jdecode(''),'/6906/6901.html','false',[],'','']
	],'',''],
	['PAGE','50401',jdecode('Daniel'),jdecode(''),'/50401.html','true',[],'','']];
var siteelementCount=27;
theSitetree.topTemplateName='echo';
theSitetree.paletteFamily='3C4B66';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10403';
theSitetree.graphicsetId='10628';
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: 			'echo',
				paletteFamily: 	'3C4B66',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10403',
				graphicsetId: 	'10628',
				contentColor: 	'000000',
				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['1002']=webappMappings['1002-6906abw0x0in2pd2']={
webappId:    '1002',
documentId:  '6906',
internalId:  '6906abw0x0in2pd2',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20100124-124313'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-1771']={
webappId:    '7008',
documentId:  '9601',
internalId:  '1771',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30201',
internalId:  '',
customField: '20100124-131116'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '452',
internalId:  '',
customField: '20100124-130507'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26601',
internalId:  '',
customField: '20080818-093453'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27701',
internalId:  '',
customField: '20100124-130549'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27722',
internalId:  '',
customField: '20100124-131002'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41201',
internalId:  '',
customField: '20100124-125718'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26101',
internalId:  '',
customField: '20081026-205748'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26622',
internalId:  '',
customField: '20100124-124416'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26643',
internalId:  '',
customField: '20100124-125357'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26664',
internalId:  '',
customField: '20100124-125553'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22301',
internalId:  '',
customField: '20071024-023904'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '557',
internalId:  '',
customField: '20080427-000346'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50401',
internalId:  '',
customField: '20100621-044102'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '599',
internalId:  '',
customField: '20100124-130025'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7143',
internalId:  '',
customField: '20100124-130216'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7101',
internalId:  '',
customField: '20080304-214216'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7122',
internalId:  '',
customField: '20100124-130416'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18401',
internalId:  '',
customField: '20070922-025646'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18422',
internalId:  '',
customField: '20081012-000829'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '641',
internalId:  '',
customField: '20080427-005010'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34501',
internalId:  '',
customField: '20100124-132115'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '746',
internalId:  '',
customField: '20080101-215419'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9601',
internalId:  '',
customField: '20070919-033026'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '809',
internalId:  '',
customField: '20100124-132244'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6906',
internalId:  '',
customField: '20070915-014647'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6901',
internalId:  '',
customField: '20070915-014647'
};
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0IN2PD2';
var companyName   = 'BeeAngel';
var htmlTitle	  = 'Bienenwachskerzen+Kaninchen+Aussie';
var metaKeywords  = '';
var metaContents  = 'seidenh%C3%BChner++hochzeitstauben++bienenwachskerzen++zwergkaninchen++wachteleier++';
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();
};
