/* [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(''), jdecode('%2F301.html'), 'true',[],'',''],
	['PAGE','1401',jdecode('Pr%C3%A9sentation'),jdecode(''), jdecode('%2F1401%2Findex.html'), 'true',[ 
		['PAGE','15501',jdecode('Ma+philosophie'),jdecode(''), jdecode('%2F1401%2F15501.html'), 'true',[],'',''],
		['PAGE','1422',jdecode('Le+concept'),jdecode(''), jdecode('%2F1401%2F1422.html'), 'true',[],'',''],
		['PAGE','55401',jdecode('Revue+de+Presse'),jdecode(''), jdecode('%2F1401%2F55401.html'), 'true',[],'','']
	],'',''],
	['PAGE','47501',jdecode('Automne+hiver'),jdecode(''), jdecode('%2F47501%2Findex.html'), 'true',[ 
		['PAGE','49401',jdecode('Entr%C3%A9es'),jdecode(''), jdecode('%2F47501%2F49401.html'), 'true',[],'',''],
		['PAGE','52201',jdecode('Poissons'),jdecode(''), jdecode('%2F47501%2F52201.html'), 'true',[],'',''],
		['PAGE','53301',jdecode('Viandes'),jdecode(''), jdecode('%2F47501%2F53301.html'), 'true',[],'',''],
		['PAGE','54101',jdecode('Douceurs'),jdecode(''), jdecode('%2F47501%2F54101.html'), 'true',[],'','']
	],'',''],
	['PAGE','22401',jdecode('La+cave'),jdecode(''), jdecode('%2F22401%2Findex.html'), 'true',[ 
		['PAGE','23001',jdecode('Les+blancs'),jdecode(''), jdecode('%2F22401%2F23001.html'), 'true',[],'',''],
		['PAGE','23022',jdecode('Les+Bourgognes'),jdecode(''), jdecode('%2F22401%2F23022.html'), 'true',[],'',''],
		['PAGE','24501',jdecode('Les+Bordeaux'),jdecode(''), jdecode('%2F22401%2F24501.html'), 'true',[],'',''],
		['PAGE','24522',jdecode('Les+Beaujolais'),jdecode(''), jdecode('%2F22401%2F24522.html'), 'true',[],'',''],
		['PAGE','24543',jdecode('Les+C%C3%B4tes+du+Rh%C3%B4ne'),jdecode(''), jdecode('%2F22401%2F24543.html'), 'true',[],'',''],
		['PAGE','23043',jdecode('Les+doux'),jdecode(''), jdecode('%2F22401%2F23043.html'), 'true',[],'',''],
		['PAGE','23064',jdecode('Les+Champagnes'),jdecode(''), jdecode('%2F22401%2F23064.html'), 'true',[],'','']
	],'',''],
	['PAGE','12201',jdecode('Cours+de+cuisine'),jdecode(''), jdecode('%2F12201.html'), 'true',[],'',''],
	['PAGE','20101',jdecode('Produits+Maison'),jdecode(''), jdecode('%2F20101%2Findex.html'), 'true',[ 
		['PAGE','92101',jdecode('Mes+cr%C3%A9ations'),jdecode(''), jdecode('%2F20101%2F92101.html'), 'true',[],'',''],
		['PAGE','92901',jdecode('Commandes'),jdecode(''), jdecode('%2F20101%2F92901.html'), 'true',[],'',''],
		['PAGE','73022',jdecode('D%C3%A9positaires'),jdecode(''), jdecode('%2F20101%2F73022.html'), 'true',[],'','']
	],'',''],
	['PAGE','1569',jdecode('Tarifs'),jdecode(''), jdecode('%2F1569.html'), 'true',[],'',''],
	['PAGE','1590',jdecode('Contact'),jdecode(''), jdecode('%2F1590%2Findex.html'), 'true',[ 
		['PAGE','11201',jdecode('Contact%28follow+up+page%29'),jdecode(''), jdecode('%2F1590%2F11201.html'), 'false',[],'','']
	],'','']];
var siteelementCount=26;
theSitetree.topTemplateName='Picture';
theSitetree.paletteFamily='F6EEDE';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10428';
theSitetree.graphicsetId='10751';
theSitetree.contentColor='4D3B17';
theSitetree.contentBGColor='F6EEDE';
var localeDef={
  language: 'fr',
  country: 'FR'
};
var prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2MX'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Picture',
				paletteFamily: 	'F6EEDE',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10428',
				graphicsetId: 	'10751',
				contentColor: 	'4D3B17',
				contentBGColor: 'F6EEDE',
				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:  '301',
internalId:  '',
customField: '20111024-211750'
};
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:  '47501',
internalId:  '',
customField: '20111024-212948'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49401',
internalId:  '',
customField: '20111024-205933'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52201',
internalId:  '',
customField: '20111024-210556'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53301',
internalId:  '',
customField: '20111024-210729'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54101',
internalId:  '',
customField: '20111024-213143'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22401',
internalId:  '',
customField: '20110314-224808'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12201',
internalId:  '',
customField: '20100301-192251'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20101',
internalId:  '',
customField: '20110314-225234'
};
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 webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0IN2TBZ';
var companyName   = 'Un+Chef+Chez+Vous';
var htmlTitle	  = 'cuisinier+a+domicile';
var metaKeywords  = '+CHEF+de++CUISINE++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();
};

