/* [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','4624',jdecode('Page+d%26%23x27%3Baccueil'),jdecode(''), jdecode('%2F4624.html'), 'true',[],'',''],
	['PAGE','4681',jdecode('Notre+h%C3%B4tel'),jdecode(''), jdecode('%2F4681%2Findex.html'), 'true',[ 
		['PAGE','4708',jdecode('Les+chambres'),jdecode(''), jdecode('%2F4681%2F4708.html'), 'true',[],'',''],
		['PAGE','4735',jdecode('Restaurant'),jdecode(''), jdecode('%2F4681%2F4735.html'), 'true',[],'','']
	],'',''],
	['PAGE','4762',jdecode('Prix+et+Offres'),jdecode(''), jdecode('%2F4762.html'), 'true',[],'',''],
	['PAGE','4789',jdecode('R%C3%A9servation+en+ligne'),jdecode(''), jdecode('%2F4789%2Findex.html'), 'true',[ 
		['PAGE','19632',jdecode('Demandes+en+ligne+%28Folgeseite%29'),jdecode(''), jdecode('%2F4789%2F19632.html'), 'false',[],'','']
	],'',''],
	['PAGE','19444',jdecode('Activit%C3%A9s+dans+la+r%C3%A9gion'),jdecode(''), jdecode('%2F19444.html'), 'true',[],'',''],
	['PAGE','4816',jdecode('Contact+%2F+Situation+'),jdecode(''), jdecode('%2F4816.html'), 'true',[],'','']];
var siteelementCount=9;
theSitetree.topTemplateName='Comedy';
theSitetree.paletteFamily='4871C0';
theSitetree.keyvisualId='2798';
theSitetree.keyvisualName='schnecke.jpg';
theSitetree.fontsetId='10422';
theSitetree.graphicsetId='10722';
theSitetree.contentColor='EBEFF8';
theSitetree.contentBGColor='698BCB';
var localeDef={
  language: 'fr',
  country: 'FR'
};
var prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2QE'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Comedy',
				paletteFamily: 	'4871C0',
				keyvisualId: 	'2798',
				keyvisualName: 	'schnecke.jpg',
				fontsetId: 		'10422',
				graphicsetId: 	'10722',
				contentColor: 	'EBEFF8',
				contentBGColor: '698BCB',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'36599C',
				e_color: 		'36599C',
				f_color: 		'36599C',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4624',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4624',
internalId:  '',
customField: '20110512-164156'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4681',
internalId:  '',
customField: '20110512-164438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4708',
internalId:  '',
customField: '20100518-103752'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4735',
internalId:  '',
customField: '20110317-154138'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4762',
internalId:  '',
customField: '20110317-152540'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4789',
internalId:  '',
customField: '20100402-205801'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19632',
internalId:  '',
customField: '20050410-190059'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19444',
internalId:  '',
customField: '20110128-110805'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4816',
internalId:  '',
customField: '20100811-182612'
};
webappMappings['7008']=webappMappings['7008-4021']={
webappId:    '7008',
documentId:  '4789',
internalId:  '4021',
customField: 'language:fr;country:FR;'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0INXS3T';
var companyName   = 'H%C3%B4tel+des+Haud%C3%A8res';
var htmlTitle	  = 'H%C3%B4tel+des+Haud%C3%A8res';
var metaKeywords  = 'hotel+valais+prix+r%C3%A9servation+fournier+evolene+les+haud%C3%A8res+suisse+dent+blanche+chamonix+zermatt+ski+snowboard+raquette+vinea+reines+randonn%C3%A9es+vacances+montagne+mont+blanc+cervin+soleil+vtt+v%C3%A9lo+grand+raid+pdg+grimpe+cascade+veisivi+melezes+hermitage+la+sage+kurhaus+pigne+mont+collon+sion+';
var metaContents  = 'head%21-+-+Metadata+generated+by+http%3A%2F%2Fwww.conchita.ch+-+-META+http-equiv%3DContent-type+content%3Dtext%2Fhtml%3B+charset%3DISO-8859-1titleHotel+des+Hauderes%2FtitleMETA+name%3Ddescription+content%3DHotel+familial%2C+style+chalet%2C+situeacute%3B+au+coeur+de+valais%2C+en+Suisse.+Station+deacute%3Bteacute%3B+%28VTT%2C+parapente%2C+randonneacute%3Bes%2C+tennis%29%2C+station+dhiver+%28ski%2C+snowboard%2C+raquette..%29+Haute+route+Chamonix-Zermatt.META+name%3Dkeywords+content%3Dhotel%2Cevolegrave%3Bne%2Cvalais%2Csuisse%2Cnature%2Cfamille%2Calpes%2Cmontagne%2Cdent-blanche%2Cgrande+dixence%2Clac+bleu%2Cski%2Craquette%2Cpatrouille+des+glaciers%2Cneige%2Csoleil%2Chaute+route%2Cchamonix%2Czermatt%2Cvacances%2Cvtt%2Ctennis%2Cgrand+raid%2Cmatterhorn%2CcervinMETA+name%3Drobots+content%3DallMETA+http-equiv%3DContent-Language+content%3Dfr-CHMETA+name%3Dauthor+content%3DA+FournierMETA+http-equiv%3DReply-to+content%3Dhoteldeshauderes%40bluewin.chLINK+rev%3D+made+href%3Dmailto%3Ahoteldeshauderes%40bluewin.chMETA+name%3Dcopyright+content%3Dcopy%3B2005-hoteldeshauderes.ch%2Fhead';
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();
};

