/* [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(''), jdecode('%2F401%2Findex.html'), 'true',[ 
		['PAGE','452',jdecode('+A+propos+de+nous'),jdecode(''), jdecode('%2F401%2F452.html'), 'true',[],'',''],
		['PAGE','473',jdecode('Un+lieu+magique'),jdecode(''), jdecode('%2F401%2F473.html'), 'true',[],'',''],
		['PAGE','494',jdecode('Notre+philosophie'),jdecode(''), jdecode('%2F401%2F494.html'), 'true',[],'',''],
		['PAGE','515',jdecode('Direction%2C+employ%C3%A9s'),jdecode(''), jdecode('%2F401%2F515.html'), 'true',[],'','']
	],'',''],
	['PAGE','536',jdecode('PENSION'),jdecode(''), jdecode('%2F536%2Findex.html'), 'true',[ 
		['PAGE','557',jdecode('Les+chiens'),jdecode(''), jdecode('%2F536%2F557.html'), 'true',[],'',''],
		['PAGE','578',jdecode('Les+chats'),jdecode(''), jdecode('%2F536%2F578.html'), 'true',[],'',''],
		['PAGE','599',jdecode('Oiseaux%2C+rongeurs%2C+etc'),jdecode(''), jdecode('%2F536%2F599.html'), 'true',[],'','']
	],'',''],
	['PAGE','788',jdecode('R%C3%A9servations'),jdecode(''), jdecode('%2F788.html'), 'true',[],'',''],
	['PAGE','620',jdecode('Horaires+d%26%23x27%3Bouverture%2C+contact'),jdecode(''), jdecode('%2F620.html'), 'true',[],'',''],
	['PAGE','82801',jdecode('Contrat+de+pension+type'),jdecode(''), jdecode('%2F82801.html'), 'true',[],'',''],
	['PAGE','641',jdecode('Coordonn%C3%A9es'),jdecode(''), jdecode('%2F641%2Findex.html'), 'true',[ 
		['PAGE','662',jdecode('Photos+de+nos+pensionnaires'),jdecode(''), jdecode('%2F641%2F662.html'), 'true',[],'','']
	],'',''],
	['PAGE','42201',jdecode('Itin%C3%A9raire'),jdecode(''), jdecode('%2F42201%2Findex.html'), 'true',[ 
		['PAGE','62201',jdecode('Plan+d%26%23x27%3Bacces'),jdecode(''), jdecode('%2F42201%2F62201.html'), 'true',[],'',''],
		['PAGE','683',jdecode('Trucs+et+astuces'),jdecode(''), jdecode('%2F42201%2F683.html'), 'true',[],'','']
	],'',''],
	['PAGE','704',jdecode('Tarifs'),jdecode(''), jdecode('%2F704%2Findex.html'), 'true',[ 
		['PAGE','746',jdecode('Pensionnaires'),jdecode(''), jdecode('%2F704%2F746.html'), 'true',[],'','']
	],'',''],
	['PAGE','32601',jdecode('ELEVAGE'),jdecode(''), jdecode('%2F32601%2Findex.html'), 'true',[ 
		['PAGE','62222',jdecode('Etalons+'),jdecode(''), jdecode('%2F32601%2F62222.html'), 'true',[],'',''],
		['PAGE','63601',jdecode('Mamans'),jdecode(''), jdecode('%2F32601%2F63601.html'), 'true',[],'','']
	],'',''],
	['PAGE','71401',jdecode('Galerie+photos+elevage'),jdecode(''), jdecode('%2F71401%2Findex.html'), 'true',[ 
		['PAGE','13401',jdecode('Salon+de+toilettage'),jdecode(''), jdecode('%2F71401%2F13401.html'), 'true',[],'',''],
		['PAGE','13422',jdecode('Nourriture+sp%C3%A9cifique'),jdecode(''), jdecode('%2F71401%2F13422.html'), 'true',[],'','']
	],'',''],
	['PAGE','40901',jdecode('COURS+D+EDUCATION'),jdecode(''), jdecode('%2F40901.html'), 'true',[],'',''],
	['PAGE','63101',jdecode('Loi+pour+les+d%C3%A9tenteurs+de+chiens'),jdecode(''), jdecode('%2F63101.html'), 'true',[],'',''],
	['PAGE','24001',jdecode('Animaux+%C3%A0+placer'),jdecode(''), jdecode('%2F24001%2Findex.html'), 'true',[ 
		['PAGE','809',jdecode('Jobs'),jdecode(''), jdecode('%2F24001%2F809.html'), 'true',[],'','']
	],'',''],
	['PAGE','767',jdecode('Liens'),jdecode(''), jdecode('%2F767.html'), 'true',[],'',''],
	['PAGE','76901',jdecode('Championnat+suisse'),jdecode(''), jdecode('%2F76901.html'), 'true',[],'',''],
	['PAGE','81301',jdecode('Cheyenne'),jdecode(''), jdecode('%2F81301.html'), 'true',[],'','']];
var siteelementCount=32;
theSitetree.topTemplateName='Orbit';
theSitetree.paletteFamily='660000';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='172';
theSitetree.graphicsetId='208';
theSitetree.contentColor='CC9999';
theSitetree.contentBGColor='660000';
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: 			'Orbit',
				paletteFamily: 	'660000',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'172',
				graphicsetId: 	'208',
				contentColor: 	'CC9999',
				contentBGColor: '660000',
				a_color: 		'660000',
				b_color: 		'CC9999',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20110103-105449'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-20630095']={
webappId:    '1501',
documentId:  '401',
internalId:  '20630095',
customField: '1501'
};
webappMappings['7008']=webappMappings['7008-1350']={
webappId:    '7008',
documentId:  '788',
internalId:  '1350',
customField: 'language:fr;country:FR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '452',
internalId:  '',
customField: '20101221-162141'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '473',
internalId:  '',
customField: '20071222-220807'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '494',
internalId:  '',
customField: '20101221-162251'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '515',
internalId:  '',
customField: '20110103-102338'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '536',
internalId:  '',
customField: '20100810-115258'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '557',
internalId:  '',
customField: '20080522-224025'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '578',
internalId:  '',
customField: '20090907-190816'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '599',
internalId:  '',
customField: '20070821-163333'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '620',
internalId:  '',
customField: '20100817-112056'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '641',
internalId:  '',
customField: '20071222-221928'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '662',
internalId:  '',
customField: '20071216-013122'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42201',
internalId:  '',
customField: '20090723-175303'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '683',
internalId:  '',
customField: '20071222-222141'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '704',
internalId:  '',
customField: '20110103-103301'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '746',
internalId:  '',
customField: '20080324-125134'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '767',
internalId:  '',
customField: '20090907-185017'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '788',
internalId:  '',
customField: '20100810-115057'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '809',
internalId:  '',
customField: '20090221-003302'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13401',
internalId:  '',
customField: '20090221-002805'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13422',
internalId:  '',
customField: '20081130-222624'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24001',
internalId:  '',
customField: '20110103-104526'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32601',
internalId:  '',
customField: '20110412-155353'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40901',
internalId:  '',
customField: '20110412-174747'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82801',
internalId:  '',
customField: '20110103-103138'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '62201',
internalId:  'routing',
customField: 'fr_FR'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62201',
internalId:  '',
customField: '20091013-215041'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62222',
internalId:  '',
customField: '20100406-143342'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63601',
internalId:  '',
customField: '20100406-143636'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63101',
internalId:  '',
customField: '20090928-213003'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '71401',
internalId:  '',
customField: '20100223-201011'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76901',
internalId:  '',
customField: '20091119-111744'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81301',
internalId:  '',
customField: '20100407-175305'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0IN2L0I';
var companyName   = 'Bienvenue+au+Chenil%2Fchatterie+de+Bex';
var htmlTitle	  = 'www.chenildebex.ch';
var metaKeywords  = 'chien%2C+chat%2C+chenil%2C+pension%2C+hotel%2C+chatterie%2C+toilettage%2C+chiot%2C+bergers+allemands%2C+pension+chiens%2C+pension+chats%2C+bex%2C+chablais%2C+facheu+kamawa%2C+rocher+de+laigle%2C+ollon%2C+education+chiens%2C+salon+toilettage%2C+bergers+suisses%2C+fes%2C+elevage+de+chiens+bergers+allemands%2C+bergers+allemands+noirs';
var metaContents  = 'une+pension+5*+pour+votre+compagnion%2C+un+%EF%BF%BDlevage+de+bergers+allemands+poils+longs%2C+des+cours+deducation+canine%2C+une+chatterie%2C+un+salon+de+toilettage';
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();
};

