/* [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','4498',jdecode('Home'),jdecode(''),'/4498.html','true',[],'',''],
	['PAGE','58965',jdecode('News+%21+'),jdecode(''),'/58965.html','true',[],'',''],
	['PAGE','55573',jdecode('Wir+%C3%BCber+uns'),jdecode(''),'/55573.html','true',[],'',''],
	['PAGE','55873',jdecode('Angebote'),jdecode(''),'/55873.html','true',[],'',''],
	['PAGE','5708',jdecode('Ferienwohnung+'),jdecode(''),'/5708.html','true',[],'',''],
	['PAGE','91349',jdecode('Events'),jdecode(''),'/91349.html','true',[],'',''],
	['PAGE','56136',jdecode('Preise'),jdecode(''),'/56136.html','true',[],'',''],
	['PAGE','92335',jdecode('dwDesign'),jdecode(''),'/92335/index.html','true',[ 
		['PAGE','92793',jdecode('dwDesign+Galerie'),jdecode(''),'/92335/92793.html','true',[],'','']
	],'',''],
	['PAGE','89565',jdecode('Anreise%2FRoutenplan'),jdecode(''),'/89565.html','true',[],'',''],
	['PAGE','6003',jdecode('Ausfl%C3%BCge'),jdecode(''),'/6003.html','true',[],'',''],
	['PAGE','4555',jdecode('Galerie'),jdecode(''),'/4555.html','true',[],'',''],
	['PAGE','101611',jdecode('Kontakt'),jdecode(''),'/101611.html','true',[],'',''],
	['PAGE','43061',jdecode('G%C3%A4stebuch'),jdecode(''),'/43061/index.html','true',[ 
		['PAGE','43062',jdecode('Eintr%C3%A4ge'),jdecode(''),'/43061/43062.html','false',[],'','']
	],'',''],
	['PAGE','63881',jdecode('Fotoalbum'),jdecode(''),'/63881/index.html','true',[ 
		['PAGE','61954',jdecode('Zivil-Trauung'),jdecode(''),'/63881/61954.html','true',[],'',''],
		['PAGE','63641',jdecode('Untiabschluss'),jdecode(''),'/63881/63641.html','true',[],'',''],
		['PAGE','66536',jdecode('Geburtstags-Brunch'),jdecode(''),'/63881/66536.html','true',[],'',''],
		['PAGE','65673',jdecode('Hochzeit+4.8.07'),jdecode(''),'/63881/65673.html','true',[],'','']
	],'',''],
	['PAGE','72777',jdecode('Links'),jdecode(''),'/72777.html','true',[],'',''],
	['PAGE','103124',jdecode('Verf%C3%BCgbarkeit+-+Testphase'),jdecode(''),'/103124.html','true',[],'','']];
var siteelementCount=22;
theSitetree.topTemplateName='Enjoy';
theSitetree.paletteFamily='FF9F21';
theSitetree.keyvisualId='2235';
theSitetree.keyvisualName='jugendherbergen1.jpg';
theSitetree.fontsetId='364';
theSitetree.graphicsetId='418';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='FF9F21';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Enjoy',
				paletteFamily: 	'FF9F21',
				keyvisualId: 	'2235',
				keyvisualName: 	'jugendherbergen1.jpg',
				fontsetId: 		'364',
				graphicsetId: 	'418',
				contentColor: 	'FFFFFF',
				contentBGColor: 'FF9F21',
				a_color: 		'FF9F21',
				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:  '4498',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']=webappMappings['1002-43061AHOPT0IN3OVE']={
webappId:    '1002',
documentId:  '43061',
internalId:  '43061AHOPT0IN3OVE',
customField: 'icq=false'
};
webappMappings['7060']=webappMappings['7060-6a264efd5875cadcd28362382f15806f']={
webappId:    '7060',
documentId:  '61954',
internalId:  '6a264efd5875cadcd28362382f15806f',
customField: 'language:de;country:CH;'
};
webappMappings['7060']=webappMappings['7060-23c141180e4c685870e680d4cf376359']={
webappId:    '7060',
documentId:  '63641',
internalId:  '23c141180e4c685870e680d4cf376359',
customField: 'language:de;country:CH;'
};
webappMappings['7060']=webappMappings['7060-acae57f9c7d98aa8a5d586569738fb4a']={
webappId:    '7060',
documentId:  '65673',
internalId:  'acae57f9c7d98aa8a5d586569738fb4a',
customField: 'language:de;country:CH;'
};
webappMappings['7060']=webappMappings['7060-1a6db7ec7c24b74238ec0b372c53171c']={
webappId:    '7060',
documentId:  '66536',
internalId:  '1a6db7ec7c24b74238ec0b372c53171c',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58965',
internalId:  '',
customField: '20100802-084644'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4498',
internalId:  '',
customField: '20100731-101045'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '101611',
internalId:  '',
customField: '20100328-150543'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '89565',
internalId:  'routing',
customField: 'de_CH'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55573',
internalId:  '',
customField: '20100531-151841'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91349',
internalId:  '',
customField: '20100802-084757'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55873',
internalId:  '',
customField: '20100217-083532'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5708',
internalId:  '',
customField: '20100217-083532'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56136',
internalId:  '',
customField: '20100217-083532'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92335',
internalId:  '',
customField: '20090729-231542'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92793',
internalId:  '',
customField: '20090326-191517'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89565',
internalId:  '',
customField: '20090729-132105'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6003',
internalId:  '',
customField: '20100328-150336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4555',
internalId:  '',
customField: '20090722-121929'
};
webappMappings['7008']=webappMappings['7008-2621']={
webappId:    '7008',
documentId:  '101611',
internalId:  '2621',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43061',
internalId:  '',
customField: '20041126-000342'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43062',
internalId:  '',
customField: '20041126-000342'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63881',
internalId:  '',
customField: '20070925-105236'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61954',
internalId:  '',
customField: '20070615-135440'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63641',
internalId:  '',
customField: '20070618-231917'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66536',
internalId:  '',
customField: '20070925-112310'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65673',
internalId:  '',
customField: '20070911-142258'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72777',
internalId:  '',
customField: '20080415-115506'
};
webappMappings['1501']=webappMappings['1501-13089161']={
webappId:    '1501',
documentId:  '4498',
internalId:  '13089161',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '103124',
internalId:  '',
customField: '20100804-170411'
};
var canonHostname = 'webomat01.hostpoint.ch';
var accountId     = 'AHOPT0IN3OVE';
var companyName   = 'Der+aussergew%C3%B6hnliche+Bauernhof';
var htmlTitle	  = 'Bauernhof+Ferien+Event+Urlaub+Anl%C3%A4sse+alles+auf+dem+Schafmatthof+im+Solothurner+Jura+%28in+G%C3%A4nsbrunnen%29';
var metaKeywords  = 'Ferien+auf+dem+Bauernhof%2C+Bed+and+Breakfast%2C+BnB%2C+Wellness+Bauernhof%2C+Events%2C+Anl%C3%A4sse%2C+%C3%9Cbernachtungsm%C3%B6glichkeit+Jakobsweg+ab+Basel%2C+Urlaub+auf+dem+Bauernhof%2C+Schweiz%2C+Weissenstein%2C+G%C3%A4nsbrunnen%2C+Welschenrohr%2C+Sikyranch%2C+Ferien%2C+Urlaub%2C+Solothurn%2C+Schweiz%2C+Nordwestschweiz%2C+Moutier%2C+Balsthal%2C+Oensingen%2C+Park%2C+Erholung%2C+Blumen%2C+Kinder%2C+Aedermannsdorf%2C+Cremines%2C+Matzendorf%2C+Laupersdorf%2C+Jesus%2C+Gott%2C+Christus%2C+Christen%2C+FCG%2C+SPM%2C+Pfimi%2C+Vineyard%2C+Traktor%2C+Freizeit%2C+kein+Hund%2C+Hochzeit%2CTrampolin%2C+Whirlpool%2C+Jacuzzi%2C+Wellness%2C+Verw%C3%B6hntage%2C+Kinderspielplatz%2C+Design%2C+1.+Augustbrunch%2C+';
var metaContents  = 'Verbringen+Sie+erholsame+und+ruhige+Ferien+am+Fusse+des+Weissensteins+inmitten+wundersch%C3%B6ner+Natur.+Es+steht+eine+sch%C3%B6ne+3.5+Zimmer+Dachwohnung+zur+Verf%C3%BCgung.+Urlaub+auf+dem+Bauernhof.+Ferien+auf+dem+Bauernhof.+Wellness-Bauernhof.+Whirlpool.+1.+Augustbrunch.+dwDesign';
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();
};
