/* [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('Accueil+luminoth%C3%A9rapie'),jdecode(''), jdecode('%2F401%2Findex.html'), 'true',[ 
		['PAGE','452',jdecode('Info+Luminoth%C3%A9rapie'),jdecode(''), jdecode('%2F401%2F452.html'), 'true',[],'',''],
		['PAGE','39301',jdecode('Caf%C3%A9-Contact'),jdecode(''), jdecode('%2F401%2F39301.html'), 'true',[],'',''],
		['PAGE','38901',jdecode('FAQ'),jdecode(''), jdecode('%2F401%2F38901.html'), 'true',[],'',''],
		['PAGE','38922',jdecode('Forum+Luminoth%C3%A9rapie'),jdecode(''), jdecode('%2F401%2F38922.html'), 'true',[],'','']
	],'',''],
	['PAGE','29101',jdecode('Les+lampes+de+luminoth%C3%A9rapie'),jdecode(''), jdecode('%2F29101%2Findex.html'), 'true',[ 
		['PAGE','30101',jdecode('Rondo'),jdecode(''), jdecode('%2F29101%2F30101.html'), 'true',[],'',''],
		['PAGE','30401',jdecode('Aurora'),jdecode(''), jdecode('%2F29101%2F30401.html'), 'true',[],'',''],
		['PAGE','30422',jdecode('Boston+Twin'),jdecode(''), jdecode('%2F29101%2F30422.html'), 'true',[],'',''],
		['PAGE','30443',jdecode('Lucia+2x36w'),jdecode(''), jdecode('%2F29101%2F30443.html'), 'true',[],'',''],
		['PAGE','30464',jdecode('Origo'),jdecode(''), jdecode('%2F29101%2F30464.html'), 'true',[],'',''],
		['PAGE','30485',jdecode('Manhattan'),jdecode(''), jdecode('%2F29101%2F30485.html'), 'true',[],'',''],
		['PAGE','30506',jdecode('Kubo'),jdecode(''), jdecode('%2F29101%2F30506.html'), 'true',[],'',''],
		['PAGE','30527',jdecode('Lucia+Mega+2x55+W'),jdecode(''), jdecode('%2F29101%2F30527.html'), 'true',[],'',''],
		['PAGE','30548',jdecode('Mesa+160'),jdecode(''), jdecode('%2F29101%2F30548.html'), 'true',[],'',''],
		['PAGE','30569',jdecode('Mesa+Mega+160+DIM'),jdecode(''), jdecode('%2F29101%2F30569.html'), 'true',[],'',''],
		['PAGE','30590',jdecode('Yasmina'),jdecode(''), jdecode('%2F29101%2F30590.html'), 'true',[],'','']
	],'',''],
	['PAGE','14901',jdecode('Commande+en+ligne'),jdecode(''), jdecode('%2F14901.html'), 'true',[],'',''],
	['PAGE','515',jdecode('Location+lampes'),jdecode(''), jdecode('%2F515.html'), 'true',[],'',''],
	['PAGE','18422',jdecode('Conditions+de+ventes%2Flivraison'),jdecode(''), jdecode('%2F18422.html'), 'true',[],'',''],
	['PAGE','578',jdecode('Contact'),jdecode(''), jdecode('%2F578.html'), 'true',[],'',''],
	['PAGE','18201',jdecode('Acc%C3%A8s+%2F+horaires'),jdecode(''), jdecode('%2F18201.html'), 'true',[],'',''],
	['PAGE','38501',jdecode('Qui+sommes-nous+'),jdecode(''), jdecode('%2F38501.html'), 'true',[],'',''],
	['PAGE','536',jdecode('Liens+%2F+Etudes+'),jdecode(''), jdecode('%2F536.html'), 'true',[],'',''],
	['PAGE','18401',jdecode('Espace+revendeur'),jdecode(''), jdecode('%2F18401.html'), 'true',[],'','']];
var siteelementCount=25;
theSitetree.topTemplateName='Vita02';
theSitetree.paletteFamily='C5E6FB';
theSitetree.keyvisualId='11283';
theSitetree.keyvisualName='kv_11283.jpg';
theSitetree.fontsetId='32116';
theSitetree.graphicsetId='13933';
theSitetree.contentColor='3C3D3C';
theSitetree.contentBGColor='F6FBFE';
var localeDef={
  language: 'fr',
  country: 'FR'
};
var prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2MH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Vita02',
				paletteFamily: 	'C5E6FB',
				keyvisualId: 	'11283',
				keyvisualName: 	'kv_11283.jpg',
				fontsetId: 		'32116',
				graphicsetId: 	'13933',
				contentColor: 	'3C3D3C',
				contentBGColor: 'F6FBFE',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20111113-151945'
};
webappMappings['7008']=webappMappings['7008-7516']={
webappId:    '7008',
documentId:  '578',
internalId:  '7516',
customField: 'language:fr;country:FR;'
};
webappMappings['4001']=webappMappings['4001-26769457']={
webappId:    '4001',
documentId:  '14901',
internalId:  '26769457',
customField: 'language:fr;country:FR;'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '18201',
internalId:  'location',
customField: 'language:fr;country:FR;isIncluded:false;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '452',
internalId:  '',
customField: '20111113-152444'
};
webappMappings['1501']=webappMappings['1501-33517589']={
webappId:    '1501',
documentId:  '401',
internalId:  '33517589',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '515',
internalId:  '',
customField: '20111113-150403'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '578',
internalId:  '',
customField: '20111025-142653'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18201',
internalId:  '',
customField: '20111113-152543'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18401',
internalId:  '',
customField: '20101128-220914'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18422',
internalId:  '',
customField: '20111025-135605'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14901',
internalId:  '',
customField: '20081123-163126'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '536',
internalId:  '',
customField: '20111113-150236'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30101',
internalId:  '',
customField: '20110602-141736'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30401',
internalId:  '',
customField: '20110602-135747'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29101',
internalId:  '',
customField: '20111025-114607'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30422',
internalId:  '',
customField: '20110602-143443'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30443',
internalId:  '',
customField: '20110602-144139'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30464',
internalId:  '',
customField: '20110602-170334'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30485',
internalId:  '',
customField: '20110602-171519'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30506',
internalId:  '',
customField: '20110602-173320'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30527',
internalId:  '',
customField: '20110602-174858'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30548',
internalId:  '',
customField: '20111025-115126'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30569',
internalId:  '',
customField: '20110602-181352'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30590',
internalId:  '',
customField: '20111025-115319'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38501',
internalId:  '',
customField: '20111025-143550'
};
webappMappings['1003']=webappMappings['1003-abw0x0in27871333b222fd7']={
webappId:    '1003',
documentId:  '38922',
internalId:  'abw0x0in27871333b222fd7',
customField: 'fr:FR'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38901',
internalId:  '',
customField: '20111113-151659'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38922',
internalId:  '',
customField: '20111025-150154'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39301',
internalId:  '',
customField: '20111025-152831'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0IN2787';
var companyName   = 'Lampes-Luminotherapie.ch';
var htmlTitle	  = 'lampes+de+luminotherapie';
var metaKeywords  = 'luminoth%C3%A9rapie%2C+luminotherapie%2C+luminoterapie%2C+luminotherapy%2C+lampes+de+luminoth%C3%A9rapie%2C+lampe+de+luminotherapie%2C+phototherapie%2C+lampes+luminotherapie%2C+location+de+lampes+de+luminotherapie%2C+magasin+luminotherapie%2C+luminotherapie+geneve%2C+luminotherapie+vaud%2C+luminotherapie+montreux%2C+mastercorner%2C+master+corner%2C+luminette%2C+innosol%2C+lampes+innosol%2C+luminettes%2C+location+luminotherapie%2C+traitement+de+luminotherapie%2C+';
var metaContents  = 'Entreprise+specialisee+dans+la+location+ou+la+vente+de+lampes+de+luminotherapie.+Explication+sur+la+luminoth%C3%A9rapie.+Location+et+vente+pour+des+traitements+de+luminotherapie';
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();
};

