/* [17/01/2008]*/
/*
Variables
General functions
Data functions
Navigation functions
Display functions
*/

//-----------------------------------
//VARIABLES
//-----------------------------------
var ie = (document.all && document.getElementById) ? true : false;
var ns6 = (!document.all && document.getElementById) ? true : false;
var ns4 = (document.layers) ? true : false;
var dsm_youarehere='';
var vlines=new Array();
var vlines2=new Array();
var header=new Array();
var cookieEnabled=(navigator.cookieEnabled)? true : false

if(dsm_parameters[0]!='LOCAL') dsm_parameters[0]='';
if(dsm_parameters[1]!='') dsm_parameters[3]='<img width=265 src="'+dsm_parameters[1]+'" border=0>';
if(dsm_parameters[1]=='' && dsm_parameters[3]=='') dsm_parameters[3]='<img width=265 height=1 src="/icons/ecblank.gif" border=0>';
if(dsm_parameters[2]=='') dsm_parameters[2]='#FFFFFF';


/**
 * SWFObject v1.5.1: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */
if(typeof deconcept=="undefined"){var deconcept={};}if(typeof deconcept.util=="undefined"){deconcept.util={};}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil={};}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params={};this.variables={};this.attributes=[];if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10]||"";},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15]||"";},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=[];var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+(this.getAttribute("style")||"")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+(this.getAttribute("style")||"")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;



// ***************************************************
// fonctions utilisées dans les tableaux de valeurs
function navigate(n){
  cursor = cursor + n;
  if(cursor<0) cursor=0;
  if(cursor>tab[0].length-1) cursor=tab[0].length-1;
  writeColumn();
}
function writeColumn1(){writeColumn();}
function writeColumn2(){writeColumn();}
function writeColumn3(){writeColumn();}
function writeColumn(){
  for(i=0;i<tab.length;i++){
    var field = document.getElementById(i);
    field.align="center";
    field.align="center";
    field.innerHTML = "<b>"+tab[i][cursor]+"</b>";
  }
}
// ***************************************************

String.prototype.replaceAll=function(s1,s2){
return this.split(s1).join(s2);
}
String.prototype.trim=function(){
s=this;
return s.replace(/^\s*/,'').replace(/\s*$/, '');
}

Array.prototype.indexOf=function(s){
for(var i=0;i<this.length;i++) if(this[i]==s) return i;
return -1;
}
Array.prototype.trim=function(){
var a=new Array();
var j=0;
for(var i=0;i<this.length;i++){
	if(this[i]!=''){
		a[j]=this[i];
		j++;
	}
}
return a;
}
//[18/04/2007]
Array.prototype.indexOf=function(s){
  for(var i=0;i<this.length;i++){
  	if(this[i]==s) return i;
  }
  return -1;
}
function isMail(s) {
  if(s.length>0){
  	var i = s.indexOf('@');
  	var j = s.lastIndexOf('.');
        if(i>0 && j>i+1) return true;
  }
  return false;
}
function isNumeric(sText){
  var ValidChars = "0123456789.";
  var IsNumber=true;
  var Char;
  for (i = 0; i < sText.length && IsNumber == true; i++){ 
    Char = sText.charAt(i); 
    if (ValidChars.indexOf(Char) == -1){IsNumber = false;}
  }
  return IsNumber;
}
function noEnterKey () { //use : onKeyPress="return noEnterKey();"
	if (ie) {
		k=event.keyCode;
		if ( k=='13' ) return false;
		else return true;
	}
}
function catchForNetscape(e) {
     if ( e.which == '13' ) return false;
     else return true;
}
function setCookie (name,value,days) {
if (days) {var date=new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires="; expires="+date.toGMTString();}
else expires="";
document.cookie=name+"="+value+expires+"; path=/";}

function getCookie (name) {
var nameEQ=name+"=";
var ca=document.cookie.split(';');
for(var i=0;i<ca.length;i++) {var c=ca[i];
while (c.charAt(0)==' ') c=c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);}
return null;}

