/* [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','524912',jdecode('News+2010'),jdecode(''),'/524912.html','true',[],'',''],
	['PAGE','10801',jdecode('News+09'),jdecode(''),'/10801.html','true',[],'',''],
	['PAGE','452',jdecode('Wir+%C3%BCber+uns'),jdecode(''),'/452.html','true',[],'',''],
	['PAGE','551412',jdecode('Alles+%C3%BCber+Meerschweinchen'),jdecode(''),'/551412.html','true',[],'',''],
	['PAGE','37301',jdecode('Lunkaryas'),jdecode(''),'/37301.html','true',[],'',''],
	['PAGE','37322',jdecode('EKH+%2B+Strubeli'),jdecode(''),'/37322.html','true',[],'',''],
	['PAGE','182601',jdecode('Liebhabertiere%2FKastraten'),jdecode(''),'/182601.html','true',[],'',''],
	['PAGE','10822',jdecode('Verpaarung'),jdecode(''),'/10822.html','true',[],'',''],
	['PAGE','28901',jdecode('Babys'),jdecode(''),'/28901.html','true',[],'',''],
	['PAGE','5101',jdecode('Abgabetiere'),jdecode(''),'/5101.html','true',[],'',''],
	['PAGE','578',jdecode('Haltung'),jdecode(''),'/578.html','true',[],'',''],
	['PAGE','544512',jdecode('C%C3%A9drics+Kaninchen'),jdecode(''),'/544512.html','true',[],'',''],
	['PAGE','114401',jdecode('Unsere+anderen+Tiere'),jdecode(''),'/114401.html','true',[],'',''],
	['PAGE','555712',jdecode('Unsere+Schildkr%C3%B6ten'),jdecode(''),'/555712.html','true',[],'',''],
	['PAGE','564312',jdecode('Unsere+Reptilien'),jdecode(''),'/564312.html','true',[],'',''],
	['PAGE','511712',jdecode('Welpen+2009'),jdecode(''),'/511712.html','true',[],'',''],
	['PAGE','553132',jdecode('Welpen+Asira+geb.05.05.10'),jdecode(''),'/553132.html','true',[],'',''],
	['PAGE','553153',jdecode('Welpen+Neela+geb.27.04.10'),jdecode(''),'/553153.html','true',[],'',''],
	['PAGE','28601',jdecode('Links'),jdecode(''),'/28601.html','true',[],'',''],
	['PAGE','6906',jdecode('G%C3%A4stebuch'),jdecode(''),'/6906/index.html','true',[ 
		['PAGE','6901',jdecode('Eintr%C3%A4ge'),jdecode(''),'/6906/6901.html','false',[],'','']
	],'','']];
var siteelementCount=22;
theSitetree.topTemplateName='Oblique';
theSitetree.paletteFamily='7193BF';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='33310';
theSitetree.graphicsetId='14182';
theSitetree.contentColor='4A6F9F';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Oblique',
				paletteFamily: 	'7193BF',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'33310',
				graphicsetId: 	'14182',
				contentColor: 	'4A6F9F',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1002']=webappMappings['1002-6906abw0x0in2g9a']={
webappId:    '1002',
documentId:  '6906',
internalId:  '6906abw0x0in2g9a',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20100223-113321'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '553153',
internalId:  '',
customField: '20100706-154814'
};
webappMappings['1501']=webappMappings['1501-19908123']={
webappId:    '1501',
documentId:  '401',
internalId:  '19908123',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10801',
internalId:  '',
customField: '20091231-150415'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '452',
internalId:  '',
customField: '20100222-112329'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '553132',
internalId:  '',
customField: '20100713-214110'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37301',
internalId:  '',
customField: '20100415-152628'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37322',
internalId:  '',
customField: '20100618-150823'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '551412',
internalId:  '',
customField: '20100223-113404'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '182601',
internalId:  '',
customField: '20100317-113510'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10822',
internalId:  '',
customField: '20100706-155343'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28901',
internalId:  '',
customField: '20100627-110731'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '578',
internalId:  '',
customField: '20100222-112212'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5101',
internalId:  '',
customField: '20100225-141949'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '114401',
internalId:  '',
customField: '20100510-151011'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '511712',
internalId:  '',
customField: '20100702-101528'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28601',
internalId:  '',
customField: '20091104-115014'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6906',
internalId:  '',
customField: '20070131-102516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6901',
internalId:  '',
customField: '20070131-102516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '544512',
internalId:  '',
customField: '20100222-112350'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '524912',
internalId:  '',
customField: '20100706-155312'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '555712',
internalId:  '',
customField: '20100618-143841'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '564312',
internalId:  '',
customField: '20100830-080712'
};
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0IN2G9A';
var companyName   = 'Heiligenlandmeeris';
var htmlTitle	  = 'Heiligenlandmeeris';
var metaKeywords  = '';
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();
};
