/* [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/index.html','true',[ 
		['PAGE','71501',jdecode('Qui+sommes-nous%3F'),jdecode(''),'/401/71501.html','false',[],'',''],
		['PAGE','36101',jdecode('nos+services+'),jdecode(''),'/401/36101.html','false',[],'','']
	],'',''],
	['PAGE','33201',jdecode('Nos+ap%C3%A9ritifs'),jdecode(''),'/33201.html','false',[],'',''],
	['PAGE','139201',jdecode('Nos+amuses+bouches'),jdecode(''),'/139201.html','false',[],'',''],
	['PAGE','41601',jdecode('Cocktail+dinatoire'),jdecode(''),'/41601.html','false',[],'',''],
	['PAGE','54501',jdecode('Nos+menus'),jdecode(''),'/54501.html','false',[],'',''],
	['PAGE','145301',jdecode('Nos+buffets'),jdecode(''),'/145301.html','false',[],'',''],
	['PAGE','157801',jdecode('Nos+broches+'),jdecode(''),'/157801.html','false',[],'',''],
	['PAGE','164401',jdecode('Nos+boissons+et+vins'),jdecode(''),'/164401.html','false',[],'',''],
	['PAGE','167501',jdecode('Nos+salles+'),jdecode(''),'/167501.html','false',[],'',''],
	['PAGE','164901',jdecode('Formulaire+de+contact'),jdecode(''),'/164901.html','false',[],'','']];
var siteelementCount=12;
theSitetree.topTemplateName='Roses';
theSitetree.paletteFamily='FFE5E5';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10744';
theSitetree.graphicsetId='10825';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFE5E5';
var localeDef={
  language: 'fr',
  country: 'FR'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Roses',
				paletteFamily: 	'FFE5E5',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10744',
				graphicsetId: 	'10825',
				contentColor: 	'000000',
				contentBGColor: 'FFE5E5',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'787878',
				e_color: 		'9D584B',
				f_color: 		'9D584B',
				hasCustomLogo: 	'true',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '157801',
internalId:  '',
customField: '20090620-144400'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20090708-154627'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '71501',
internalId:  '',
customField: '20090620-135533'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36101',
internalId:  '',
customField: '20090620-135627'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '167501',
internalId:  '',
customField: '20090718-114941'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41601',
internalId:  '',
customField: '20090708-214210'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '145301',
internalId:  '',
customField: '20090620-135849'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33201',
internalId:  '',
customField: '20090708-180006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '164401',
internalId:  '',
customField: '20090623-234940'
};
webappMappings['7008']=webappMappings['7008-6351']={
webappId:    '7008',
documentId:  '164901',
internalId:  '6351',
customField: 'language:fr;country:FR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '164901',
internalId:  '',
customField: '20090624-001433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54501',
internalId:  '',
customField: '20090713-112106'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '139201',
internalId:  '',
customField: '20090708-165355'
};
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0IN2V2F';
var companyName   = 'Service+Traiteur+la+cezille+';
var htmlTitle	  = '';
var metaKeywords  = 'immobilier++%2C++investissement+thailande+%2C+++investissement+polynesie%2C+++++retour+sur+investissement+%2C+++revenu+locatif+++%2C++capital++%2C+fond+propre++%2C++tourisme+%2C+++paradisiaque+++%2C+complex%2C++++hotel%2C++appartements+%2C+villas++%2C+++penthouse+++%2C++studio+++%2C+++fort+rendement++++%2C++business+%2C+++bail+%2C+++r%C3%A9sidence+secondaire+%2C+villa+de+luxe+%2C+loueur+meubl%C3%A9+professionel+%2C+LMP+LMNP%2Cdevenir+propri%C3%A9taire%2Cs%C3%A9n%C3%A9gal++immobilier+thailande+%2Cimmobilier+espagne+%2Cimmobilier+s%C3%A9n%C3%A9gal%2Cimmobilier+polyn%C3%A9sie%2Cgolf+resort+%2Cpassion+du+golf+%2Cjack+nicklaus%2Cforum+immobilier+international%2Csud+de+la+france%2Cc%C3%B4te+dazur%2Cdomaine+du+ventoux+%2Cdomaine+de+manon%2Cdomaine+du+golf+%2Ccap+dagde%2Cle+saint+clair%2Cstatut+lmp%2Clmnp%2Cd%C3%A9fiscalisation+r%C3%A9sidence+de+tourisme%2Cretraite';
var metaContents  = 'investissement+immobilier++de+tourisme+international%2C+%28+thailande+%2C+polyn%C3%A9sie+%2Cespagne%2Cs%C3%A9n%C3%A9gal+%29immobilier+thailande+%2C+investissement+polyn%C3%A9sie%2C+++retour+sur+investissement+%2Crevenu+locatif+%2Ccapital%2Cfond+propre+%2Ctourisme%2Cparadisiaque%2Ccomplex%2Chotel%2Cappartements%2Cvillas%2Cpenthouse%2C++studio%2Cfort+rendement+%2Cbusiness%2Cbail%2Cr%C3%A9sidence+secondaire%2Cvilla+de+luxe%2Clmp+%2Clmnp%2Ccomment+devenir+propri%C3%A9taire+en+thailande+%2Cgolf+resort+%2Cjack+nicklaus%2Cmurcia%2Csaly%2Cmoorea%2Cimmobilier+thailande+%2Cimmobilier+espagne%2Cimmobilier+s%C3%A9n%C3%A9gal+%2Cimmobilier+polyn%C3%A9sie%2Cpassion+du+golf+%2Cforum+immobilier+international%2Csud+de+la+france+%2Cc%C3%B4te+dazur%2Cdomaine+de+manon%2Cdomaine+de+ventoux%2Cdomaine+du+golf%2Ccap+dagde%2Clanguedoc+roussillon%2Cvar+%2Cstatut+lmp%2Clmnp%2Cd%C3%A9fiscalisation%2Cle+saint+clair+%2Cr%C3%A9sidence+de+tourisme%2Cretraite';
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();
};
