/* [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+de+situation+%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+%2F+How+to+move'),jdecode(''),'/4631/17102.html','true',[],'',''],
		['PAGE','25280',jdecode('Tourisme+%2F+Tourism'),jdecode(''),'/4631/25280.html','true',[],'',''],
		['PAGE','28701',jdecode('Sport+%2Fwellness'),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','25505',jdecode('Ev%C3%A9nements+%2F+Events'),jdecode(''),'/4631/25505.html','true',[],'',''],
		['PAGE','25429',jdecode('Jazz'),jdecode(''),'/4631/25429.html','true',[],'','']
	],'',''],
	['PAGE','39901',jdecode('Livre+d%26%23x27%3Bor+-+Golden+book'),jdecode(''),'/39901.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','4604',jdecode('Galerie+'),jdecode(''),'/4604/index.html','true',[ 
		['PAGE','15214',jdecode('Pierre-Yves+Gabioud'),jdecode(''),'/4604/15214.html','true',[],'',''],
		['PAGE','18179',jdecode('Plonk+%26+Replonk'),jdecode(''),'/4604/18179.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','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=33;
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: '20091112-174619'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9902',
internalId:  '',
customField: '20080820-081638'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26901',
internalId:  '',
customField: '20090807-145040'
};
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:  '25280',
internalId:  '',
customField: '20090324-132844'
};
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:  '25505',
internalId:  '',
customField: '20081126-103023'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25429',
internalId:  '',
customField: '20090120-140514'
};
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: '20060711-203552'
};
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['1002']=webappMappings['1002-39901abw0x0inx2ih']={
webappId:    '1002',
documentId:  '39901',
internalId:  '39901abw0x0inx2ih',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39901',
internalId:  '',
customField: '20090825-120658'
};
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0INX2IH';
var companyName   = 'Neuf+Trois+Quarts';
var htmlTitle	  = 'BB+Bed+and+Breakfast+bnb+chambres+rooms+Montreux+Riviera+Switzerland';
var metaKeywords  = 'B+and+B%2C+bed+and+breakfast%2C+bnb%2C+bed%2C+breakfast%2C+chambres%2C+hotes%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%2CPhotographie+%2CElysee+%2C+Bains+Lavey%2C+personnes+handicapees%2C+Chaplin%2C+Dalai+Lama%2C+a+louer%2C+studios%2C+2+pi%EF%BF%BDces%2C+duplex%2C+Vieille+Ville%2C+vue+panoramique';
var metaContents  = '1er+etage%2C+immeuble+prive+de+1900%2C+renove%2C+centre+ville%2C+entree+privative+%285+m2%29%2C+grande+chambre+%2830m2%29%2C+hauts+plafonds+%283.5m%29%2C+bain+et+douche%2C+elegant%2C+lumineux%2C+confortable%2C+Wifi%2C+A9%2C+Gare.++Erster+Stock+eines+privaten%2C+aus+dem+Jahr+1900+stammenden%2C+renovierten+Gebaude+im+Stadtzentrum%2C+mit+Flur+%285+m2%29%2C+grosse+Zimmer+%2830m2%29%2C+hohe+Decken%2C+Bad++Dusche%2C+sehr+gemutlich+und+hell%2C+Wifi%2C+Bahnhof.++Al+primo+piano+di+un+immobile+privato+del+1900%2C+rinovato%2C+in+centro+citta%2C+con+atrio+%285+m2%29%2C+camera+spaziosa+%2830+m2%29%2C+soffitti+elevati%2C+bagno+e+doccia%2C+elegante%2C+luminoso%2C+confortevole%2C+Wifi%2C+stazzione.+++First+floor+of+a+private+renovated+building+%28built+in+1900%29%2C+downtown%2C+with+entrance+%285+m2%29%2C+spacious+bedroom+%2830m2%29%2C+high+ceiling%2C+bath++shower%2C+elegant%2C+bright%2C+cosy%2C+Wifi%2C+train+station.+++9+3%2F4%2C+une+esthetique%2C+un+art+de+vivre%2C+classicisme+et+baroque%2C+elitisme+urbain+et+savoir-vivre+rural%2C+purete+des+lignes%2C+noblesse+des+matieres+anciennes%2C+recherche+du+detail.+Declinaison+sur+plusieurs+niveaux%2C+une+partie+privative%2C+une+arcade+commerciale+avec+galerie%2C+une+partie+chambres+d+hotes.++';
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();
};
