/* [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('Accueil'),jdecode(''),'/301.html','true',[],'',''],
	['PAGE','1401',jdecode('Pr%C3%A9sentation'),jdecode(''),'/1401/index.html','true',[ 
		['PAGE','15501',jdecode('Ma+philosophie'),jdecode(''),'/1401/15501.html','true',[],'',''],
		['PAGE','1422',jdecode('Le+concept'),jdecode(''),'/1401/1422.html','true',[],'',''],
		['PAGE','55401',jdecode('Revue+de+Presse'),jdecode(''),'/1401/55401.html','true',[],'','']
	],'',''],
	['PAGE','14322',jdecode('Mes+th%C3%A8mes'),jdecode(''),'/14322/index.html','true',[ 
		['PAGE','108001',jdecode('Cuisine+bien-%C3%AAtre'),jdecode(''),'/14322/108001.html','true',[],'',''],
		['PAGE','111001',jdecode('Verrines'),jdecode(''),'/14322/111001.html','true',[],'',''],
		['PAGE','111701',jdecode('Hommage+bourguignon'),jdecode(''),'/14322/111701.html','true',[],'','']
	],'',''],
	['PAGE','47501',jdecode('Mets+d%26%23x27%3B%C3%A9t%C3%A9'),jdecode(''),'/47501/index.html','true',[ 
		['PAGE','49401',jdecode('Entr%C3%A9es'),jdecode(''),'/47501/49401.html','true',[],'',''],
		['PAGE','52201',jdecode('Poissons'),jdecode(''),'/47501/52201.html','true',[],'',''],
		['PAGE','53301',jdecode('Viandes'),jdecode(''),'/47501/53301.html','true',[],'',''],
		['PAGE','54101',jdecode('Douceurs'),jdecode(''),'/47501/54101.html','true',[],'','']
	],'',''],
	['PAGE','22401',jdecode('La+cave'),jdecode(''),'/22401/index.html','true',[ 
		['PAGE','23001',jdecode('Les+blancs'),jdecode(''),'/22401/23001.html','true',[],'',''],
		['PAGE','23022',jdecode('Les+Bourgognes'),jdecode(''),'/22401/23022.html','true',[],'',''],
		['PAGE','24501',jdecode('Les+Bordeaux'),jdecode(''),'/22401/24501.html','true',[],'',''],
		['PAGE','24522',jdecode('Les+Beaujolais'),jdecode(''),'/22401/24522.html','true',[],'',''],
		['PAGE','24543',jdecode('Les+C%C3%B4tes+du+Rh%C3%B4ne'),jdecode(''),'/22401/24543.html','true',[],'',''],
		['PAGE','23043',jdecode('Les+doux'),jdecode(''),'/22401/23043.html','true',[],'',''],
		['PAGE','23064',jdecode('Les+Champagnes'),jdecode(''),'/22401/23064.html','true',[],'','']
	],'',''],
	['PAGE','12201',jdecode('Cours+de+cuisine'),jdecode(''),'/12201.html','true',[],'',''],
	['PAGE','20101',jdecode('Produits+Maison'),jdecode(''),'/20101/index.html','true',[ 
		['PAGE','92101',jdecode('Mes+cr%C3%A9ations'),jdecode(''),'/20101/92101.html','true',[],'',''],
		['PAGE','92901',jdecode('Commandes'),jdecode(''),'/20101/92901.html','true',[],'',''],
		['PAGE','73022',jdecode('D%C3%A9positaires'),jdecode(''),'/20101/73022.html','true',[],'','']
	],'',''],
	['PAGE','1569',jdecode('Tarifs'),jdecode(''),'/1569.html','true',[],'',''],
	['PAGE','1590',jdecode('Contact'),jdecode(''),'/1590/index.html','true',[ 
		['PAGE','11201',jdecode('Contact%28follow+up+page%29'),jdecode(''),'/1590/11201.html','false',[],'','']
	],'','']];
var siteelementCount=30;
theSitetree.topTemplateName='Restaurant';
theSitetree.paletteFamily='50423D';
theSitetree.keyvisualId='11905';
theSitetree.keyvisualName='kv_11905.jpg';
theSitetree.fontsetId='33190';
theSitetree.graphicsetId='14092';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'fr',
  country: 'FR'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Restaurant',
				paletteFamily: 	'50423D',
				keyvisualId: 	'11905',
				keyvisualName: 	'kv_11905.jpg',
				fontsetId: 		'33190',
				graphicsetId: 	'14092',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '301',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '111701',
internalId:  '',
customField: '20100317-213714'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '301',
internalId:  '',
customField: '20100628-221157'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1401',
internalId:  '',
customField: '20100317-213431'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15501',
internalId:  '',
customField: '20100407-185355'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14322',
internalId:  '',
customField: '20100628-221604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '111001',
internalId:  '',
customField: '20100628-221911'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '108001',
internalId:  '',
customField: '20100317-121749'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47501',
internalId:  '',
customField: '20100628-222215'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49401',
internalId:  '',
customField: '20100628-222343'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52201',
internalId:  '',
customField: '20100628-222529'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53301',
internalId:  '',
customField: '20100628-222647'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54101',
internalId:  '',
customField: '20100628-222839'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22401',
internalId:  '',
customField: '20100117-180623'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12201',
internalId:  '',
customField: '20100301-192251'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20101',
internalId:  '',
customField: '20100317-123001'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92101',
internalId:  '',
customField: '20100120-182149'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92901',
internalId:  '',
customField: '20100317-123058'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1422',
internalId:  '',
customField: '20071105-203448'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55401',
internalId:  '',
customField: '20070915-132539'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23001',
internalId:  '',
customField: '20070323-220417'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23022',
internalId:  '',
customField: '20070401-154723'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24501',
internalId:  '',
customField: '20070323-222349'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24522',
internalId:  '',
customField: '20070401-154757'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24543',
internalId:  '',
customField: '20070401-154826'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23043',
internalId:  '',
customField: '20070323-220213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23064',
internalId:  '',
customField: '20070323-215600'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '73022',
internalId:  '',
customField: '20080920-121215'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1569',
internalId:  '',
customField: '20081226-105823'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1590',
internalId:  '',
customField: '20100428-200751'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11201',
internalId:  '',
customField: '20070224-210551'
};
webappMappings['7008']=webappMappings['7008-3473']={
webappId:    '7008',
documentId:  '1590',
internalId:  '3473',
customField: 'language:fr;country:FR;'
};
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0IN2TBZ';
var companyName   = 'Un+Chef+Chez+Vous';
var htmlTitle	  = '';
var metaKeywords  = '+Chef+a+domicile+-+Un+chef+de+cuisine+%C3%A0+domicile+-+chef+cuisinier++%C3%A0+domicile+pour+vos+soir%C3%A9es+-++cuisinier+priv%C3%A9+-+cuisinier+a+domicile+-+cuisine+fran%C3%A7aise+-++cuisine+gastronomique+-+cours+de+cuisine+-+repas+d%27affaires+-+cuisinier+priv%C3%A9+-+gastronomie+-+menus+-+invit%C3%A9s+-+cuisine+a+th%C3%A8mes+-+cuisine+%C3%A0+domicile+-+extra+de+cuisine+-+cuisinier+priv%C3%A9+France+et+%C3%A9tranger+-+cuisinier+extra+-+chef+de+cuisine+-+produits+maisons+-+buffet+dinatoire+-+huiles+parfum%C3%A9es+-+produits+artisanaux+-+cuisine+bien-%C3%AAtre+-';
var metaContents  = 'Chef+a+domicile+-+Un+Chef+de+cuisine++%C3%A0+domicile+-+cuisinier+a+domicile+-+Cuisinier+a+domicile+Gen%C3%A8ve+-+Site+de+cuisinier+a+domicile+-+cuisinier+priv%C3%A9+-Prestations+de+cuisine+%C3%A0+domicile+-+Menus-Menus+personnalis%C3%A9+-+sp%C3%A9cialit%C3%A9s+cours+de+cuisine+priv%C3%A9+-+gastronomie+-+buffet+dinatoire+-+cuisine+bien-%C3%AAtre+-+cuisine+cr%C3%A9ative+-';
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();
};