/*Popup window with and without scroll*/
function doWindow (u,width,height,name) {var newwin=window.open(u, name,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width='+width+',height='+height);}
function doWindow2 (u,width,height,name) {var newwin=window.open(u, name,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width='+width+',height='+height);}

function getParameter (queryString,parameterName){
var parameterName=parameterName+"=";
if (queryString.length>0){
	begin=queryString.indexOf(parameterName);
	if (begin!=-1){
		begin+=parameterName.length;end=queryString.indexOf("&",begin);
		if (end==-1) {end=queryString.length};
		return unescape(queryString.substring(begin,end));
	}
	return "null";
}
}

function setParameter2 (queryString,pname,p) {
if (p!='null' & p!=null & p!='undefined' & p !='') {
if (queryString.indexOf('#')!=-1){queryString=queryString.substring(0,queryString.indexOf('#'))}
if (queryString.indexOf('?')==-1){queryString='/Web/Extranet/ExtraMain.nsf?OpenDatabase'}
if (queryString.indexOf(pname)==-1){return queryString+'&'+pname+'='+p}
else {return queryString.substring(0,queryString.indexOf(pname)-1)+'&'+pname+'='+p}}
else {return ''}
}

function setParameter (url,newparam,newvalue){
var all=url.split("&");
var newurl='';
var ind=url.indexOf('&'+newparam);
if(ind<0) return url+'&'+newparam+'='+newvalue;
for(var i=0;i<all.length;i++){
	ind=all[i].indexOf('=');
	param=all[i].slice(0,ind);
	if(param==newparam){
		var j=ind;
		while(j<all[i].length & all[i].charAt(j)!='&' & all[i].charAt(j)!='!' & all[i].charAt(j)!='#' & all[i].charAt(j)!='?' ){
			j++;
		}
		all[i]=param+'='+newvalue+all[i].substring(j,all[i].length);		
	}
	newurl+=all[i]+'&'
}
newurl=newurl.slice(0,newurl.length-1);
return newurl;
}

function getShortID(s){
i=s.lastIndexOf('-');
return s.substr(i+1, s.length-i);
}

function writeLayer(id,txt){
if(ie) document.all[id].innerHTML=txt;
if(ns6)document.getElementById(id).innerHTML=txt;
if(ns4){
}
}
//-----------------------------------
//DATA FUNCTIONS
//-----------------------------------
function doLine(line){vlines[vlines.length]=line.split('#@#');}
function doLine2(line){vlines2[vlines2.length]=line.split('#@#');}
function doHeader(line){header=line.split('#@#');}
//-----------------------------------
//NAVIGATION FUNCTIONS
//-----------------------------------
function doSearch(){
var ss=document.forms[0].search.value;
dsm_tracker=dsm_tracker+'SearchQuery='+ss;
if(ss!=""){
ss=ss.replaceAll('+','?');
ss=ss.replaceAll('"','?');
ss=ss.replaceAll('(','?');
ss=ss.replaceAll(')','?');
ss=ss.replaceAll(' ','*+AND+*');
ss=ss.replaceAll('*+AND+**+AND+*','*+AND+*');
ss='*'+ss+'*';
query=ss;
	document.location='/'+dsm_webdbname+'/Search?SearchView&Category='+dsm_skin+'-'+dsm_languagesite+'-mainsearch&SearchMax=0&Query=[DocumentLanguage]co('+dsm_languagesite+')+AND+'+query;
}
}

/* [11/01/2007] write a message id */
function writeMsg(id){
  var msg = dsm_msg[id];
  if(msg!=null){
    document.write(msg);
  }else{
    document.write('not found : '+id);
  }
}
/* [23/06/2007] get a message */
function getMsg(id){
  var msg = dsm_msg[id];
  if(msg!=null){
    return msg;
  }else{
    return 'not found : '+id;
  }
}

function getNavAttribute(id,att){
for(z=0; z<nav.length;z++){
	var c=nav[z].children;
	var x=0;
	if(c.length>0){for(x=0; x < c.length; x++ ){ if( c[x].id==id ) return eval('c[x].'+att);}}
}
return -1;
}


function getNavColour(id){
	for(i=0;i<nav_colours.length;i++){
		if(nav_colours[i][0]==id) return nav_colours[i];
	}
	return nav_colours[0];
}

//C1L:C1:C1T:C1U:C2:C2T:C2U:C3:C3T:C3U:C4:C4T:C4U:C5:C5T:C5U
//parametres : langue, id c1,titre c1, url c1
function doYouAreHere(z){
	var x=z.split('#@#');

	id=getShortID(dsm_viewcategory1); //detecter premier niveau pour affichage de nav right
	if(id=='') id=getShortID(dsm_viewcurrentcategory); //c'est un doc non categorisé ou un formulaire special
	//regles par defauts
	path='/'+dsm_skin+'_img/';
	s1='navL1white';
	i1=path+'nav_'+id+'.jpg';
	if(x[4]=='') i3='/icons/ecblank.gif';
	else i3=path+'nav_'+getShortID(x[4])+'.jpg';
	p1=path+'picto_'+id+'.gif';
	var label2='';
	if(x[2]!='') label2=x[2];

	//les couleurs du premier niveau : cf init.js
	var nav_right=new Array();
	nav_right=getNavColour(id);
	c1=nav_right[1];
	c3=nav_right[2];
	
	//[2006/09/21] remplace le titre donné pour le referencement
	var webTitle='';
	if(x[2]!='')  webTitle+=' - '+x[2];
	if(x[5]!='')  webTitle+=' - '+x[5];
	if(x[8]!='')  webTitle+=' - '+x[8];
	if(x[11]!='') webTitle+=' - '+x[11];
	if(x[14]!='') webTitle+=' - '+x[14];

	switch(id){
		case "sitemap":webTitle=getMsg(4);break;
		case "mainsearch":webTitle=getMsg(5);break;
		//default:c1='#FFCC66';c3='#FAE1AF';break;
	}
	//[10/10/2006]
	document.title=getMsg(21)+webTitle;

	//toutes les pages non categorisées
	if(dsm_viewcategory1==''){
		switch(getShortID(dsm_documentid)){
			case "termsofuse":i1=path+'nav_'+id+'.jpg';i3='/icons/ecblank.gif';label2=getMsg(2);break;
			case "helpsearch":i1=path+'nav_mainsearch.jpg';i3='/icons/ecblank.gif';label2=getMsg(13);break;
			default :i1='/icons/ecblank.gif';i3='/icons/ecblank.gif';label2='';break;
		}
	}


//dsm_parameters[2]=c3; removed on 01/2006

//CENTER TOP PART
//dsm_youarehere='<TABLE WIDTH=543 BORDER=1 CELLPADDING=3 CELLSPACING=0><TR><TD WIDTH=543 BGCOLOR='+menu_param[0]+' class="navL2">';
dsm_youarehere='<TABLE WIDTH=797 BORDER=0 CELLPADDING=3 CELLSPACING=0><TR><TD WIDTH=797 BGCOLOR='+menu_param[0]+' class="navL2">';
dsm_youarehere+='<SPAN CLASS="navL2">'+getMsg(0)+'</SPAN><A HREF="/'+dsm_webdbname+'/DocumentsHomePage/'+dsm_skin+'-'+dsm_languagesite+'-home?OpenDocument" CLASS="navL2">'+getMsg(1)+'</A>';
//check for label
if(x[1]!='') dsm_youarehere+=' > '+label2;
if(x[4]!='') dsm_youarehere+=' > <A HREF="'+x[6]+'" CLASS="navL2">'+x[5]+'</A>';
if(x[7]!='') dsm_youarehere+=' > <A HREF="'+x[9]+'" CLASS="navL2">'+x[8]+'</A>';
if(x[10]!='') dsm_youarehere+=' > <A HREF="'+x[12]+'" CLASS="navL2">'+x[11]+'</A>';
if(x[13]!='')dsm_youarehere+=' > '+x[15];
dsm_youarehere+='</TD></TR></TABLE>';
if(id=='home'){}
else{
	// determiner si une colomne ou deux
	currentid=getShortID(dsm_viewcurrentcategory);
	// dsm_parameters[2]=c3; removed on 01/2006
	if(dsm_documentid==''){ //que les listes
		//if(currentid=='services_presentation'|currentid=='intro_products'|currentid=='sales_links'){
		//	dsm_parameters[0]=path+'nav_'+getShortID(x[4])+'_right.jpg';
		//	i3='/icons/ecblank.gif';
		//}
	}
	else{ //dans un doc
		if(dsm_parameters[0]!='') i3='/icons/ecblank.gif';
	}

	var here = '';
	//here += '<TABLE WIDTH=543 BORDER=0 CELLPADDING=0 CELLSPACING=0>';
	here += '<TABLE WIDTH=797 BORDER=0 CELLPADDING=0 CELLSPACING=0>';
	separator='<TR><TD COLSPAN=5 WIDTH=797 HEIGHT=1><IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=1></TD></TR>';
	here += separator;
	here += '<TR><TD WIDTH=265 BGCOLOR='+c1+' CLASS="'+s1+'">&nbsp;</TD>';
	here += '<TD WIDTH=1><IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=1></TD>';
	here += '<TD WIDTH=265 BGCOLOR='+c1+' CLASS="'+s1+'">&nbsp;</TD>';
	here += '<TD WIDTH=1><IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=1></TD>';
	here += '<TD WIDTH=265 BGCOLOR='+c3+' CLASS="'+s1+'">&nbsp;</TD></TR>';
	here += separator;
	here += '<TR><TD WIDTH=265 CLASS="'+s1+'" BGCOLOR='+c1+'><IMG SRC="'+i1+'" WIDTH=265 HEIGHT=58></TD>';
	here += '<TD WIDTH=1><IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=1></TD>';
	here += '<TD WIDTH=265 CLASS="'+s1+'" BGCOLOR='+c1+' VALIGN=BOTTOM>&nbsp;'+label2.toUpperCase()+'</TD>';
	here += '<TD WIDTH=1><IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=1></TD>';
	here += '<TD WIDTH=265 CLASS="'+s1+'" BGCOLOR='+c3+'><IMG SRC="'+i3+'" WIDTH=265 HEIGHT=58></TD></TR>';
	here += separator;
	here += '<TR><TD WIDTH=265 BGCOLOR='+c1+' CLASS="'+s1+'">&nbsp;</TD>';
	here += '<TD WIDTH=1><IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=1></TD>';
	here += '<TD WIDTH=265 BGCOLOR='+c1+' CLASS="'+s1+'">&nbsp;</TD>';
	here += '<TD WIDTH=1><IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=1></TD>';
	here += '<TD WIDTH=265 BGCOLOR='+c3+' CLASS="'+s1+'">&nbsp;</TD></TR>';
	here += separator;
	/*
	here += '<TR><TD WIDTH=179 BGCOLOR='+c1+' CLASS="'+s1+'">&nbsp;</TD>';
	here += '<TD WIDTH=3><IMG SRC="/icons/ecblank.gif" WIDTH=3 HEIGHT=1></TD>';
	here += '<TD WIDTH=179 BGCOLOR='+c1+' CLASS="'+s1+'">&nbsp;</TD>';
	here += '<TD WIDTH=3><IMG SRC="/icons/ecblank.gif" WIDTH=3 HEIGHT=1></TD>';
	here += '<TD WIDTH=179 BGCOLOR='+c3+' CLASS="'+s1+'">&nbsp;</TD></TR>';
	here += separator;
	here += '<TR><TD WIDTH=179 CLASS="'+s1+'" BGCOLOR='+c1+'><IMG SRC="'+i1+'" WIDTH=179 HEIGHT=58></TD>';
	here += '<TD WIDTH=3><IMG SRC="/icons/ecblank.gif" WIDTH=3 HEIGHT=1></TD>';
	here += '<TD WIDTH=179 CLASS="'+s1+'" BGCOLOR='+c1+' VALIGN=BOTTOM>&nbsp;'+label2.toUpperCase()+'</TD>';
	here += '<TD WIDTH=3><IMG SRC="/icons/ecblank.gif" WIDTH=3 HEIGHT=1></TD>';
	here += '<TD WIDTH=179 CLASS="'+s1+'" BGCOLOR='+c3+'><IMG SRC="'+i3+'" WIDTH=179 HEIGHT=58></TD></TR>';
	here += separator;
	here += '<TR><TD WIDTH=179 BGCOLOR='+c1+' CLASS="'+s1+'">&nbsp;</TD>';
	here += '<TD WIDTH=3><IMG SRC="/icons/ecblank.gif" WIDTH=3 HEIGHT=1></TD>';
	here += '<TD WIDTH=179 BGCOLOR='+c1+' CLASS="'+s1+'">&nbsp;</TD>';
	here += '<TD WIDTH=3><IMG SRC="/icons/ecblank.gif" WIDTH=3 HEIGHT=1></TD>';
	here += '<TD WIDTH=179 BGCOLOR='+c3+' CLASS="'+s1+'">&nbsp;</TD></TR>';
	here += separator;
	*/
	here += '</TABLE>';
	dsm_youarehere+=here;
}
}



//-----------------------------------
//DISPLAY FUNCTIONS
//-----------------------------------

Array.prototype.printForm=function(){
var tmp='';
for(var i=0;i<this.length;i++) if(this[i]!='') tmp+=this[i]+'<BR>'
return tmp;
}

function displaySkinHeader(){
  if(typeof dsm_parameters[10]=='undefined') dsm_parameters[10]='';
	if(dsm_parameters[10]!='') {
		displayPrintHeader();
	}else{
		if(!ns4) writeLayer('leftnav', dsm_leftnav);
		document.write(dsm_toppane);
		document.write(dsm_leftpane);
		document.write(dsm_rightpane);
		
		if(navHeaderIsFlash){
      var flashfile = '/'+dsm_skin+'_img/nav_header_'+dsm_languagesite+'.swf';
      var so = new SWFObject(flashfile, "flashheader", "797", "59", "4", "#FFFFFF");  
      so.write("flashheader");
    }
	}
}
function displaySkinFooter(){
	//mode impression
	if(dsm_parameters[10]!=''){
		displayPrintFooter();
	}
	else document.write(dsm_bottompane)
}

/*[11/04/2007] print logo header is language dependant*/
function displayPrintHeader(){
var tmp='';
tmp+='<TABLE WIDTH=640 CELLSPACING=0 CELLPADDING=3 BORDER=0><TR><TD WIDTH=100% CLASS="default">';
tmp+='<IMG SRC="/ims_common_img/nav_imslogo.gif" WIDTH=60 HEIGHT=59><IMG SRC="/'+dsm_skin+'_img/nav_logo_'+dsm_languagesite+'.gif" WIDTH=143 HEIGHT=59><BR><BR>';
document.write(tmp);
}
function displayPrintFooter(){
var tmp='</TD></TR></TABLE>';
tmp='<DIV ALIGN="center">'+getMsg(19)+'</DIV>'
document.write(tmp);
}

function displayStdFooter(parameters){
	document.write(getStdFooter(parameters));
}

// ex : getXmlTag('<a>hello</a>', 'a') returns hello
function getXmlTag(s, tag){
  var i = s.indexOf('<'+tag+'>');
  var j = s.indexOf('</'+tag+'>');
  var content = '';
  if(i<j && i>-1 && j>-1){
    content = s.substring(i+tag.length+2, j);
  }
  return content;
}


function getStdFooter(parameters){
	//parameters: DocumentID,Printable,SendToAFriend,@Implode(RelatedInternal;"#@#"),@Implode(RelatedExternal;"#@#"),@Implode(DownloadList;"#@#"), @Implode(LookupMultilingualLinksXML;"#@#");;
	//il faut etre en mode normal et non impression
	if(dsm_parameters[10]!='')return '';
	var x=parameters.split('#@@#');
	var y=new Array();
	var path='/'+dsm_webdbname+'/DocumentsByIDWeb/'+x[0];
	PRINTABLE='';
	DOWNLOADS='';
	INT_LINKS='';
	EXT_LINKS='';
	MULTI_LINKS='';

	//if url contains a #, example : &ExpandSection=1#_Section1
	//the query_string will be stopped. &Print=YES
	var tmpUrl = String(document.location);
	if(tmpUrl.indexOf('#')>-1){
		var part1 = tmpUrl.substring(0, tmpUrl.indexOf('#'));
		var part2 = tmpUrl.substring(tmpUrl.indexOf('#'), tmpUrl.length);
		printurl=part1+'&Print=YES'+part2;
	}else
		printurl=document.location+'&Print=YES';
	
	if(x[0]=='SPECIAL_FOOTER'){
		printurl=x[1];
	}
	//[01/10/2006] entre le logo et le lien Imprimer l'espace ne doit pas etre underlined
	if(x[1]=='YES'){
		PRINTABLE='<A TARGET="_blank" HREF="'+printurl+'" CLASS="link"><IMG SRC="/ims_common_img/print.gif" BORDER=0></A>&nbsp;<A TARGET="_blank" HREF="'+printurl+'" CLASS="link">'+getMsg(11)+'</A><BR>';
	}
	
	// DOWNLOADS [11/04/2007] la target est desormais _blank
	y=new Array();
	if(x[5]!='') y=x[5].split('#@#');y=y.trim();
	for(i=0; i<y.length;i++){
		filename=y[i].substring(0, y[i].indexOf(',',0));
		DOWNLOADS+='<IMG SRC="/ims_common_img/download.gif" BORDER=0 CLASS="link"> <A TARGET="_blank" CLASS="link" HREF="'+path+'/$FILE/'+filename+'">'+filename+'</A><BR>';
	}

	// INTERNAL LINKS
	y=new Array();
	if(x[3]!='') y=x[3].split('#@#');y=y.trim();
	for(i=0; i<y.length;i++){
		link=y[i].substring(0, y[i].indexOf('|',0));
		label=y[i].substring(y[i].indexOf('|',0)+1, y[i].length);
		INT_LINKS+='<A HREF="'+link+'" CLASS="link">'+label+'</A><BR>';
	}

	if(INT_LINKS!='') INT_LINKS=getMsg(17)+'<BR>'+INT_LINKS+'<BR>';

	// EXTERNAL LINKS
	y=new Array();
	if(x[4]!='') y=x[4].split('#@#');y=y.trim();
	for(i=0; i<y.length;i++){
		link=y[i].substring(0, y[i].indexOf('|',0));
		label=y[i].substring(y[i].indexOf('|',0)+1, y[i].length);
		EXT_LINKS+='<A TARGET="_blank" HREF="'+link+'" CLASS="link">'+label+'</A><BR>';
	}

	if(EXT_LINKS!='') EXT_LINKS=getMsg(18)+'<BR>'+EXT_LINKS+'<BR>';


	//MULTILINGUAL LINKS
	y=new Array();
	if(x[6]!=''){
		//x[6]="<title>FR<title><language>FR</language><id>1</id>#@#<title>FLA<title><language>FLA</language><id>2</id>#@#<title>NL<title><language>NL</language><id>3</id>#@#<title>EN<title><language>EN</language><id>4</id>";
		y=x[6].split('#@#');
		y=y.trim();
		//alert(x[6]);
		
		//[17/01/2008] : tri des liens vers d'autres langues selon l'ordre défini dans le init.js
		for(i=0; i<sites_param.length; i++){
			if(sites_param[i][0]!=dsm_languagesite){
				//FR FLA
				//alert(sites_param[i][0]);
				for(j=0; j<y.length; j++){
					var language = getXmlTag(y[j], 'language');
					var link = '/'+dsm_webdbname+'/DocumentsByIDWeb/'+getXmlTag(y[j], 'id')+'?OpenDocument';
					var label = getXmlTag(y[j], 'title');
					if(sites_param[i][0]==language){
						//[21/09/2006] ouverture du doc multilangue dans la meme fenetre
						MULTI_LINKS+='<A HREF="'+link+'" CLASS="link" ALT="'+label+'"><img border=0 src="/ims_common_img/flag'+language+'.gif"></A> ';
					}
				}
			}
		}
	}
	

	
	if(MULTI_LINKS!='') MULTI_LINKS='<BR>'+getMsg(16)+'<BR>'+MULTI_LINKS+'<BR>';

	var tmp='';
	if(PRINTABLE+DOWNLOADS+INT_LINKS+EXT_LINKS!=''){
		tmp+='<TABLE BORDER=0 WIDTH=100% CELLSPACING=0 CELLPADDING=5><TR><TD>';
		tmp+='<TABLE BORDER=0 WIDTH=100% CELLSPACING=0 CELLPADDING=0><TR><TD WIDTH=100% HEIGHT=1 BGCOLOR=#DEDBDE><IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=1></TD></TR><TR><TD WIDTH=100% HEIGHT=5><IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=1></TD></TR></TABLE>';
		tmp+='<TABLE BORDER=0 WIDTH=100% CELLSPACING=0 CELLPADDING=0><TR>';
		tmp+='<TD WIDTH=50% CLASS="link">'+PRINTABLE+DOWNLOADS+MULTI_LINKS+'</TD>';
		tmp+='<TD WIDTH=50% VALIGN=TOP ALIGN=RIGHT CLASS="link">'+INT_LINKS+EXT_LINKS+'</TD></TR></TABLE>';
		tmp+='<TABLE BORDER=0 WIDTH=100% CELLSPACING=0 CELLPADDING=0><TR><TD WIDTH=100% HEIGHT=5><IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=1></TD></TR><TR><TD WIDTH=100% HEIGHT=1 BGCOLOR=#DEDBDE><IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=1></TD></TR></TABLE>';
		tmp+='</TD></TR></TABLE>';
	}

	return tmp;
}


function displayRightNav(){
bgcolor='#C1C6D6';
pictotype='';
dsm_leftpane+='<TABLE WIDTH=187 BORDER=0 CELLPADDING=0 CELLSPACING=0>';
separator = '<TR><TD BGCOLOR=#FFFFFF COLSPAN=2 HEIGHT=1><IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=1></TD></TR>';
for(i=0; i<navcounter; i++){
	//si category1 != "" et category1 = nav[i].id alors pictotype="_off"
	id=nav[i].id;
	icon=id.substring(0,id.length-3);
	dsm_leftpane+='<TR><TD WIDTH=19 BGCOLOR=#DADDE6 ALIGN=CENTER><IMG SRC="/ims_common_img/picto_'+icon+pictotype+'.gif" WIDTH=11 HEIGHT=11></TD>';
	dsm_leftpane+='<TD WIDTH=168 BGCOLOR='+bgcolor+'><A HREF="'+nav[i].url+'" CLASS="menu-partie">&nbsp;'+nav[i].label+'</A></TD></TR>';
	dsm_leftpane+=separator;
	nb = nav[i].children.length;
	for(k=0; k<nb; k++){
		//document.write('--> ');
		//document.write(nav[i].children[k].id);
		//document.write('<BR>');
	}
	pictotyp='';
}
dsm_leftpane+='</TABLE>';
}

function doDefaultViewDisplay(){
document.write('<BR>');
var x=vlines;
for(var i=0;i<x.length;i++){
	var tmp='';
	if( x[i][2].indexOf('**')==-1){
		if(x[i][1]=='header'){
			if(x[i][2].indexOf('*')==-1) tmp+='<SPAN CLASS="title"><B>'+x[i][2]+'</B></SPAN><BR><BR>';
			if(x[i][3])tmp+=x[i][3]+'<BR><BR><BR>';
		}
		else{
			if(x[i][2].indexOf('*')==-1) tmp+='<B>>>> '+x[i][2].toUpperCase()+'</B><BR>';
			if(x[i][3])tmp+=x[i][3]+'<BR><A HREF="/'+dsm_webdbname+'/DocumentsByIDWeb/'+x[i][0]+'?OpenDocument" CLASS="link">>> '+getMsg(10)+'</A><BR><BR>';
		}
	}
	document.write(tmp);
}
}
function doDefaultViewDisplay1(){
document.write('<BR>');
var x=vlines;
for(var i=0;i<x.length;i++){
	var tmp='';
	if( x[i][2].indexOf('**')==-1){
		if(x[i][1]=='header'){
			if(x[i][2].indexOf('*')==-1) tmp+='<SPAN CLASS="title"><B>'+x[i][2]+'</B></SPAN><BR><BR>';
			if(x[i][3])tmp+=x[i][3]+'<BR><BR><BR>';
		}
		else{
			if(x[i][2].indexOf('*')==-1) tmp+='<B>>>> '+x[i][2].toUpperCase()+'</B><BR>';
			if(x[i][3])tmp+=x[i][3]+'<BR><A HREF="/'+dsm_webdbname+'/DocumentsByIDWeb/'+x[i][0]+'?OpenDocument" CLASS="link" onclick="xt_med(xp1,xp2,xp3,xp4);">>> '+getMsg(10)+'</A><BR><BR>';
		}
	}
	document.write(tmp);
}
}
function doDefaultViewDisplay2(){
document.write('<BR>');
var x=vlines;
for(var i=0;i<x.length;i++){
	var tmp='';
	if( x[i][2].indexOf('**')==-1){
		if(x[i][1]=='header'){
			if(x[i][2].indexOf('*')==-1) tmp+='<SPAN CLASS="title"><H1>'+x[i][2]+'</H1></SPAN><BR>';
			if(x[i][3])tmp+=x[i][3]+'<BR><BR><BR>';
		}
		else{
			if(x[i][2].indexOf('*')==-1) tmp+='<h2>>>> '+x[i][2].toUpperCase()+'</h2>';
			if(x[i][6]=='') {
				if(x[i][3])tmp+='<A HREF="/'+dsm_webdbname+'/DocumentsByIDWeb/'+x[i][0]+'?OpenDocument" CLASS="link" onclick="xt_med(xp1,xp2,xp3,xp4);"> '+x[i][3]+'</A><BR><BR><BR>';
//				if(x[i][3])tmp+=x[i][3]+'<BR><A HREF="/'+dsm_webdbname+'/DocumentsByIDWeb/'+x[i][0]+'?OpenDocument" CLASS="link" onclick="xt_med(xp1,xp2,xp3,xp4);">>> '+getMsg(10)+'</A><BR><BR><br>';
			} else {
				tmp+='<A HREF="/'+x[i][6]+'" CLASS="link">>> '+x[i][3]+'</A><BR><BR><br>';
			}
		}
	}
	document.write(tmp);
}
}

function doFAQViewDisplay2(){
document.write('<BR>');
var x=vlines;
for(var i=0;i<x.length;i++){
	var tmp='';
	if( x[i][2].indexOf('**')==-1){
		if(x[i][1]=='header'){
			if(x[i][2].indexOf('*')==-1) tmp+='<SPAN CLASS="title"><H1>'+x[i][2]+'</H1></SPAN><BR>';
			if(x[i][3])tmp+=x[i][3]+'<BR><BR><BR>';
		}
		else{
			if( x[i][2].indexOf('*')==-1) tmp+='<A HREF="#'+i+'" CLASS="default" onclick="xt_med(xp1,xp2,xp3,xp4);"><h2>>>> '+x[i][2].toUpperCase()+'</h2></A><BR><BR>';
		}
	}
	document.write(tmp);
}
document.write('<BR><BR><BR>');
for(var i=0;i<x.length;i++){
	tmp='';
	if(x[i][1]!='header'){
		if( x[i][2].indexOf('*')==-1) tmp+='<A NAME="'+i+'" CLASS="default" onclick="xt_med(xp1,xp2,xp3,xp4);"><h2>>>> '+x[i][2].toUpperCase()+'</h2></A><BR>';
		if(x[i][3])tmp+=x[i][3]+'<BR><BR>';
	}
	document.write(tmp);
}
}

function doFAQViewDisplay1(){
document.write('<BR>');
var x=vlines;
for(var i=0;i<x.length;i++){
	var tmp='';
	if( x[i][2].indexOf('**')==-1){
		if(x[i][1]=='header'){
			if(x[i][2].indexOf('*')==-1) tmp+='<SPAN CLASS="title"><B>'+x[i][2]+'</B></SPAN><BR><BR>';
			if(x[i][3])tmp+=x[i][3]+'<BR><BR><BR>';
		}
		else{
			if( x[i][2].indexOf('*')==-1) tmp+='<A HREF="#'+i+'" CLASS="default" onclick="xt_med(xp1,xp2,xp3,xp4);"><B>>>> '+x[i][2].toUpperCase()+'</B></A><BR><BR>';
		}
	}
	document.write(tmp);
}
document.write('<BR><BR><BR>');
for(var i=0;i<x.length;i++){
	tmp='';
	if(x[i][1]!='header'){
		if( x[i][2].indexOf('*')==-1) tmp+='<A NAME="'+i+'" CLASS="default" onclick="xt_med(xp1,xp2,xp3,xp4);"><B>>>> '+x[i][2].toUpperCase()+'</B></A><BR>';
		if(x[i][3])tmp+=x[i][3]+'<BR><BR>';
	}
	document.write(tmp);
}
}


function doFAQViewDisplay(){
document.write('<BR>');
var x=vlines;
for(var i=0;i<x.length;i++){
	var tmp='';
	if( x[i][2].indexOf('**')==-1){
		if(x[i][1]=='header'){
			if(x[i][2].indexOf('*')==-1) tmp+='<SPAN CLASS="title"><B>'+x[i][2]+'</B></SPAN><BR><BR>';
			if(x[i][3])tmp+=x[i][3]+'<BR><BR><BR>';
		}
		else{
			if( x[i][2].indexOf('*')==-1) tmp+='<A HREF="#'+i+'" CLASS="default"><B>>>> '+x[i][2].toUpperCase()+'</B></A><BR><BR>';
		}
	}
	document.write(tmp);
}
document.write('<BR><BR><BR>');
for(var i=0;i<x.length;i++){
	tmp='';
	if(x[i][1]!='header'){
		if( x[i][2].indexOf('*')==-1) tmp+='<A NAME="'+i+'" CLASS="default"><B>>>> '+x[i][2].toUpperCase()+'</B></A><BR>';
		if(x[i][3])tmp+=x[i][3]+'<BR><BR>';
	}
	document.write(tmp);
}
}

function displayStdSearch(totalhits){ //used in Search Form (main.nsf)
tmp='<BR>';
if(totalhits==0){
	tmp+=getMsg(9) + '<BR><BR>';
	document.write(tmp);
	return '';
}
tmp+=totalhits + ' ' + getMsg(8) +'<BR><BR>';
document.write(tmp);

var x=vlines;
for(var i=0;i<x.length;i++){
	var tmp='';
	if( x[i][3].indexOf('*')==-1) tmp+='<B>>>> '+x[i][3].toUpperCase()+'</B><BR>';
	if(x[i][4])tmp+=x[i][4]+'<BR>';
	switch (x[i][1]){
		case 'standard': tmp+='<A HREF="/'+dsm_webdbname+'/DocumentsByIDWeb/'+x[i][0]+'?OpenDocument" CLASS="link">>> '+getMsg(10)+'</A>'; break;
		default : tmp+=getMsg(12)+'<BR><A HREF="'+getNavAttribute(x[i][2],'url')+'" CLASS="link">>> '+getMsg(10)+'</A>';break;
	}
	tmp+='<BR><BR>';
	document.write(tmp);
}
}
function displayStdSearch1(totalhits){ //used in Search Form (main.nsf)
tmp='<BR>';
if(totalhits==0){
	tmp+=getMsg(9) + '<BR><BR>';
	document.write(tmp);
	return '';
}
tmp+=totalhits + ' ' + getMsg(8) +'<BR><BR>';
document.write(tmp);

var x=vlines;
for(var i=0;i<x.length;i++){
	var tmp='';
	if( x[i][3].indexOf('*')==-1) tmp+='<B>>>> '+x[i][3].toUpperCase()+'</B><BR>';
	if(x[i][4])tmp+=x[i][4]+'<BR>';
	switch (x[i][1]){
		case 'standard': tmp+='<A HREF="/'+dsm_webdbname+'/DocumentsByIDWeb/'+x[i][0]+'?OpenDocument" CLASS="link" onclick="xt_med(xp1,xp2,xp3,xp4);">>> '+getMsg(10)+'</A>'; break;
		default : tmp+=getMsg(12)+'<BR><A HREF="'+getNavAttribute(x[i][2],'url')+'" CLASS="link" onclick="xt_med(xp1,xp2,xp3,xp4);">>> '+getMsg(10)+'</A>';break;
	}
	tmp+='<BR><BR>';
	document.write(tmp);
}
}

/*[16/07/2007]*/
function doDisplayHeader(){
var x=header;
var tmp='';

if(x!=''){
  if( x[2].indexOf('**')==-1){
	tmp='<BR>';
	if( x[2].indexOf('(*)')==-1) tmp+='<SPAN CLASS="title">'+x[2]+'</SPAN><BR><BR>';
	if(x[3])tmp+=x[3]+'<BR><BR>';
  	//if(x[4])tmp+=x[4]+'<BR>'; //date
  }
  document.write(tmp);
}

}

function doSiteMap(){
tmp='';
for(var i=0; i<nav.length; i++){
	id=nav[i].id;
	icon=id.substr(id.lastIndexOf('-')+1, id.length-id.lastIndexOf('-'));

	tmp+='<B>'+nav[i].label+'</B><BR>';
	nb = nav[i].children.length;
	for(k=0; k<nb; k++){
		tmp+=' - <A HREF="'+nav[i].children[k].url+'" CLASS="default">' + nav[i].children[k].label+'</A><BR>';
	}
	tmp+='<BR>'
}
document.write(tmp);
}


/* implantations nationales : CustNatLocations / triggered manually by a clic on a map
*/
function displayNationalLocation(selected){
  var choices = document.getElementById('choices');
  for(i=0; i<choices.length; i++){
    if(choices[i].value==selected)
      choices.selectedIndex=i;
  }
  displayNatLocations(selected)
}
function displayNat(choices){
  var index=choices.selectedIndex;
  //attention, l'ecodage des accents oblige à un test sur _
  if(choices[index].value && choices[index].value.substring(0,1)!='_') selected=choices[index].value;
  else selected=choices[index].text;

  selected=choices[choices.selectedIndex].value;
  
  displayNatLocations(selected)
}

//[18/04/2007] indexOf remplacé par Array.indexOf
function displayNatLocations(selected){
  var new_vlines2=new Array();
  if(selected!='NULL'){
  	var j=0;
  	for( i=0; i<vlines2.length; i++ ){
      var tmp = vlines2[i][0].split('-');
      if(tmp.indexOf(selected)>-1){
        new_vlines2[j]=vlines2[i];
  			j++;
      }
      /*
  		if(vlines2[i][0].indexOf(selected)>-1){
  			new_vlines2[j]=vlines2[i];
  			j++;
  		}*/
  	}
  }
  
  //vlines2=new_vlines2;
  //[28/08/2006]
  var tmp='';
  for( i=0; i<new_vlines2.length; i++ ){
  	if(new_vlines2[i][3]) tmp+='<B>'+new_vlines2[i][3] + '</B><BR>';
  	if(new_vlines2[i][1]) tmp+=new_vlines2[i][1] + '<BR>';
  	if(new_vlines2[i][2]) tmp+=new_vlines2[i][2] + '<BR>';
  	if(new_vlines2[i][4]) tmp+=new_vlines2[i][4] + '<BR>';
  	if(new_vlines2[i][5]) tmp+=getMsg(61)+' : ' + new_vlines2[i][5] + '<BR>';
  	if(new_vlines2[i][6]) tmp+=getMsg(62)+' : ' + new_vlines2[i][6] + '<BR>';
  	if(new_vlines2[i][7]) tmp+=getMsg(63)+' : <A HREF="mailto:'+new_vlines2[i][7]+'" CLASS="link">' + new_vlines2[i][7] + '</A><BR>';
  	if(new_vlines2[i][8]) tmp+='<A TARGET="_blank" HREF="'+new_vlines2[i][8]+'" CLASS="link">' + getMsg(65) + '</A><BR>';
  	if(new_vlines2[i][9]) tmp+=getMsg(66)+' : ' + new_vlines2[i][9] + '<BR>';
  	tmp+='<BR>';
  
  }
  document.getElementById('national').innerHTML = tmp;
  //document.write(tmp);
  //dsm_parameters[3]=tmp;
}

//implantations nationales : CustNatLocations
function displayNationalLocations(){
  var new_vlines2=new Array();
  choices=document.forms['_CustNatLocations'].choices;
  index=choices.selectedIndex;
  //attention, l'ecodage des accents oblige à un test sur _
  if(choices[index].value && choices[index].value.substring(0,1)!='_') selected=choices[index].value;
  else selected=choices[index].text;
  if(index>0){
  	var j=0;
  	for( i=0; i<vlines2.length; i++ ){
  		if(vlines2[i][0].indexOf(selected)>-1){
  			new_vlines2[j]=vlines2[i];
  			j++;
  		}
  	}
  }
  vlines2=new_vlines2;
  var tmp='';
  for( i=0; i<vlines2.length; i++ ){
  	if(vlines2[i][3]) tmp+='<B>'+vlines2[i][3] + '</B><BR>';
  	if(vlines2[i][1]) tmp+=vlines2[i][1] + '<BR>';
  	if(vlines2[i][2]) tmp+=vlines2[i][2] + '<BR>';
  	if(vlines2[i][4]) tmp+=vlines2[i][4] + '<BR>';
  	if(vlines2[i][5]) tmp+=getMsg(61)+' : ' + vlines2[i][5] + '<BR>';
  	if(vlines2[i][6]) tmp+=getMsg(62)+' : ' + vlines2[i][6] + '<BR>';
  	if(vlines2[i][7]) tmp+=getMsg(63)+' : <A HREF="mailto:'+vlines2[i][7]+'" CLASS="link">' + vlines2[i][7] + '</A><BR>';
  	if(vlines2[i][8]) tmp+='<A TARGET="_blank" HREF="'+vlines2[i][8]+'" CLASS="link">' + getMsg(65) + '</A><BR>';
  	if(vlines2[i][9]) tmp+=getMsg(66)+' : ' + vlines2[i][9] + '<BR>';
  	tmp+='<BR>';
  }
  document.write(tmp);
}
//form : CustNatLocationsPrint
function displayNationalLocationsPrint(){
  var j=0;
  var tmp='<TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=0 BORDER=1>';
  var s='';
  for( i=0; i<vlines2.length; i++ ){
  	if(i%2==0) tmp+='<TR>';
  	s='<TD VALIGN=TOP>';
  	if(vlines2[i][3]) s+='<B>'+vlines2[i][3] + '</B><BR>';
  	if(vlines2[i][1]) s+=vlines2[i][1] + '<BR>';
  	if(vlines2[i][2]) s+=vlines2[i][2] + '<BR>';
  	if(vlines2[i][4]) s+=vlines2[i][4] + '<BR>';
  	if(vlines2[i][5]) s+=getMsg(61)+' : ' + vlines2[i][5] + '<BR>';
  	if(vlines2[i][6]) s+=getMsg(62)+' : ' + vlines2[i][6] + '<BR>';
  	if(vlines2[i][7]) s+=getMsg(63)+' : <A HREF="mailto:'+vlines2[i][7]+'" CLASS="link">' + vlines2[i][7] + '</A><BR>';
  	if(vlines2[i][8]) s+=vlines2[i][8] + '<BR>';
  	s+='</TD>';
  	tmp+=s;
  	if(i%2==1) tmp+='</TR>';
  }
  if(i%2==1) tmp+='<TD>&nbsp;</TD></TR>';
  tmp+='</TABLE>';
  document.write(tmp);
}


/* INTERNATIONAL LOCATIONS ------------------------------------------------
[16/08/2006]
all international locations are added to vlines2 array (view DocsInterLocationsByLanguage)
0 : Zones 1:Type 2:Division 3:Address 4:Phone 5:FAX 6:Email 7:LinkURL 8:OtherLocations 9:Description (separator is #@#)
*/
function displayInterLocations(country){
	var found = false;
	var selectionArr =new Array();
	for( i=0; i<vlines2.length; i++ ){
		if(vlines2[i][0].indexOf(country)>-1){
			selectionArr[selectionArr.length]=vlines2[i];
			found = true;
		}
	}

	var tmp='';
	for( i=0; i<selectionArr.length; i++ ){
		tmp+='<IMG SRC="/ims_common_img/arrow_list.jpg"> <B>'+ selectionArr[i][1] + '</B><BR>';
		if(selectionArr[i][2]) tmp+=selectionArr[i][2] + '<BR>';
		if(selectionArr[i][3]) tmp+=selectionArr[i][3] + '<BR>';
		if(selectionArr[i][4]) tmp+=selectionArr[i][4] + '<BR>';
		if(selectionArr[i][5]) tmp+=getMsg(72)+' : ' + selectionArr[i][5] + '<BR>';
		if(selectionArr[i][6]) tmp+=getMsg(73)+' : ' + selectionArr[i][6] + '<BR>';
		if(selectionArr[i][7]) tmp+=getMsg(74)+' : <A HREF="mailto:'+selectionArr[i][7]+'" CLASS="link">' + selectionArr[i][7] + '</A><BR>';
		//[01/10/2006] : ajout du target=_blank
		if(selectionArr[i][8]) tmp+=getMsg(76)+' : <A TARGET="_blank" HREF="'+selectionArr[i][8]+'" CLASS="LINK">'+selectionArr[i][8] + '</A><BR>';
		if(selectionArr[i][9]) tmp+='<b>'+getMsg(75)+'</b> : ' + selectionArr[i][9] + '<BR>';
		if(selectionArr[i][10]) tmp+='<b>'+getMsg(77)+'</b> : ' + selectionArr[i][10] + '<BR>';
		tmp+='<BR>';
	}

	//if no result found, you can display a default message
	if(found==false){
		tmp = '';
	}

	document.getElementById('international').innerHTML = tmp;
}
//-------------------------------------------------------------------------
//implantations internationales : CustInterLocations
function displayInternationalLocations(){
  var new_vlines2=new Array();
  choices=document.forms['_CustInterLocations'].choices;
  index=choices.selectedIndex;
  //attention, l'ecodage des accents oblige à un test sur _
  if(choices[index].value && choices[index].value.substring(0,1)!='_') selected=choices[index].value;
  else selected=choices[index].text;
  if(index>0){
  	var j=0;
  	for( i=0; i<vlines2.length; i++ ){
  		if(vlines2[i][0].indexOf(selected)>-1){
  			new_vlines2[j]=vlines2[i];
  			j++;
  		}
  	}
  	vlines2=new_vlines2;
  }
  var tmp='';
  for( i=0; i<vlines2.length; i++ ){
  	tmp+='<IMG SRC="/ims_common_img/arrow_list.jpg"> <B>'+ vlines2[i][0] + '</B><BR>';
  	if(vlines2[i][1]) tmp+=vlines2[i][1] + '<BR>';
  	if(vlines2[i][2]) tmp+=vlines2[i][2] + '<BR>';
  	if(vlines2[i][3]) tmp+=vlines2[i][3] + '<BR>';
  	if(vlines2[i][4]) tmp+=getMsg(72)+' : ' + vlines2[i][4] + '<BR>';
  	if(vlines2[i][5]) tmp+=getMsg(73)+' : ' + vlines2[i][5] + '<BR>';
  	if(vlines2[i][6]) tmp+=getMsg(74)+' : <A HREF="mailto:'+vlines2[i][6]+'" CLASS="link">' + vlines2[i][6] + '</A><BR>';
  	if(vlines2[i][7]) tmp+=getMsg(76)+' : <A HREF="'+vlines2[i][7]+'" CLASS="LINK">'+vlines2[i][7] + '</A><BR>';
  	if(vlines2[i][8]) tmp+=getMsg(75)+' : ' + vlines2[i][8] + '<BR>';
  	if(vlines2[i][9]) tmp+=getMsg(77)+' : ' + vlines2[i][9] + '<BR><BR>';
  }
  document.write(tmp);
}

//liens utiles : CustLinks
function displayLinks(){
  var new_vlines2=new Array();
  choices=document.forms['_CustLinks'].choices;
  index=choices.selectedIndex;
  //attention, l'ecodage des accents oblige à un test sur _
  if(choices[index].value && choices[index].value.substring(0,1)!='_') selected=choices[index].value;
  else selected=choices[index].text;
  if(index>0){
  	var j=0;
  	for( i=0; i<vlines2.length; i++ ){
  		if( vlines2[i][1]==selected ){
  			new_vlines2[j]=vlines2[i];
  			j++;
  		}
  	}
  	vlines2=new_vlines2;
  }
  var tmp='';
  for( i=0; i<vlines2.length; i++ ){
  	tmp+='<IMG SRC="/ims_common_img/arrow_list.jpg"> <B>' + vlines2[i][0] + '</B> (' + vlines2[i][1] + ')<BR>';
  	tmp+=vlines2[i][3] + '<BR>';
  	tmp+='<A HREF="'+ vlines2[i][2] +'" CLASS="link" TARGET="_blank">' + vlines2[i][2] + '</A><BR><BR>';
  }
  document.write(tmp);
}


// choose the right home page for the user
if(cookieEnabled){
  // if home page detected
  if(dsm_skin+'-'+dsm_languagesite+'-home'==dsm_viewcategory1){
    if(getCookie('dsm_language')!=null){
      if(getCookie('dsm_language') != dsm_languagesite){ //if current language != last vidited page language
        if(getCookie('dsm_alreadyRedirected')==null && getCookie('dsm_sessionId')==null){ // if we have never been redirected
          setCookie('dsm_alreadyRedirected', true, 0);
          //redirect to the last home page
          var u = window.location.href;
          u = u.replaceAll('-'+dsm_languagesite+'-','-'+getCookie('dsm_language')+'-');
          window.location.href=u;
        }
      }
    }
  }
}
//set the current language
setCookie('dsm_language',dsm_languagesite, 900);

//-----------------------------------
//GENERAL FUNCTIONS
//-----------------------------------
/*
dsm_id
dsm_session
dsm_lastConnexion

referrer
resolution ecran
navigator
ip
*/

function setTracker(){
  var now = new Date();
  var nowId = now.getTime();
  
  var dsm_id = null; //persistent , user id
  var dsm_sessionId = null; //session cookie, it is set once at the begining of the session
  var dsm_lastSessionId = null; //persistent cookie. if visitor is known, last time he visited the web site
  var dsm_pageId = null; //session cookie
  
  var newVisitor = false;
  var lastSessionId = null;
  var newSession = false;
  var referrerDuration = null; //time the visitor stayed on last page : referrer
  
  if (getCookie('dsm_id')==null){ //new visitor
    dsm_id = nowId;
    setCookie('dsm_id', dsm_id, 900);
    newVisitor = true;
  }
  
  if (getCookie('dsm_lastSessionId')!=null){ //visitor has already come
    lastSessionId = Number(getCookie('dsm_lastSessionId'));
  }
  
  if (getCookie('dsm_sessionId')==null){ //new session
    newSession = true;
    setCookie('dsm_sessionId', nowId, 0);
    setCookie('dsm_lastSessionId', nowId, 900);
    setCookie('dsm_pageId', nowId, 0);
  }
  
  dsm_id = Number(getCookie('dsm_id'));
  dsm_sessionId = Number(getCookie('dsm_sessionId'));
  dsm_pageId = Number(getCookie('dsm_pageId'));
  
  //pageDuration is for referrer
  referrerDuration = (nowId-dsm_pageId)/1000;
  setCookie('dsm_pageId', nowId, 0);
  
  var dsmReferrer = document.referrer;
  //analyse de mots clefs si recherche google
  
  var category = '';//dsm_viewcategory1+'::'+dsm_viewcategory2+'::'+dsm_viewcategory3+'::'+dsm_viewcategory4+'::'+dsm_viewcategory5+'::'+dsm_documentid;
  category=escape(dsm_stattitle)+dsm_tracker;
  var site=dsm_skin;
  var language=dsm_languagesite;
  //var userAgent=navigator.userAgent;
  var referrer=document.referrer;
  var p = '';
  p+='&category='+category;
  //alert(category);
  p+='&id='+dsm_id;
  p+='&sessionId='+dsm_sessionId;
  
  if(dsm_lastSessionId) p+='&lastSessionId='+dsm_lastSessionId;
  //p+='&site='+site+'&language='+language+'&category='+category;
  p+='&site='+site+'&language='+language;
  if(newVisitor) p+='&newVisitor=True';
  if(newSession) p+='&newSession=True&width='+screen.width+'&height='+screen.height; //screen, etc ... once
  p+='&referrerDuration='+referrerDuration+'&referrer='+referrer;
  //alert(p.split('&').join('\n'));
  //alert(p);
  //document.write('<IMG SRC="/cmstracking.nsf/Track?CreateDocument'+p+'" ALT="" HEIGHT=1 WIDTH=1>');
}


/*[06/05/2007]
cherche une chaine dans la navigation et renvoie l'attribut (à implémenter)
Category(label, id, url, readers)
*/
function getNavAttributeByString(searchString, attribute){
  var i = 0;
  var j = 0;
  for(i=0; i<nav.length; i++){
    var category = nav[i];
    for(j=0; j<category.children.length; j++){
      var c = category.children[j];
      if(c.url.indexOf(searchString)>-1){
        return c.id;
      }
    }
    if(category.url.indexOf(searchString)>-1){
      return category.id;
    }
  }
  
  return dsm_viewcategory1;
}

//[10/09/2007]
function doFormValidation(formName){
	var errors = "";
	var bool=true;
	var f=document.forms['_Response'];
	
	if(window.location.href.indexOf('/Form7?OpenForm')<0)
		if(f.Country)if(f.Country.selectedIndex==0) bool=false;
	
	if(window.location.href.indexOf('/Form7?OpenForm')<0)
		if(f.ZipCode){
			if(f.ZipCode.value.length==0) bool=false;
			if(!isNumeric(f.ZipCode.value)) {errors=dsm_msg[352];}
		}
	
	if(window.location.href.indexOf('/Form7?OpenForm')<0)
		if(f.ContactCategory1ChoicesElements){
			if(ContactCategory1ChoicesElements>1){
				if(f.ContactCategory1.selectedIndex==0 ) bool=false;
		
				if(ContactCategory2Level > 1)
					if(f.ContactCategory2.selectedIndex==0 ) bool=false;
			}
		}
	
	if(window.location.href.indexOf('/Form7?OpenForm')<0)
		if(f.FirstName) if(f.FirstName.value.length==0) bool=false;
	if(window.location.href.indexOf('/Form7?OpenForm')<0)
		if(f.LastName) if(f.LastName.value.length==0) bool=false;	
	if(window.location.href.indexOf('/Form7?OpenForm')<0)
		if(f.F1) if(f.F1.value.length==0) bool=false;
	if(window.location.href.indexOf('/Form7?OpenForm')<0)
		if(f.F2) if(f.F2.value.length==0) bool=false;
	if(window.location.href.indexOf('/Form7?OpenForm')<0)
		if(f.Comments) if(f.Comments.value.length==0) bool=false;
	
	if(window.location.href.indexOf('/Form7?OpenForm')<0)
		//seulement pour le formulaire 2 : Ask Catalog
		if(window.location.href.indexOf('/Form2?OpenForm')>-1)
		    if(f.Address) if(f.Address.value.length==0) bool=false;
	
	if(window.location.href.indexOf('/Form7?OpenForm')<0)
		if(f.Email){
			if(f.Email.value==0) bool=false;
			else if(!isMail(f.Email.value)){errors=dsm_msg[204];}
		}
	
	//a ne pas tester pour le formulaire 3 : Apply for a job et formulaire 7
	if(window.location.href.indexOf('/Form3?OpenForm')<0 && window.location.href.indexOf('/Form7?OpenForm')<0)
		if(f.Company)	if(f.Company.value.length==0) bool=false;
	
	if(bool==false) errors=dsm_msg[211]+"\r"+errors;
	if (errors!="") alert (errors)
	else f.submit();
}




// UNUSED
function dsmPrintableVersion(p){}
function dsmSendToAFriend(p){}
function dsmDownloadFiles(path, files){
	///IMS/imsfrance/main.nsf/DocumentsByIDWeb/5J4M2V?OpenDocument
	var x=files.split('#@#');
	for(i=0; i<x.length;i++){
		tmp+='<A HREF="'+path+x[i]+'"><IMG SRC="/ims_common_img/download.gif"></A><BR>';
	}
}
function dsmRelated(p){}
function dsmOthersVersions(p){}
