/* [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','601',jdecode('Home'),jdecode(''), jdecode('%2F601.html'), 'true',[],'',''],
	['PAGE','694',jdecode('Produits%2C+services'),jdecode(''), jdecode('%2F694%2Findex.html'), 'true',[ 
		['PAGE','41101',jdecode('Ferrotack+Nouveau%21%21'),jdecode(''), jdecode('%2F694%2F41101.html'), 'true',[],'',''],
		['PAGE','736',jdecode('Tuyaux+d%26%23x27%3Binjection'),jdecode(''), jdecode('%2F694%2F736.html'), 'true',[],'',''],
		['PAGE','53212',jdecode('Enduit+Ciment'),jdecode(''), jdecode('%2F694%2F53212.html'), 'true',[],'',''],
		['PAGE','715',jdecode('Enduit+Bitumineux'),jdecode(''), jdecode('%2F694%2F715.html'), 'true',[],'',''],
		['PAGE','11085',jdecode('Bentonite'),jdecode(''), jdecode('%2F694%2F11085.html'), 'true',[],'',''],
		['PAGE','11043',jdecode('DeltaMS+DeltaDrain+ect'),jdecode(''), jdecode('%2F694%2F11043.html'), 'true',[],'',''],
		['PAGE','757',jdecode('Bande+pour+joint'),jdecode(''), jdecode('%2F694%2F757.html'), 'true',[],'',''],
		['PAGE','11064',jdecode('Ruban+Etanche+PVC'),jdecode(''), jdecode('%2F694%2F11064.html'), 'true',[],'',''],
		['PAGE','11022',jdecode('Injection+Fissures'),jdecode(''), jdecode('%2F694%2F11022.html'), 'true',[],'','']
	],'',''],
	['PAGE','41701',jdecode('Contact'),jdecode(''), jdecode('%2F41701.html'), 'true',[],'','']];
var siteelementCount=12;
theSitetree.topTemplateName='Neon';
theSitetree.paletteFamily='6699CC';
theSitetree.keyvisualId='881';
theSitetree.keyvisualName='detail.jpg';
theSitetree.fontsetId='161';
theSitetree.graphicsetId='187';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='000000';
var localeDef={
  language: 'fr',
  country: 'FR'
};
var prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2MS'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Neon',
				paletteFamily: 	'6699CC',
				keyvisualId: 	'881',
				keyvisualName: 	'detail.jpg',
				fontsetId: 		'161',
				graphicsetId: 	'187',
				contentColor: 	'FFFFFF',
				contentBGColor: '000000',
				a_color: 		'000000',
				b_color: 		'666666',
				c_color: 		'000000',
				d_color: 		'6699CC',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '601',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-7085']={
webappId:    '7008',
documentId:  '41701',
internalId:  '7085',
customField: 'language:fr;country:FR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41101',
internalId:  '',
customField: '20111208-101638'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '601',
internalId:  '',
customField: '20111209-114258'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '694',
internalId:  '',
customField: '20081029-110405'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '736',
internalId:  '',
customField: '20111205-153320'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '715',
internalId:  '',
customField: '20111205-154759'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11085',
internalId:  '',
customField: '20090416-074632'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11043',
internalId:  '',
customField: '20111205-160611'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '757',
internalId:  '',
customField: '20111205-173728'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11064',
internalId:  '',
customField: '20111209-114653'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '53212',
internalId:  '-',
customField: '20111209-112736'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11022',
internalId:  '',
customField: '20111209-114958'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41701',
internalId:  '',
customField: '20090827-175237'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW1X0INEAGF';
var companyName   = 'Etanche+B%C3%A9ton+S%C3%A0rl';
var htmlTitle	  = 'Etancher+le+b%C3%A9ton+cest+notre+m%C3%A9tier%21%21%21';
var metaKeywords  = 'Etancheite+et+protection+du+beton+arme%2C+Injections+fissures%2C+pose+tuyaux+d+injection%2C+joint+combiflex%2C+Delta+MS%2C+Enduit+bitumineux+%28+Barrapren+ou+autre+%29%2C+Joint+Hydrogonflant%2C+Natte+de+Bentonite%2C+Isolations+enterrees+ect...Bentonite+Etancheite+et+protection+du+beton+arme%2C+Injections+fissures%2C+pose+tuyaux+d+injection%2C+joint+combiflex%2C+Delta+MS%2C+Enduit+bitumineux+%28+Barrapren+ou+autre+%29%2C+Joint+Hydrogonflant%2C+Natte+de+Bentonite%2C+Isolations+enterrees+ect...Etancheite+Beton+Arme%2C+Fuko%2C+Barrapren%2C+plastimul%2C+mapei%2C+sika%2C+Beton+Arme%2C+Geni+Civile%2C+Batiment%2C+Construction%2C+Perimate%2C+Bentonite%2C+rimebat%2C+isoteque%2C+santoli%2C+elpol%2C+biolley%2C+tmb%2C+moll%2C+morel%2C+mapei%2C+sika%2C+mbt%2C+gonon%2Cluxit%2C+perimate%2C+Bentonite+%2C+bentonique.www.bentonite.ch++Deltams%2C+DeltaDrain%2C+Inertol%2C+Sika%2C+Mapei%2C+Menadyer%2C+Basf.+ETANCHEITE%2C+etancheite%2C+etancheur%2C+ETANCHEUR%2CWWW.ETANCHEITE.CH%2C+www.etancheite.ch%2C+rimebat%2C+isotech%2C+molle++sa+%2C+biolley%2C+elpol+sa%2C+soletanche%2C+isoltech%2C+santoli%2C+ouvrage+enterre%2C+ouvrages+enter%3Fes.++plastofol+sulfiton%2CFUKO%2C+JECTO%2CPREDIMAX%2C+MASTERFLEX+%2C+ISOLTECH%2C+isotech%2C+mapelastic%2C+matebat+sa+%2C+jackodur%2Cwww.genetti.ch%2Fb_etanche.htm%2C+%EF%BF%BDtanche+B%EF%BF%BDton%2C+B%EF%BF%BDton+%EF%BF%BDtanche%2C+holcim';
var metaContents  = 'Etancheite+et+protection+du+beton+arme%2C+Injections+fissures%2C+pose+tuyaux+d+injection%2C+joint+combiflex%2C+Delta+MS%2C+Enduit+bitumineux+%28+Barrapren+ou+autre+%29%2C+Joint+Hydrogonflant%2C+Natte+de+Bentonite%2C+Isolations+enterrees+ect...Bentonite+Etancheite+et+protection+du+beton+arme%2C+Injections+fissures%2C+pose+tuyaux+d+injection%2C+joint+combiflex%2C+Delta+MS%2C+Enduit+bitumineux+%28+Barrapren+ou+autre+%29%2C+Joint+Hydrogonflant%2C+Natte+de+Bentonite%2C+Isolations+enterrees+ect...Etancheite+Beton+Arme%2C+Fuko%2C+Barrapren%2C+plastimul%2C+mapei%2C+sika%2C+Beton+Arme%2C+Geni+Civile%2C+Batiment%2C+Construction%2C+Perimate%2C+Bentonite%2C+rimebat%2C+isoteque%2C+santoli%2C+elpol%2C+biolley%2C+tmb%2C+moll%2C+morel%2C+mapei%2C+sika%2C+mbt%2C+gonon%2Cluxit%2C+perimate%2C+Bentonite+%2C+bentonique.www.bentonite.ch++Deltams%2C+DeltaDrain%2C+Inertol%2C+Sika%2C+Mapei%2C+Menadyer%2C+Basf.+ETANCHEITE%2C+etancheite%2C+etancheur%2C+ETANCHEUR%2CWWW.ETANCHEITE.CH%2C+www.etancheite.ch%2C+rimebat%2C+isotech%2C+molle++sa+%2C+biolley%2C+elpol+sa%2C+soletanche%2C+isoltech%2C+santoli%2C+ouvrage+enterre%2C+ouvrages+enter%3Fes.++plastofol+sulfiton%2CFUKO%2C+JECTO%2CPREDIMAX%2C+MASTERFLEX+%2C+ISOLTECH%2C+isotech%2C+mapelastic%2C+matebat+sa+%2C+jackodur%2C+www.genetti.ch%2Fb_etanche.htm%2C+%EF%BF%BDtanche+B%EF%BF%BDton%2C+B%EF%BF%BDton+%EF%BF%BDtanche%2C+holcim';
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();
};

