/* [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','4631',jdecode('+B%26B+Bed+and+Breakfast+bnb+Chambres+Rooms+'),jdecode(''),'/4631/index.html','true',[ 
		['PAGE','4658',jdecode('Contact'),jdecode(''),'/4631/4658.html','true',[],'',''],
		['PAGE','4972',jdecode('Plan++%2F+Map'),jdecode(''),'/4631/4972.html','true',[],'',''],
		['PAGE','5007',jdecode('Itin%C3%A9raire+%2F+Way+to'),jdecode(''),'/4631/5007.html','true',[],'',''],
		['PAGE','17102',jdecode('Transports+'),jdecode(''),'/4631/17102.html','true',[],'',''],
		['PAGE','28701',jdecode('Sports+%2F+Bien-%C3%AAtre'),jdecode(''),'/4631/28701.html','true',[],'',''],
		['PAGE','28722',jdecode('Culture'),jdecode(''),'/4631/28722.html','true',[],'',''],
		['PAGE','30701',jdecode('M%C3%A9t%C3%A9o'),jdecode(''),'/4631/30701.html','true',[],'','']
	],'',''],
	['PAGE','4604',jdecode('GALERIE'),jdecode(''),'/4604/index.html','true',[ 
		['PAGE','42701',jdecode('Fanny+Begoin+'),jdecode(''),'/4604/42701.html','true',[],'',''],
		['PAGE','44401',jdecode('Ilinca+Vlad'),jdecode(''),'/4604/44401.html','true',[],'',''],
		['PAGE','43001',jdecode('Gilles+Pidoux'),jdecode(''),'/4604/43001.html','true',[],'',''],
		['PAGE','15214',jdecode('Pierre-Yves+Gabioud'),jdecode(''),'/4604/15214.html','true',[],'',''],
		['PAGE','20101',jdecode('Christian+Probst'),jdecode(''),'/4604/20101.html','true',[],'',''],
		['PAGE','23424',jdecode('Christine+Rouvi%C3%A8re'),jdecode(''),'/4604/23424.html','true',[],'',''],
		['PAGE','18179',jdecode('Plonk+%26+Replonk'),jdecode(''),'/4604/18179.html','true',[],'','']
	],'',''],
	['PAGE','4520',jdecode('9+3%2F4'),jdecode(''),'/4520.html','true',[],'',''],
	['PAGE','26901',jdecode('Recommandations'),jdecode(''),'/26901.html','true',[],'',''],
	['PAGE','27601',jdecode('Partenaires'),jdecode(''),'/27601.html','true',[],'',''],
	['PAGE','9929',jdecode('Histoire+locale+%2F+Local+history'),jdecode(''),'/9929.html','true',[],'',''],
	['PAGE','4577',jdecode('Boutique'),jdecode(''),'/4577/index.html','true',[ 
		['PAGE','11503',jdecode('Soie'),jdecode(''),'/4577/11503.html','true',[],'',''],
		['PAGE','11530',jdecode('Lin'),jdecode(''),'/4577/11530.html','true',[],'',''],
		['PAGE','11557',jdecode('Foulard+et+ch%C3%A2les'),jdecode(''),'/4577/11557.html','true',[],'',''],
		['PAGE','11584',jdecode('Lampes'),jdecode(''),'/4577/11584.html','true',[],'',''],
		['PAGE','11611',jdecode('Vases'),jdecode(''),'/4577/11611.html','true',[],'',''],
		['PAGE','11638',jdecode('Meubles'),jdecode(''),'/4577/11638.html','true',[],'',''],
		['PAGE','11665',jdecode('Pare-feu'),jdecode(''),'/4577/11665.html','true',[],'','']
	],'',''],
	['PAGE','9902',jdecode('Architecture'),jdecode(''),'/9902/index.html','true',[ 
		['PAGE','19804',jdecode('Journ%C3%A9es+du+patrimoine+2005'),jdecode(''),'/9902/19804.html','true',[],'','']
	],'',''],
	['PAGE','18647',jdecode('Revue+de+presse+%2F+Press+Review'),jdecode(''),'/18647/index.html','true',[ 
		['PAGE','20502',jdecode('+B%C3%A2tir+'),jdecode(''),'/18647/20502.html','true',[],'','']
	],'','']];
var siteelementCount=32;
theSitetree.topTemplateName='Galerie';
theSitetree.paletteFamily='FFFFCC';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='73';
theSitetree.graphicsetId='96';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='DAD6A7';
var localeDef={
  language: 'fr',
  country: 'FR'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Galerie',
				paletteFamily: 	'FFFFCC',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'73',
				graphicsetId: 	'96',
				contentColor: 	'000000',
				contentBGColor: 'DAD6A7',
				a_color: 		'FFFFCC',
				b_color: 		'003333',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '4972',
internalId:  'location',
customField: 'language:fr;country:FR;isIncluded:false;'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '5007',
internalId:  'routing',
customField: 'fr_FR'
};
webappMappings['1501']=webappMappings['1501-1501']={
webappId:    '1501',
documentId:  '4631',
internalId:  '1501',
customField: '1501'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4631',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4631',
internalId:  '',
customField: '20100722-101755'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9902',
internalId:  '',
customField: '20080820-081638'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26901',
internalId:  '',
customField: '20100609-161622'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27601',
internalId:  '',
customField: '20080820-170439'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4577',
internalId:  '',
customField: '20060711-191004'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4520',
internalId:  '',
customField: '20090324-132754'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5007',
internalId:  '',
customField: '20050226-162805'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4658',
internalId:  '',
customField: '20090609-101751'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4972',
internalId:  '',
customField: '20050322-223919'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17102',
internalId:  '',
customField: '20080820-130327'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28701',
internalId:  '',
customField: '20080820-135158'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28722',
internalId:  '',
customField: '20081127-163232'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30701',
internalId:  '',
customField: '20080831-175935'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9929',
internalId:  '',
customField: '20081001-083332'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11503',
internalId:  '',
customField: '20070516-203730'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11530',
internalId:  '',
customField: '20050225-185910'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11557',
internalId:  '',
customField: '20070516-204016'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11584',
internalId:  '',
customField: '20070516-203954'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11611',
internalId:  '',
customField: '20070516-203904'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11638',
internalId:  '',
customField: '20070516-203816'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11665',
internalId:  '',
customField: '20050311-174239'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4604',
internalId:  '',
customField: '20100722-080726'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15214',
internalId:  '',
customField: '20070516-184812'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18179',
internalId:  '',
customField: '20060711-183608'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20101',
internalId:  '',
customField: '20060711-184325'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23424',
internalId:  '',
customField: '20080118-180231'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19804',
internalId:  '',
customField: '20051208-215348'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18647',
internalId:  '',
customField: '20080820-113111'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20502',
internalId:  '',
customField: '20051130-215633'
};
webappMappings['1501']=webappMappings['1501-1238881']={
webappId:    '1501',
documentId:  '4631',
internalId:  '1238881',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44401',
internalId:  '',
customField: '20100722-081136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42701',
internalId:  '',
customField: '20100722-081327'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43001',
internalId:  '',
customField: '20100609-132838'
};
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0INX2IH';
var companyName   = 'Neuf+Trois+Quarts';
var htmlTitle	  = '';
var metaKeywords  = 'B+and+B%2C+bed+and+breakfast%2C+bnb%2C+bed%2C+breakfast%2C+chambres%2C+charme%2C+hotes%2C+gay%2C+gayfriendly%2C+hotel%2C+chambre%2C+camere%2C+room%2C+zimmer%2C+hebergement%2C+louer%2C+rent%2C+Alpes%2C+lac%2C+Leman%2C+Suisse%2C+Switzerland%2C+Valais%2C+Vaud%2C+Gruyere%2C+Lausanne%2C+Vevey%2C+Montreux%2C+Jazz%2C+Diablerets%2C+Lavaux%2C+Balthus%2C+Rossiniere%2C+Zermatt%2C+Montreux+Palace%2C+Musee+%2C++Giannada%2C+Martigny%2C+Elysee%2C++Chaplin%2C+Dalai+Lama%2C+Galerie%2C+galery+%2C+photographie+%2C+photography%2C+photographe+%2C+bijoux+%2C+verres+de+Murano+%2C+Ilinca+Vlad%2C+Fanny+Begoin%2C+grands+formats';
var metaContents  = '+immeuble+prive%2C+centre+ville%2C++Wifi%2C+A9%2C+Gare.++Erster+Stock+eines+privaten+Gebaude+im+Stadtzentrum%2C+hohe+Decken%2C++Wifi%2C+Bahnhof.++Al+primo+piano+di+un+immobile+privato%2C+in+centro+citta%2C+soffitti+elevati%2C++Wifi%2C+stazzione%2C++downtown%2C++Wifi%2C+train+station%2C+Galerie%2C+galery%2C+photographie%2C+photography+%2C+photographe+%2C+bijoux%2C+verres+de+Murano%2C+Ilinca+Vlad+%2C+Fanny+Begoin%2C+grands+formats+';
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();
};
