/* [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','301',jdecode('Home'),jdecode(''), jdecode('%2F301.html'), 'true',[],'',''],
	['PAGE','56301',jdecode('wir+%C3%BCber+uns'),jdecode(''), jdecode('%2F56301.html'), 'true',[],'',''],
	['PAGE','13285',jdecode('Ferienhaus'),jdecode(''), jdecode('%2F13285%2Findex.html'), 'true',[ 
		['PAGE','48301',jdecode('Bresse%2C+Burgund'),jdecode(''), jdecode('%2F13285%2F48301.html'), 'true',[],'',''],
		['PAGE','13306',jdecode('Mietpreise'),jdecode(''), jdecode('%2F13285%2F13306.html'), 'true',[],'',''],
		['PAGE','16001',jdecode('Belegungsplan'),jdecode(''), jdecode('%2F13285%2F16001.html'), 'true',[],'',''],
		['PAGE','26401',jdecode('Aktuelles'),jdecode(''), jdecode('%2F13285%2F26401.html'), 'true',[],'',''],
		['PAGE','64001',jdecode('Fotos+Coccinelle'),jdecode(''), jdecode('%2F13285%2F64001.html'), 'true',[],'','']
	],'',''],
	['PAGE','26422',jdecode('Kontakt%2Fcontact'),jdecode(''), jdecode('%2F26422.html'), 'true',[],'',''],
	['PAGE','92001',jdecode('G%C3%A4stebuch'),jdecode(''), jdecode('%2F92001.html'), 'true',[],'',''],
	['PAGE','49701',jdecode('Anfahrt%2Facc%C3%A8s'),jdecode(''), jdecode('%2F49701.html'), 'true',[],'',''],
	['PAGE','40201',jdecode('Links%2Fliens'),jdecode(''), jdecode('%2F40201.html'), 'true',[],'',''],
	['PAGE','51401',jdecode('Kamerunschafe'),jdecode(''), jdecode('%2F51401%2Findex.html'), 'true',[ 
		['PAGE','51422',jdecode('unsere+Herde'),jdecode(''), jdecode('%2F51401%2F51422.html'), 'true',[],'',''],
		['PAGE','51443',jdecode('Landschaftspfleger'),jdecode(''), jdecode('%2F51401%2F51443.html'), 'true',[],'',''],
		['PAGE','51506',jdecode('Fotos'),jdecode(''), jdecode('%2F51401%2F51506.html'), 'true',[],'',''],
		['PAGE','51464',jdecode('zu+verkaufen'),jdecode(''), jdecode('%2F51401%2F51464.html'), 'true',[],'',''],
		['PAGE','51485',jdecode('Zaunerstellung'),jdecode(''), jdecode('%2F51401%2F51485.html'), 'true',[],'','']
	],'',''],
	['PAGE','46101',jdecode('nos+moutons'),jdecode(''), jdecode('%2F46101%2Findex.html'), 'true',[ 
		['PAGE','47501',jdecode('notre+troupeau'),jdecode(''), jdecode('%2F46101%2F47501.html'), 'true',[],'',''],
		['PAGE','47522',jdecode('qualit%C3%A9s+de+rasse'),jdecode(''), jdecode('%2F46101%2F47522.html'), 'true',[],'',''],
		['PAGE','47543',jdecode('photos'),jdecode(''), jdecode('%2F46101%2F47543.html'), 'true',[],'',''],
		['PAGE','47585',jdecode('%C3%A0+vendre'),jdecode(''), jdecode('%2F46101%2F47585.html'), 'true',[],'',''],
		['PAGE','47564',jdecode('cl%C3%B4ture'),jdecode(''), jdecode('%2F46101%2F47564.html'), 'true',[],'','']
	],'','']];
var siteelementCount=24;
theSitetree.topTemplateName='Daily';
theSitetree.paletteFamily='BCE09E';
theSitetree.keyvisualId='7277';
theSitetree.keyvisualName='kv_7277.jpg';
theSitetree.fontsetId='16457';
theSitetree.graphicsetId='12152';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'hostpoint',
  product: 'WSCSYSSSSLYTC21F'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Daily',
				paletteFamily: 	'BCE09E',
				keyvisualId: 	'7277',
				keyvisualName: 	'kv_7277.jpg',
				fontsetId: 		'16457',
				graphicsetId: 	'12152',
				contentColor: 	'000000',
				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['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '49701',
internalId:  'location',
customField: 'language:de;country:CH;isIncluded:false;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '301',
internalId:  '1006',
customField: '1006'
};
webappMappings['7060']=webappMappings['7060-7a468b2cbf741eb72435af582c7bf63a']={
webappId:    '7060',
documentId:  '64001',
internalId:  '7a468b2cbf741eb72435af582c7bf63a',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '301',
internalId:  '',
customField: '20110819-135149'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56301',
internalId:  '',
customField: '20110819-135402'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13285',
internalId:  '',
customField: '20100425-124657'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48301',
internalId:  '',
customField: '20090111-183810'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13306',
internalId:  '',
customField: '20111201-214441'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16001',
internalId:  '',
customField: '20110819-133250'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26401',
internalId:  '',
customField: '20091109-165159'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64001',
internalId:  '',
customField: '20090122-153933'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46101',
internalId:  '',
customField: '20090113-145201'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47501',
internalId:  '',
customField: '20090111-172650'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47522',
internalId:  '',
customField: '20090111-172650'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47543',
internalId:  '',
customField: '20090111-172650'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47585',
internalId:  '',
customField: '20090111-172650'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47564',
internalId:  '',
customField: '20090111-172650'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51401',
internalId:  '',
customField: '20090128-084937'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51422',
internalId:  '',
customField: '20090114-170410'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51443',
internalId:  '',
customField: '20090114-090938'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51506',
internalId:  '',
customField: '20090112-135917'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51464',
internalId:  '',
customField: '20090111-230336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51485',
internalId:  '',
customField: '20090111-202516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26422',
internalId:  '',
customField: '20090115-165642'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49701',
internalId:  '',
customField: '20100129-133953'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40201',
internalId:  '',
customField: '20100128-152244'
};
webappMappings['1002']=webappMappings['1002-92001ahopt0in3o90']={
webappId:    '1002',
documentId:  '92001',
internalId:  '92001ahopt0in3o90',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92001',
internalId:  '',
customField: '20100202-154350'
};
webappMappings['7060']=webappMappings['7060-509ff8521e7ad76908e8c6112cc488c4']={
webappId:    '7060',
documentId:  '51506',
internalId:  '509ff8521e7ad76908e8c6112cc488c4',
customField: 'language:de;country:CH;'
};
var webAppHostname = 'cgi.webomat.ch:80';
var canonHostname = 'webomat01.hostpoint.ch';
var accountId     = 'AHOPT0IN3O90';
var companyName   = 'ferme+coccinelle';
var htmlTitle	  = '';
var metaKeywords  = 'g%C3%BCnstige+Ferien+Burgund+Frankreich+Ferienhaus+Louhans';
var metaContents  = 'Ferienhaus+Louhans+-Ferienwohnung+Burgund+-+g%C3%BCnstige+Ferien+Frankreich+-+Ferienhaus+Frankreich-Ferienhaujs+Burgund-Ferien+Burgund';
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();
};

