/* [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 theSitetree=[ 
	['PAGE','401',jdecode('Home'),jdecode(''),'/401/index.html','true',[ 
		['PAGE','38001',jdecode('Devenez+revendeur'),jdecode(''),'/401/38001.html','true',[],'']
	],''],
	['PAGE','452',jdecode('Qui+sommes-nous%3F'),jdecode(''),'/452.html','true',[],''],
	['PAGE','515',jdecode('Produits%2C+services'),jdecode(''),'/515/index.html','true',[ 
		['PAGE','536',jdecode('Syst%C3%A8me+d%26%23x27%3Balarme+'),jdecode(''),'/515/536.html','true',[],''],
		['PAGE','557',jdecode('Vid%C3%A9osurveillance'),jdecode(''),'/515/557.html','true',[],''],
		['PAGE','96901',jdecode('Microdrone-h%C3%A9licopt%C3%A8re'),jdecode(''),'/515/96901.html','true',[],''],
		['PAGE','95101',jdecode('Thermographie+infrarouge'),jdecode(''),'/515/95101.html','true',[],''],
		['PAGE','19401',jdecode('Enregistreurs'),jdecode(''),'/515/19401.html','true',[],''],
		['PAGE','578',jdecode('Contr%C3%B4le+d%26%23x27%3Bacc%C3%A8s'),jdecode(''),'/515/578.html','true',[],''],
		['PAGE','23701',jdecode('Coffres-forts'),jdecode(''),'/515/23701.html','true',[],''],
		['PAGE','24901',jdecode('Interphone+vid%C3%A9o'),jdecode(''),'/515/24901.html','true',[],'']
	],''],
	['PAGE','13001',jdecode('Service+de+location'),jdecode(''),'/13001.html','true',[],''],
	['PAGE','599',jdecode('Offres'),jdecode(''),'/599.html','true',[],''],
	['PAGE','620',jdecode('Actualit%C3%A9s'),jdecode(''),'/620.html','true',[],''],
	['PAGE','704',jdecode('Contact'),jdecode(''),'/704.html','true',[],''],
	['PAGE','767',jdecode('Notre+conseil'),jdecode(''),'/767.html','true',[],''],
	['PAGE','10001',jdecode('Acc%C3%A8s'),jdecode(''),'/10001.html','true',[],'']];
var siteelementCount=18;
theSitetree.topTemplateName='Sportive';
theSitetree.paletteFamily='FADE8A';
theSitetree.keyvisualId='2663';
theSitetree.keyvisualName='digital1.jpg';
theSitetree.fontsetId='221';
theSitetree.graphicsetId='261';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FADE8A';
var localeDef={
  language: 'fr',
  country: 'FR'
};
var theTemplate={
				name: 			'Sportive',
				paletteFamily: 	'FADE8A',
				keyvisualId: 	'2663',
				keyvisualName: 	'digital1.jpg',
				fontsetId: 		'221',
				graphicsetId: 	'261',
				contentColor: 	'000000',
				contentBGColor: 'FADE8A',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'FADE8A',
				b_color: 		'D0B976',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-3157']={
webappId:    '7008',
documentId:  '704',
internalId:  '3157',
customField: 'language:fr;country:FR;'
};
webappMappings['7008']=webappMappings['7008-3158']={
webappId:    '7008',
documentId:  '13001',
internalId:  '3158',
customField: 'language:fr;country:FR;'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '10001',
internalId:  'location',
customField: 'language:fr;country:FR;isIncluded:false;'
};
webappMappings['7008']=webappMappings['7008-3159']={
webappId:    '7008',
documentId:  '599',
internalId:  '3159',
customField: 'language:fr;country:FR;'
};
webappMappings['1501']=webappMappings['1501-11009810']={
webappId:    '1501',
documentId:  '401',
internalId:  '11009810',
customField: '1501'
};
webappMappings['7008']=webappMappings['7008-3160']={
webappId:    '7008',
documentId:  '38001',
internalId:  '3160',
customField: 'language:fr;country:FR;'
};
webappMappings['7008']=webappMappings['7008-3161']={
webappId:    '7008',
documentId:  '24901',
internalId:  '3161',
customField: 'language:fr;country:FR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20081203-204502'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '452',
internalId:  '',
customField: '20090317-203955'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '515',
internalId:  '',
customField: '20090317-204321'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '599',
internalId:  '',
customField: '20090317-204043'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '767',
internalId:  '',
customField: '20090317-204125'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '620',
internalId:  '',
customField: '20090317-204221'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13001',
internalId:  '',
customField: '20090317-204244'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '704',
internalId:  '',
customField: '20070210-135410'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96901',
internalId:  '',
customField: '20081203-204654'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '95101',
internalId:  '',
customField: '20090317-204504'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24901',
internalId:  '',
customField: '20090317-204532'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '536',
internalId:  '',
customField: '20090317-204602'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38001',
internalId:  '',
customField: '20071206-154320'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '557',
internalId:  '',
customField: '20080107-143445'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19401',
internalId:  '',
customField: '20070830-164100'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '578',
internalId:  '',
customField: '20071221-154347'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23701',
internalId:  '',
customField: '20071204-202800'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10001',
internalId:  '',
customField: '20070209-112540'
};
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0IN2Y0D';
var companyName   = 'Global%27Security+S.A.';
var htmlTitle	  = 'Syst%C3%A8me+dalarme';
var metaKeywords  = 'Alarme%2C+alarme%2C+Alarmes%2C+alarmes%2C+vid%C3%A9osurveillance%2C+vid%C3%A9osurveillances%2C+vid%C3%A9o+surveillance%2C+vid%C3%A9o+surveillances%2C+vid%C3%A9o+de+surveillance%2C+vid%C3%A9o+de+surveillances%2C+cam%C3%A9ra%2C+cam%C3%A9ras%2C+cam%C3%A9ra+surveillance%2C+cam%C3%A9ras+surveillances%2C+cam%C3%A9ras+de+surveillances%2C+protection%2C+protections%2C+service+de+protection%2C+services+de+protections%2C+protection+service%2C+protections+services%2C+s%C3%A9curit%C3%A9%2C+sos%2C+s.o.s%2C+s%C3%A9curit%C3%A9e%2C+service+de+s%C3%A9curit%C3%A9%2C+security%2C+global+security%2C+s%C3%A9curity+global%2C+voleurs%2C+voleur%2C+aide%2C+syst%C3%A8me+de+s%C3%A9curit%C3%A9%2C+syst%C3%A8me+dalarme%2C+syst%C3%A8me+de+protection%2C+villa%2C+appartement%2C+renens%2C+lausanne%2C+suisse+romande%2C+d%C3%A9tection+dactivit%C3%A9%2C+d%C3%A9tection+dactivit%C3%A9e%2C+d%C3%A9tections+dactivit%C3%A9s%2C+ir%2C+IR%2C+infrarouge%2C+infra+rouge%2C+infra-rouge%2C+d%C3%A9tecteur%2C+d%C3%A9tecteurs%2C+contr%C3%B4le+dacc%C3%A8s%2C+empreinte%2C+empreintes%2C+biom%C3%A9trics%2C+biom%C3%A9trique%2C+code+dacc%C3%A8s%2C+contr%C3%B4le+dempreinte%2C+syst%C3%A8me+de+contr%C3%B4le%2C+patrouille%2C+patrouilles%2C+rondes%2C+ronde%2C+surveillance%2C+enqu%C3%AAte%2C+enqu%C3%AAtes%2C+discr%C3%A9tion%2C+accompagnement%2C+chauffeur%2C+chauffeurs%2C+solution%2C+solutions%2C+parc%2C+vol+%C3%A0+l%C3%A9talage%2C+vol%2C+voleur%2C+voleurs%2C+voleuses%2C+magasin%2C+magasins%2C+dispositif+de+surveillance%2C+dispositif+anti-vol%2C';
var metaContents  = 'Alarme%2C+alarme%2C+Alarmes%2C+alarmes%2C+vid%C3%A9osurveillance%2C+vid%C3%A9osurveillances%2C+vid%C3%A9o+surveillance%2C+vid%C3%A9o+surveillances%2C+vid%C3%A9o+de+surveillance%2C+vid%C3%A9o+de+surveillances%2C+cam%C3%A9ra%2C+cam%C3%A9ras%2C+cam%C3%A9ra+surveillance%2C+cam%C3%A9ras+surveillances%2C+cam%C3%A9ras+de+surveillances%2C+protection%2C+protections%2C+service+de+protection%2C+services+de+protections%2C+protection+service%2C+protections+services%2C+s%C3%A9curit%C3%A9%2C+sos%2C+s.o.s%2C+s%C3%A9curit%C3%A9e%2C+service+de+s%C3%A9curit%C3%A9%2C+security%2C+global+security%2C+s%C3%A9curity+global%2C+voleurs%2C+voleur%2C+aide%2C+syst%C3%A8me+de+s%C3%A9curit%C3%A9%2C+syst%C3%A8me+dalarme%2C+syst%C3%A8me+de+protection%2C+villa%2C+appartement%2C+renens%2C+lausanne%2C+suisse+romande%2C+d%C3%A9tection+dactivit%C3%A9%2C+d%C3%A9tection+dactivit%C3%A9e%2C+d%C3%A9tections+dactivit%C3%A9s%2C+ir%2C+IR%2C+infrarouge%2C+infra+rouge%2C+infra-rouge%2C+d%C3%A9tecteur%2C+d%C3%A9tecteurs%2C+contr%C3%B4le+dacc%C3%A8s%2C+empreinte%2C+empreintes%2C+biom%C3%A9trics%2C+biom%C3%A9trique%2C+code+dacc%C3%A8s%2C+contr%C3%B4le+dempreinte%2C+syst%C3%A8me+de+contr%C3%B4le%2C+patrouille%2C+patrouilles%2C+rondes%2C+ronde%2C+surveillance%2C+enqu%C3%AAte%2C+enqu%C3%AAtes%2C+discr%C3%A9tion%2C+accompagnement%2C+chauffeur%2C+chauffeurs%2C+solution%2C+solutions%2C+parc%2C+vol+%C3%A0+l%C3%A9talage%2C+vol%2C+voleur%2C+voleurs%2C+voleuses%2C+magasin%2C+magasins%2C+dispositif+de+surveillance%2C+dispositif+anti-vol%2C';
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();
};

