/* [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','4455',jdecode('Home'),jdecode(''),'/4455.html','true',[],'',''],
	['PAGE','4512',jdecode('Qui+sommes-nous%3F'),jdecode(''),'/4512/index.html','true',[ 
		['PAGE','125186',jdecode('Notre+%C3%A9quipe'),jdecode(''),'/4512/125186.html','true',[],'','']
	],'',''],
	['PAGE','125584',jdecode('Mat%C3%A9riel+en+location+'),jdecode(''),'/125584.html','true',[],'',''],
	['PAGE','125365',jdecode('Crealed+-+vente+'),jdecode(''),'/125365/index.html','true',[ 
		['PAGE','125374',jdecode('La+LED+qu%26%23x27%3Best-ce+que+c%26%23x27%3Best%3F'),jdecode(''),'/125365/125374.html','true',[],'',''],
		['PAGE','125383',jdecode('Nos+r%C3%A9alisations+'),jdecode(''),'/125365/125383.html','true',[],'','']
	],'',''],
	['PAGE','25560',jdecode('Nos+r%C3%A9f%C3%A9rences'),jdecode(''),'/25560.html','true',[],'',''],
	['PAGE','38525',jdecode('Archives+photos'),jdecode(''),'/38525/index.html','true',[ 
		['PAGE','41598',jdecode('Architecture+'),jdecode(''),'/38525/41598.html','true',[],'',''],
		['PAGE','42363',jdecode('Com%C3%A9die+musicale'),jdecode(''),'/38525/42363.html','true',[],'',''],
		['PAGE','65212',jdecode('Concert'),jdecode(''),'/38525/65212.html','true',[],'',''],
		['PAGE','42131',jdecode('Ev%C3%A9nement'),jdecode(''),'/38525/42131.html','true',[],'',''],
		['PAGE','41837',jdecode('Festival'),jdecode(''),'/38525/41837.html','true',[],'',''],
		['PAGE','125622',jdecode('Stand+'),jdecode(''),'/38525/125622.html','true',[],'',''],
		['PAGE','41891',jdecode('Th%C3%A9%C3%A2tre'),jdecode(''),'/38525/41891.html','true',[],'','']
	],'',''],
	['PAGE','5029',jdecode('Contact'),jdecode(''),'/5029/index.html','true',[ 
		['PAGE','6308',jdecode('Contact+%28Folgeseite%29'),jdecode(''),'/5029/6308.html','false',[],'','']
	],'',''],
	['PAGE','67313',jdecode('Comment+nous+trouver'),jdecode(''),'/67313.html','true',[],'',''],
	['PAGE','67912',jdecode('Liens+'),jdecode(''),'/67912.html','true',[],'',''],
	['PAGE','105888',jdecode('Actualit%C3%A9s'),jdecode(''),'/105888.html','true',[],'',''],
	['PAGE','123367',jdecode('Livre+d%26%23x27%3Bor'),jdecode(''),'/123367/index.html','true',[ 
		['PAGE','123366',jdecode('Entr%C3%A9es'),jdecode(''),'/123367/123366.html','false',[],'','']
	],'','']];
var siteelementCount=23;
theSitetree.topTemplateName='Movement';
theSitetree.paletteFamily='003390';
theSitetree.keyvisualId='1819';
theSitetree.keyvisualName='kv_dummy.jpg';
theSitetree.fontsetId='289';
theSitetree.graphicsetId='353';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='003390';
var localeDef={
  language: 'fr',
  country: 'FR'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Movement',
				paletteFamily: 	'003390',
				keyvisualId: 	'1819',
				keyvisualName: 	'kv_dummy.jpg',
				fontsetId: 		'289',
				graphicsetId: 	'353',
				contentColor: 	'FFFFFF',
				contentBGColor: '003390',
				a_color: 		'003390',
				b_color: 		'000000',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4455',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-1480060']={
webappId:    '1501',
documentId:  '4455',
internalId:  '1480060',
customField: '1501'
};
webappMappings['7008']=webappMappings['7008-4287']={
webappId:    '7008',
documentId:  '5029',
internalId:  '4287',
customField: 'language:fr;country:FR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '125584',
internalId:  '',
customField: '20100605-000447'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '67313',
internalId:  'routing',
customField: 'fr_FR'
};
webappMappings['1002']=webappMappings['1002-123367abw0x0inxe4m']={
webappId:    '1002',
documentId:  '123367',
internalId:  '123367abw0x0inxe4m',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4512',
internalId:  '',
customField: '20100604-233924'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4455',
internalId:  '',
customField: '20090506-130621'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '125622',
internalId:  '',
customField: '20100605-005936'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25560',
internalId:  '',
customField: '20091007-162215'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38525',
internalId:  '',
customField: '20091007-182209'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41598',
internalId:  '',
customField: '20051209-130712'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42131',
internalId:  '',
customField: '20060117-131143'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42363',
internalId:  '',
customField: '20051209-131041'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65212',
internalId:  '',
customField: '20051209-131147'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41837',
internalId:  '',
customField: '20051209-110836'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '125186',
internalId:  '',
customField: '20100604-233956'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '125365',
internalId:  '',
customField: '20091007-160935'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '125383',
internalId:  '',
customField: '20100604-234023'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '125374',
internalId:  '',
customField: '20091007-154618'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41891',
internalId:  '',
customField: '20051209-131348'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5029',
internalId:  '',
customField: '20091007-145513'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6308',
internalId:  '',
customField: '20030410-174607'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67313',
internalId:  '',
customField: '20040720-162512'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67912',
internalId:  '',
customField: '20091007-145647'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '105888',
internalId:  '',
customField: '20100604-234535'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '123367',
internalId:  '',
customField: '20071001-132544'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '123366',
internalId:  '',
customField: '20071001-132544'
};
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0INXE4M';
var companyName   = '+les+lumi%C3%A8res+de+l%27%C3%A9v%C3%A9nement';
var htmlTitle	  = 'Loc+Light+-+les+lumi%C3%A8res+de+l%27%C3%A9v%C3%A9nement';
var metaKeywords  = 'Loc+Light+';
var metaContents  = 'Location+de+mat%EF%BF%BDriel+d%EF%BF%BDclairage+et+technique+du+spectacle+architecture+et+conception+';
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();
};
