//var ie4=(document.all)? true:false
//var ns6=(navigator.userAgent.toLowerCase().indexOf("netscape6")!=-1)? true:false
//var moz=(navigator.userAgent.indexOf('Gecko') != -1)? true:false

var ie4=false
var ns6=false
var moz=false


function _dSectionExpand(sec,linkurl) {
//we go to url from level1 when needed or English otherwise we expand the section
if (linkurl!='' & ((linkurl.indexOf('#'+sec)==-1 & linkurl.indexOf('RestrictToCategory='+sec)==-1) | sec=='EN')) {self.location.href=linkurl;} else { 
if (ie4) {document.all['cSec'+sec].style.display="none" ; document.all['xSec'+sec].style.display="block";}
else {document.getElementById('cSec'+sec).style.display="none" ; document.getElementById('xSec'+sec).style.display="block";}
	dsm_dhtmlsectionlist_array=dsm_dhtmlsectionlist.split("|");
	for (var i=0; i<dsm_dhtmlsectionlist_array.length; i++) {
		if (dsm_dhtmlsectionlist_array[i]!="" & dsm_dhtmlsectionlist_array[i]!=sec) {
			// some sections remain opened
			if (dsm_dhtmlsectionlist_array[i] !='59GGGM' & dsm_dhtmlsectionlist_array[i] !='59GGG2') { 
				if (ie4) {document.all['xSec'+dsm_dhtmlsectionlist_array[i]].style.display="none";document.all['cSec'+dsm_dhtmlsectionlist_array[i]].style.display="block";}
				else {document.getElementById('xSec'+dsm_dhtmlsectionlist_array[i]).style.display="none" ; document.getElementById('cSec'+dsm_dhtmlsectionlist_array[i]).style.display="block";}
				}
			}
	}
}
}

function _dSectionCollapse(sec,linkurl) {
// some sections remain opened
if (sec !='59GGGM' & sec !='59GGG2') {
if (ie4) {document.all['xSec'+sec].style.display="none" ; document.all['cSec'+sec].style.display="block";}
else {document.getElementById('xSec'+sec).style.display="none" ; document.getElementById('cSec'+sec).style.display="block";}}
}

/* URL to expand the selected category */
function _doExpandNav(docnumber) {
	category=document.forms[0].tmpField[docnumber-1].value;
	self.location.href='/'+dsm_webdbname+'/Cat1?ReadForm&RestrictToCategory='+category;
}

/* 1st navigation level */
var dsm_dhtmlsectionlist='';
function  _doAddToLN (htmlcode , beforelink , linkurl , linktext , category1, role) {
if (ie4 | ns6 | moz) {
// DHTML
if (role.indexOf('WebPrivilege')==-1 | _doOkToDisplay(role)==true) {
dsm_viewdhtmlstyle1="position:relative ; display:block ; cursor: hand;";
dsm_viewdhtmlstyle2="position:relative ; display:none ; cursor: hand;";
if (category1==dsm_viewcategory1 | category1=='59GGGM' | category1=='59GGG2' | category1==dsm_viewcategory1) {dsm_viewdhtmlstyle2= "position:relative ; display:block ;";dsm_viewdhtmlstyle1= "position:relative ; display:none ; ";}
htmlcode += '</span>\n<span id="cSec'+category1+'" style="'+dsm_viewdhtmlstyle1+'"><TABLE WIDTH=175 CELLPADDING=0 CELLSPACING=0 BORDER=0 BGCOLOR=CBE8FF>';
//WHITE separator...
if (category1=="5EZJLM") {htmlcode += '<TR><TD COLSPAN=3><IMG SRC=\"/cfonb_img/leftnav_sep_white.gif\" WIDTH=175></TD></TR>'}
//TRANSPARENT separator (JCP 30/10/02)
if (category1=="5KUFVA" | category1=="5L3BJ3" | category1=="5L3BKD" | category1=="5L3BPQ" | category1=="5TVJD9"| category1=="5L3C48" | category1=="5L3C28" | category1=="5LXM9Q" | category1=="5L3C2G" | category1=="5L3C2R" | category1=="5LEHWN" | category1=="6BDDQS"  | category1=="6QBDBK"  | category1=="7RRBSA" | category1=="835HNJ"  ) {htmlcode += '<TR><TD COLSPAN=3><IMG SRC=\"/cfonb_img/leftnav_sep_blue.gif\" WIDTH=175></TD></TR>'}
htmlcode +='<TR HEIGHT=16><TD WIDTH=175><SPAN CLASS="navigationlink">&nbsp;&nbsp;&nbsp;<a onclick="_dSectionExpand(\''+category1+'\' , \''+linkurl+'\');return false;" href=\"\" CLASS="navigationlink">'+linktext+'</A>'+_doViewSecurityIcon(role,"level")+'</SPAN></TD></TR></TABLE></span>';
htmlcode +='\n<span id="xSec'+category1+'" style="'+dsm_viewdhtmlstyle2+'"><TABLE WIDTH=175 CELLPADDING=0 CELLSPACING=0 BORDER=0 BGCOLOR=CBE8FF><TR HEIGHT=16><TD WIDTH=175><SPAN CLASS="navigationlink">&nbsp;&nbsp;&nbsp;<a onclick="_dSectionCollapse(\''+category1+'\');return false;" href=\"\" CLASS="navigationlink">'+linktext+'</A>'+_doViewSecurityIcon(role,"level")+'</SPAN></TD></TR></TABLE>\n\n';
dsm_dhtmlsectionlist+=category1+"|";
return htmlcode;}
else {return htmlcode}
}
else {
// plain HTML
if (role.indexOf('WebPrivilege')==-1 | _doOkToDisplay(role)==true) {
//WHITE separator...
//if (category1=="5EZJLM") {htmlcode += '<IMG SRC=\"/cfonb_img/leftnav_sep_white.gif\" WIDTH=175>'}
//TRANSPARENT separator (JCP 30/10/02)
if (category1=="5KUFVA" | category1=="5L3BJ3" | category1=="5L3BKD" | category1=="5L3BPQ" |category1=="5TVJD9"| category1=="5L3C48" | category1=="5L3C28" | category1=="5LXM9Q" | category1=="5L3C2G" | category1=="5L3C2R" | category1=="5LEHWN"  | category1=="6BDDQS" | category1=="6QBDBK" | category1=="7RRBSA" | category1=="835HNJ") {htmlcode += '<IMG SRC=\"/cfonb_img/leftnav_sep_blue.gif\" WIDTH=175>'}
// highlight the curent category
dsm_tmpsyle='navigationlink';
dsm_tmpimg='<IMG SRC="/cfonb_img/triangle_whiteblue.gif" ALIGN=TOP>&nbsp;';
if ((dsm_viewcategory1 == category1 & category1!="EN" ) | category1=='59GGGM' | category1=='59GGG2') {dsm_tmpimg='<IMG SRC="/cfonb_img/triangle_whiteblue2.gif">';}
if (dsm_viewcurrentcategory == category1) {dsm_tmpsyle='navigationlinkhighlited';}
return htmlcode+'<TABLE WIDTH=175 CELLPADDING=0 CELLSPACING=0 BORDER=0 BGCOLOR=CBE8FF><TR HEIGHT=16><TD WIDTH=175><SPAN CLASS="'+dsm_tmpsyle+'">&nbsp;&nbsp;&nbsp;'+beforelink+'<A HREF="'+linkurl+'" CLASS="'+dsm_tmpsyle+'">'+linktext+'</A>'+_doViewSecurityIcon(role,"level")+'</SPAN></TD></TR></TABLE>';}
else {return htmlcode+beforelink}
}
}

/* 2nd navigation level */
function  _doAddToLN2 (htmlcode , linkurl , linktext , category1 , category2 , role)	{
if (role.indexOf('WebPrivilege')==-1 | _doOkToDisplay(role)==true) {
//if not english category & current category opened or always openned one or DHTML mode
if ((category1==dsm_viewcategory1 | category1=='59GGGM' | category1=='59GGG2' | ie4 | ns6 | moz))	{
// highlight the curent category
dsm_tmpsyle='navigationlinksmall';
if (dsm_viewcategory2 == category2) {dsm_tmpsyle='navigationlinksmallhighlited';}
return (htmlcode+'<TABLE WIDTH=175 CELLPADDING=0 CELLSPACING=0 BORDER=0 HEIGHT=10><TR><TD WIDTH=21 ALIGN=RIGHT VALIGN=TOP BGCOLOR=CBE8FF>&nbsp;</TD><TD WIDTH=151 ALIGN=LEFT VALIGN=TOP BGCOLOR=CBE8FF><A HREF="'+linkurl+'" TARGET=_top CLASS="'+dsm_tmpsyle+'">'+linktext+'</A>'+_doViewSecurityIcon(role,"level")+'</TD><TD WIDTH=3 BGCOLOR=CBE8FF><IMG SRC="/icons/ecblank.gif" WIDTH=3 HEIGHT=1></TD></TR></TABLE>');}
else {return htmlcode}
}
else {return htmlcode}
}

function _doView (specialtype, title, headline, documentdate, documentsource, format, image, link, downloadfile, relatedint, relatedext, more, role) {

// if doc type=HEADER we must increase offset
if (specialtype=='HEADER') {dsm_viewformatoffset+=1; dsm_viewstarttable=1; document.write('<SPAN CLASS="viewheadline">'+headline+'</SPAN><BR>')}

else {

// *******
//  RULES
// *******
// 1 or 2 column
if (dsm_viewcurrentcategory=='53CD3Q' | dsm_viewcurrentcategory=='5HJLLS' | dsm_viewcurrentcategory=='53CD4E') {dsm_viewformattype=2}

// sub heading mode...should put some rules here to say when and how to do sub heading.
if ((dsm_viewcurrentcategory=='53CD3G') & (dsm_docnumber==dsm_viewformatoffset+1 | (getParameter(self.location.href,'Count')=='999' & dsm_docnumber==getParameter(self.location.href,'Start')))) {
dsm_viewsubheadingmode='FRAME';
dsm_viewsubheadingmodeclose='1';
_doSubHeading('Archives',dsm_viewsubheadingmode);}
else {dsm_viewsubheadingmode=dsm_viewsubheadingmode}


if (dsm_docnumber==dsm_viewformatoffset+1 & (dsm_viewcurrentcategory=='53CD3Q' | dsm_viewcurrentcategory=='5HJLLS' | dsm_viewcurrentcategory=='53CD4E')) {_doSubHeading('les derniers num&eacute;ros', dsm_viewsubheadingmode);}

// highlight mode...should put some rules here too...
if (dsm_docnumber==dsm_viewformatoffset & (dsm_viewcurrentcategory=='53CD3Q' | dsm_viewcurrentcategory=='5HJLLS' | dsm_viewcurrentcategory=='53CD4E' | dsm_viewcurrentcategory=='53CD3G') ) {dsm_viewhighlightmode='FRAME';}
else if (specialtype=='HEADER') {dsm_viewhighlightmode='NONE'}
/* else if (specialtype!='HEADER' & dsm_viewstarttable!=1 & dsm_viewsubheadingmode=='')  {dsm_viewhighlightmode='BLUE_LINE_SMALL';} */
else {dsm_viewhighlightmode='NONE'}
// **************
//  RULES END
// **************

if (dsm_viewformattype==1 | (dsm_viewformattype==2 & dsm_docnumber<=dsm_viewformatoffset)) {var dsm_viewtablewidth='90';var dsm_viewcellwidth='100'} else {var dsm_viewtablewidth='100';var dsm_viewcellwidth='48'}

if (dsm_viewformattype==1 & dsm_IsPublication=='YES' & dsm_docnumber>dsm_viewformatoffset & dsm_viewcurrentcategory!='53CD3Q') {var dsm_viewtablemargin='<TD WIDTH=20 VALIGN=TOP ALIGN=CENTER><IMG SRC="/cfonb_img/square_purple.gif" VSPACE=4></TD>'}
else if (dsm_viewcellwidth=='48') {dsm_viewtablemargin='<TD WIDTH=20><IMG SRC="/icons/ecblank.gif" WIDTH=20 HEIGHT=1></TD>'}
else {dsm_viewtablemargin=''}

if (dsm_viewstarttable==1) {dsm_viewhtmlstream+='<TABLE WIDTH='+dsm_viewtablewidth+'% BORDER=0 CELLPADDING=0 CELLSPACING=0><TR>'+dsm_viewtablemargin+'<TD VALIGN=TOP WIDTH='+dsm_viewcellwidth+'%>'}
// inside element
// Image
if (format=='FOLLOW') {format='ALIGN=LEFT'} else if (format=='NOIMAGE'){image=''} else {format='ALIGN='+format}
// some categories have default images on first doc...
if (dsm_viewhighlightmode=='FRAME' & (dsm_viewcurrentcategory=='53CD3G' | dsm_viewcurrentcategory=='53CD3Q' | dsm_viewcurrentcategory=='5HJLLS')) {image='<IMG SRC="/cfonb_img/visuel_'+dsm_viewcurrentcategory+'.gif">';format='ALIGN=LEFT' }
// if not, treat image as usual in document...
else if (image!='' & dsm_viewtablemode=='YES') {image='<IMG SRC="'+image+'" ALT="'+title+'">'} else if (image!='') {image='<IMG SRC="'+image+'" '+format +' ALT="'+title+'" HSPACE=10 VSPACE=0>'}
if (dsm_viewtablemode=='YES' & image!='') {dsm_viewhtmlstream+='<TABLE WIDTH=98% BORDER=0 CELLPADDING=0 CELLSPACING=0><TR>'}
if (dsm_viewtablemode=='YES' & image!='' & format=='ALIGN=LEFT') {dsm_viewhtmlstream+='<TD WIDTH=10% VALIGN=TOP ALIGN=CENTER>'+image+'</TD><TD WIDTH=23>&nbsp;</TD><TD VALIGN=TOP>'}
if (dsm_viewtablemode=='YES' & image!='' & format=='ALIGN=RIGHT') {dsm_viewhtmlstream+='<TD VALIGN=TOP>'}
if (dsm_viewtablemode!='YES' & image!='') {dsm_viewhtmlstream+=image}
// title..
if (title!='' & (dsm_viewtablemode=='NO' & image=='')) {dsm_verticalspace='<IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=10 BORDER=0><BR>'} else {dsm_verticalspace=''}
// ...bullet pour les publications sauf actualit&eacute; bancaire
if (dsm_IsPublication=='YES' & dsm_docnumber>dsm_viewformatoffset & dsm_viewcurrentcategory!='53CD3Q') {var dsm_viewbullet=''} else {var dsm_viewbullet=''}
if (title!='' & link !='' & dsm_viewhighlightmode!='FRAME') {dsm_viewhtmlstream+=dsm_verticalspace+dsm_viewbullet+'<SPAN CLASS="viewtitle"><A HREF="/'+dsm_webdbname+'/'+link+'" CLASS="viewtitle">'+title+'</A></SPAN>'+_doViewSecurityIcon(role)+'<BR>'}
if (title!='' & link =='' & dsm_viewhighlightmode!='FRAME') {dsm_viewhtmlstream+=dsm_verticalspace+dsm_viewbullet+'<SPAN CLASS="viewtitle">'+title+'</SPAN>'+_doViewSecurityIcon(role)+'<BR>'}
// headline
if (specialtype!='HEADER') {dsm_verticalspace='<IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=5 BORDER=0><BR>'}
if (headline!='') {dsm_viewhtmlstream+=dsm_verticalspace+'<SPAN CLASS="viewheadline">'+headline+'</SPAN><BR>'}
// source and date & more
if (documentdate!='' | documentsource!='') {dsm_viewhtmlstream+='<IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=5>'}
if (dsm_IsPublication=='YES')
{
// numero pour actualit&eacute; bancaire
if (documentdate!='' | more!='') {dsm_viewhtmlstream+='<BR>'}
if (dsm_viewcurrentcategory=='53CD3Q' & more!='') {dsm_viewhtmlstream+='<SPAN CLASS="viewdatethin">N&deg; '+more+' - </SPAN>'}
if (documentdate!='') {dsm_viewhtmlstream+='<SPAN CLASS="viewdatethin">'+documentdate+'</SPAN>'}
if (documentdate!='' | more!='') {dsm_viewhtmlstream+='<BR>'}
// hauteur minimale pour les cases doubles colonnes.
if (dsm_viewformattype==2 & dsm_docnumber>dsm_viewformatoffset) {
if (title.length<40) {dsm_viewhtmlstream+='<BR><IMG SRC="/icons/ecblank.gif" HEIGHT=28 WIDTH=1 BORDER=0>'}
else if (title.length<75) {dsm_viewhtmlstream+='<BR><IMG SRC="/icons/ecblank.gif" HEIGHT=8 WIDTH=1 BORDER=0>'}
else {dsm_viewhtmlstream+=''}
}
}
else 
{if (documentdate!='') {dsm_viewhtmlstream+='<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 CLASS="viewdate"><TR><TD WIDTH=55 CLASS="viewdatetitle" VALIGN=TOP>Date :</TD><TD CLASS="viewdate" VALIGN=TOP>'+documentdate+'</TD></TR></TABLE>'}
if (documentsource!='') {dsm_viewhtmlstream+='<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 CLASS="viewdate"><TR><TD WIDTH=55 CLASS="viewdatetitle" VALIGN=TOP>Source :</TD><TD CLASS="viewdate" VALIGN=TOP>'+documentsource+'</TD></TR></TABLE>'}
}
if (dsm_viewtablemode=='YES' & image!='' & format=='ALIGN=RIGHT') {dsm_viewhtmlstream+='</TD><TD WIDTH=23>&nbsp;</TD><TD VALIGN=TOP ALIGN=CENTER WIDTH=10%>'+image}
if (dsm_viewtablemode=='YES' & image!='') {dsm_viewhtmlstream+='</TD></TR></TABLE>'}
// Links block
// Table and cell dimensions...
/* window.alert("highlight: "+dsm_viewhighlightmode +"subheading: "+ dsm_viewsubheadingmode); */
if (dsm_viewformattype==2 & dsm_docnumber>dsm_viewformatoffset) {var dsm_linkcellwidth='267' ; var dsm_link1cellwidth='79';var dsm_link2cellwidth='191';} 
else if (dsm_viewhighlightmode=='NONE' & dsm_viewsubheadingmode=='') {var dsm_linkcellwidth='451';var dsm_link1cellwidth='94';var dsm_link2cellwidth='351';}
else if (dsm_viewhighlightmode=='FRAME' & dsm_viewsubheadingmode=='') {var dsm_linkcellwidth='553';var dsm_link1cellwidth='94';var dsm_link2cellwidth='453';}
else if (dsm_viewhighlightmode=='NONE' & dsm_viewsubheadingmode=='FRAME') {var dsm_linkcellwidth='425';var dsm_link1cellwidth='34';var dsm_link2cellwidth='385';}

if (link!='') {link='<SPAN ALIGN=RIGHT><A HREF="/'+dsm_webdbname+'/'+link+'" CLASS="viewsmall">Lire la suite</A></SPAN>'}
if (link=='' & downloadfile!='') {link='<SPAN CLASS="viewsmall" STYLE="text-decoration:none">Lire</SPAN>'}
if (downloadfile) {downloadfile+=''}
if (relatedint!='') {relatedint+='<BR>'}

if (link+downloadfile+relatedint+relatedext!='' & dsm_IsPublication=='NO') {
/* bloc de lien avec filet vers le bas */
dsm_viewhtmlstream+='<IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=12><TABLE WIDTH='+dsm_linkcellwidth+' BORDER=0 CELLPADDING=0 CELLSPACING=0><TR HEIGHT=16><TD WIDTH=1 BGCOLOR=347A7E><IMG SRC="/icons/ecblank.gif" WIDTH=1></TD><TD BGCOLOR=F7F0E3 WIDTH='+dsm_link1cellwidth+' VALIGN=TOP ALIGN=RIGHT>'+link+'</TD><TD WIDTH=2 BGCOLOR=F7F0E3><IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=1></TD><TD WIDTH=2 BGCOLOR=E9DEC8><IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=1></TD><TD BGCOLOR=E9DEC8 VALIGN=TOP WIDTH='+dsm_link2cellwidth+' CLASS="viewsmall2">'+downloadfile+relatedint+relatedext+'<IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=1></TD><TD WIDTH=1 BGCOLOR=347A7E><IMG SRC="/icons/ecblank.gif" WIDTH=1></TD></TR><TR><TD><IMG SRC="/cfonb_img/sep_vertical_link.gif" WIDTH=1></TD><TD COLSPAN=4>&nbsp;</TD><TD><IMG SRC="/cfonb_img/sep_vertical_link.gif" WIDTH=1></TD></TR></TABLE>'
}
else if (link+downloadfile+relatedint+relatedext!='' & dsm_IsPublication=='YES' & dsm_viewhighlightmode=='FRAME') {
/* bloc de lien avec filet vers le haut */
dsm_viewhtmlstream+='<TABLE WIDTH='+dsm_linkcellwidth+' BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD><IMG SRC="/cfonb_img/sep_vertical_link2.gif" WIDTH=1></TD><TD COLSPAN=4>&nbsp;</TD><TD><IMG SRC="/cfonb_img/sep_vertical_link2.gif" WIDTH=1></TD></TR><TR HEIGHT=16><TD WIDTH=1 BGCOLOR=347A7E><IMG SRC="/icons/ecblank.gif" WIDTH=1></TD><TD BGCOLOR=F7F0E3 WIDTH='+dsm_link1cellwidth+' VALIGN=TOP ALIGN=RIGHT>'+link+'</TD><TD WIDTH=2 BGCOLOR=F7F0E3><IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=1></TD><TD WIDTH=2 BGCOLOR=E9DEC8><IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=1></TD><TD BGCOLOR=E9DEC8 VALIGN=TOP WIDTH='+dsm_link2cellwidth+' CLASS="viewsmall2">'+downloadfile+relatedint+relatedext+'<IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=1></TD><TD WIDTH=1 BGCOLOR=347A7E><IMG SRC="/icons/ecblank.gif" WIDTH=1></TD></TR></TABLE>'
}
else if (link+downloadfile+relatedint+relatedext!='')
{
/* bloc de lien sans filet */
dsm_viewhtmlstream+='<IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=12><TABLE WIDTH='+dsm_linkcellwidth+' BORDER=0 CELLPADDING=0 CELLSPACING=0><TR HEIGHT=16><TD WIDTH=1 BGCOLOR=FFFFFF><IMG SRC="/icons/ecblank.gif" WIDTH=1></TD><TD BGCOLOR=F7F0E3 WIDTH='+dsm_link1cellwidth+' VALIGN=TOP ALIGN=RIGHT>'+link+'</TD><TD WIDTH=2 BGCOLOR=F7F0E3><IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=1></TD><TD WIDTH=2 BGCOLOR=E9DEC8><IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=1></TD><TD BGCOLOR=E9DEC8 VALIGN=MIDDLE WIDTH='+dsm_link2cellwidth+' CLASS="viewsmall2">'+downloadfile+relatedint+relatedext+'<IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=1></TD><TD WIDTH=1 BGCOLOR=FFFFFF><IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=1></TD></TR></TABLE>';
}
// line separaton
var dsm_viewseparator='';
// actu bancaire, lettre eci
if (specialtype!='HEADER' & dsm_docnumber>dsm_viewformatoffset & (dsm_viewcurrentcategory=='53CD3Q' | dsm_viewcurrentcategory=='5HJLLS')){dsm_viewseparator='<IMG SRC="/cfonb_img/sep_lightblue2.gif" VSPACE=15><BR>'}
else if (dsm_viewhighlightmode=='NONE' & dsm_viewsubheadingmode==''){dsm_viewseparator='<BR>'}
else if (dsm_viewhighlightmode!='FRAME' & dsm_viewsubheadingmode=='FRAME' & specialtype!='HEADER') {dsm_viewseparator='<IMG SRC="/cfonb_img/sep_lightblue_small.gif" VSPACE=15>';}
else if (dsm_viewhighlightmode!='FRAME' & dsm_viewsubheadingmode!='FRAME' & specialtype!='HEADER'){dsm_viewseparator='<IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=10><BR><IMG SRC="/cfonb_img/sep_lightblue.gif"><BR><IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=29>';}
else if (specialtype=='HEADER') {dsm_viewseparator='<BR>'}
else {dsm_viewseparator=''}

// close table
if (dsm_viewformattype==1 | dsm_viewstarttable==0 | (dsm_docnumber<=dsm_viewformatoffset)) {dsm_viewhtmlstream+='</TD></TR></TABLE>'+dsm_viewseparator;dsm_viewstarttable=1;} else {dsm_viewhtmlstream+='</TD><TD WIDTH=10>&nbsp;</TD><TD VALIGN=TOP WIDTH='+dsm_viewcellwidth+'%>';dsm_viewstarttable=0;}

// highlight
_doHighlight(dsm_viewhtmlstream,dsm_viewhighlightmode,title);

} // fin else pas headline

if (dsm_debugmode=='ON') {document.write('<TEXTAREA>'+dsm_viewhtmlstream+'</TEXTAREA>')}
//re-init for next doc
dsm_viewhtmlstream='';dsm_docnumber+=1;
}

var dsm_debugmode='OFF';
/* stop js errors 
function stopError() {return true;}
window.onerror=stopError; */

/*Init some global page variables*/
// Is this a PUBLICATION
if (dsm_viewcategory1=='53CCM2' & (dsm_viewcurrentcategory=='53CD3Q' | dsm_viewcurrentcategory=='53CD3X' | dsm_viewcurrentcategory=='53CD3G')) 
{dsm_IsPublication='YES'} else {dsm_IsPublication='NO'}

// set page title
if (document.title=='') {document.title='Bienvenue sur le site du CFONB';}

/*Tools*/
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 setParameter (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/cfonb/cfonbmain.nsf?OpenDatabase'}
if (queryString.indexOf(pname)==-1){return queryString+'&'+pname+'='+p}
else {return queryString.substring(0,queryString.indexOf(pname)-1)+'&'+pname+'='+p}}
else {return ''}
}

/*browser sniffing*/
var isMac=false;
if (navigator.userAgent.indexOf("Mac")!=-1) {isMac=true;}
document.write('<STYLE>');
if (isMac==true) {document.write('#LayerYouarehere {position:absolute; top:5; left:150; width:750; height:15; z-index:2; visibility:visible;}');}
else {document.write('#LayerYouarehere {position:absolute; left:5; top:3; width:750; height:15; clip:rect(0,750,15,0);}');}
document.write('</STYLE>');

function convertDateToEN(ddmmyyyy) {
var dd=ddmmyyyy.substring(0,2);
var mm=ddmmyyyy.substring(3,5);
var yyyy=ddmmyyyy.substring(6,10);
var mmddyyyy=mm+'/'+dd+'/'+yyyy;
return(mmddyyyy);}

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;}

/*Image in correct skin*/
function _doImg (img,alt) {document.write('<IMG BORDER=0 SRC="/'+dsm_skin+'_img/'+ img+'" ALT="'+alt+'" STYLE="border: 0px">');}

/*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);}

/* Display for role */
function _doOkToDisplay(role) {
tmp_role_array=role.split(";");
tmp_return=false;
for (var i=0; i < tmp_role_array.length; i++) {
for (var j=0; j < dsm_userprivilege_array.length; j++) {if (role=='' | dsm_userprivilege_array[j]=='['+tmp_role_array[i]+']') {tmp_return=true};}}
return tmp_return;}

/*Printable Version*/
function _doPrintableVersion (printable) {if (printable!="NO") {document.write('<TR><TD COLSPAN=2><A HREF="javascript:_doWindow(\'/'+dsm_webdbname+'/DocumentsPrintBYIDWeb/'+dsm_documentid +'?OpenDocument\',\'658\',\'500\')"><IMG SRC="/'+dsm_skin+'_img/action_print.gif" BORDER=0 ALT="Cliquez ici pour obtenir une version imprimable de ce document"></A><BR><IMG SRC="/cfonb_img/sep_brown.gif"></TD></TR>');}}

/*Download Files*/
function _doDownloadFiles(filename,filesize,fileext) {
if (filename!="") {
var tmpfilesize="";
if (filesize!="" & filesize!="undefined" & filesize!=null & filesize!="null") {tmpfilesize=Math.round((filesize/1000))}
if (fileext=='pdf'){dsm_downloadstyle='smalltextred';} else {dsm_downloadstyle='smalltext';}
document.write('<TR><TD COLSPAN=2 BGCOLOR=E9DEC8><IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=3></TD></TR><TR HEIGHT=22><TD WIDTH=40 ALIGN=CENTER BGCOLOR=E9DEC8><IMG SRC="/cfonb_img/icon_'+fileext+'.gif" BORDER=0></TD><TD WIDTH=478 BGCOLOR=E9DEC8><SPAN CLASS="normaltext"><A HREF="'+dsm_documentid+'/$File/'+filename+'?OpenElement&loglvl='+dsm_viewcurrentcategory+'" CLASS="'+dsm_downloadstyle+'">'+filename +'  - [t&eacute;l&eacute;chargement  '+tmpfilesize+'ko]</A></SPAN></TD></TR>');
}
}

/*Send To*/
function _doSendToAFriend (allowed) {if (allowed=='YES') {document.write('<TR><TD COLSPAN=2><A HREF="javascript:_doWindow2 (\'/Web/Incoming.nsf/ExtranetSendToAFriend?ReadForm&DocumentID='+dsm_documentid+'\',408, 185)"><IMG SRC="/'+dsm_skin+'_img/action_sendto.gif" BORDER=0></A></TD></TR><TR><TD COLSPAN=2 BGCOLOR=E9DEC8><IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=3></TD></TR>');}}

/*English Version*/
function _doLanguageSwitch (langue,id) {
if (langue=='FR') {dsm_text_languageswitch='French Version'} else {dsm_text_languageswitch='Version anglaise'}
if (id!='') {document.write('<TR><TD COLSPAN=2 BGCOLOR=F3EBDE><IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=3></TD></TR><TR HEIGHT=22 VALIGN=MIDDLE><TD WIDTH=7% ALIGN=CENTER BGCOLOR=F3EBDE><A HREF="/'+dsm_webdbname+'/DocumentsByIDWeb/'+id+'?OpenDocument"><IMG SRC="/'+dsm_skin+'_img/action_switch_'+langue+'.gif" BORDER=0></A></TD><TD WIDTH=93% BGCOLOR=F3EBDE><A HREF="/'+dsm_webdbname+'/DocumentsByIDWeb/'+id+'?OpenDocument" CLASS="smalltext">'+dsm_text_languageswitch+'</A></TD></TR><TR><TD COLSPAN=2 BGCOLOR=F3EBDE><IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=3></TD></TR>')}}

/*You are Here HTML*/
function _doYouAreHere (html) {if (html!="") {document.write(html+'<BR>')}}

/*views HTML*/

// This part can be customized here or in th domino form
var dsm_viewformattype=1;// 1 or 2 column display
var dsm_viewformatoffset=1;// start multi colone display after this number of doc
var dsm_viewtablemode='YES';// build table for image or use image align tag

var dsm_viewhighlightmode='';// highlight default mode

var dsm_viewsubheadingmode='';// sub heading default mode
var dsm_viewsubheadingmodeclose='0';// must the subheading be closed by the ViewEnd function

var dsm_closemainheading='NO';// must the main heading be closed by the ViewEnd function
// End customisation

// variable initialisation
var dsm_currentindex=eval(getParameter(self.location.href,'Start'));
if (dsm_currentindex!='null' & dsm_currentindex!=null) {var dsm_docnumber=dsm_currentindex} else {var dsm_docnumber=1;dsm_currentindex=1}
var dsm_viewhtmlstream='';
var dsm_viewstarttable=1;
var dsm_verticalspace='';
var dsm_horizontalsapce='';



var dsm_userprivilege_array=dsm_userprivilege.split(";")
function _doViewSecurityIcon(role , doc_or_lev) {
if (doc_or_lev==null | doc_or_lev=='' | doc_or_lev=='1') {tmp_alt='Vous b&eacute;n&eacute;ficiez d\'un acc&egrave;s privil&eacute;gi&eacute; &agrave; ce document'} else {tmp_alt='Vous b&eacute;n&eacute;ficiez d\'un acc&egrave;s privil&eacute;gi&eacute; &agrave; cette cat&eacute;gorie de  documents'}
if (role=='') {return''}
else if (role=='WebPrivilege1' | role=='WebPrivilege12') {return '<IMG SRC="/cfonb_img/icon_locksherpa.gif" BORDER=0 HSPACE=5 ALT="'+tmp_alt+'">';}
else {return '<IMG SRC="/cfonb_img/icon_lock.gif" BORDER=0 HSPACE=5 ALT="'+tmp_alt+'">'}}

function _doDocEnd() {
 if (dsm_closemainheading=='YES') {document.write('</TD></TR></TABLE>') }
}

/*View - Sub heading*/
function _doSubHeading(headingtext,headingmode) {
if (dsm_debugmode=='ON') {window.alert("subheading: "+headingtext+" - "+headingmode)}
// frame around group of doc without picture (generally all but first doc of list)
if (headingtext!="" & headingmode=='') {dsm_viewhtmlstream+='<BR><TABLE WIDTH=573 CELLPADDING=0 CELLSPACING=0 BORDER=0><TR><TD WIDTH=10 ROWSPAN=2><IMG SRC="/cfonb_img/subheadingblue.gif" ></TD><TD>&nbsp;&nbsp;<SPAN CLASS="heading"><B>'+headingtext+'&nbsp;</B></SPAN></TD></TR><TR><TD BGCOLOR=D6EFFF><IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=2></TD></TR></TABLE><BR>';}
// frame around group of docs with picture (generally all but first doc of list)
else if (headingmode=='FRAME') {dsm_viewhtmlstream+= '<TABLE WIDTH=573 CELLPADDING=0 CELLSPACING=0 BORDER=0><TR><TD WIDTH=10 ROWSPAN=2 VALIGN=BOTTOM><IMG SRC="/cfonb_img/highlight_1_top1.gif" ></TD><TD VALIGN=TOP><IMG SRC="/cfonb_img/highlight_1_top2.gif" ALIGN=TOP><SPAN CLASS="heading"><B>'+headingtext+'</B></SPAN></TD></TR><TR><TD BGCOLOR=D6EFFF><IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=2></TD></TR></TABLE><TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD WIDTH=10% VALIGN=TOP><IMG SRC="/cfonb_img/subheadingtest.gif"></TD><TD WIDTH=35>&nbsp;</TD><TD VALIGN=TOP><IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=10><BR>'}
}

/*View - Highlight a document*/
function _doHighlight (texttohighlight,highlightmode,title) {
if (dsm_debugmode=='ON') {window.alert("Highlight: " +highlightmode)}
if (highlightmode=='NONE') {document.write(texttohighlight)}
if (highlightmode=='BR') {document.write(texttohighlight+'<BR>')}
// small blue line after doc
if (highlightmode=='BLUE_LINE_SMALL') {document.write(texttohighlight+'<BR><IMG SRC="/cfonb_img/sep_lightblue_small.gif" HSPACE=6 VSPACE=10><BR>')}
// blue line after the doc or group of 2 docs
if (highlightmode=='BLUE_LINE') {document.write(texttohighlight+'<BR>high2<IMG SRC="/cfonb_img/sep_lightblue.gif"><BR><BR>')}
// frame around the doc (generally 1st doc...)
if (highlightmode=='FRAME') {document.write('<TABLE WIDTH=573 CELLPADDING=0 CELLSPACING=0 BORDER=0><TR><TD WIDTH=10 ROWSPAN=2 VALIGN=BOTTOM><IMG SRC="/cfonb_img/highlight_1_top1.gif"></TD><TD VALIGN=TOP><IMG SRC="/cfonb_img/highlight_1_top2.gif" ALIGN=TOP><SPAN CLASS="heading"><B>'+title+'</B></SPAN></TD></TR><TR><TD BGCOLOR=D6EFFF><IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=2></TD></TR></TABLE><TABLE WIDTH=98% CELLPADDING=0 CELLSPACING=0 BORDER=0><TR><TD VALIGN=TOP WIDTH=10><IMG SRC="/cfonb_img/highlight_1_left1.gif"></TD><TD VALIGN=TOP>'+texttohighlight+'</TD></TR><TR><TD COLSPAN=2>&nbsp;</TD></TR></TABLE><BR>')}
}

/*View - terminate view*/
function _doViewEnd () {
// Close table if 2 columns-display and last cell empty
if (dsm_viewstarttable==0 | (dsm_docnumber<=dsm_currentindex & dsm_docnumber<=dsm_viewformatoffset)) {document.write('&nbsp;</TD></TR></TABLE>')}
//Close the sub heading if FRAME
if (dsm_viewsubheadingmodeclose=='1') {document.write('</TD></TR></TABLE>');}
//finally close table if main heading requires it
if (dsm_closemainheading=='YES') {document.write('</TD></TR></TABLE>');}
}

/*View & Doc - Main Heading*/
function _doHeading(heading,headingtext1,headingtext2, isFBF , useDocumentID) {
if (useDocumentID=="YES")
//simple heading (webmaster document)
{
document.write('<TABLE WIDTH=573 CELLPADDING=0 CELLSPACING=0 BORDER=0><TR><TD WIDTH=10 ROWSPAN=2><IMG SRC="/'+dsm_skin+'_img/heading_'+dsm_documentid+'.gif" ></TD><TD ALIGN=RIGHT><SPAN CLASS="heading">&nbsp;</SPAN></TD></TR><TR><TD BGCOLOR=94BDF6><IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=2></TD></TR></TABLE><BR>');
}
else if (heading!="" & isFBF!="YES"  & dsm_IsPublication=='NO') {
document.write('<TABLE WIDTH=573 CELLPADDING=0 CELLSPACING=0 BORDER=0><TR><TD WIDTH=10 ROWSPAN=2><IMG SRC="/'+dsm_skin+'_img/heading_'+heading+'.gif" ></TD><TD ALIGN=RIGHT><SPAN CLASS="heading">'+headingtext1+'&nbsp;</SPAN></TD></TR><TR><TD BGCOLOR=94BDF6><IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=2></TD></TR></TABLE><BR>');

/* level1 in the content db, we must indent content*/
if (headingtext2=='' & dsm_IsPublication=='NO' & dsm_documentid=='' & dsm_webdbname=='web/cfonb/cfonbmain.nsf'){
document.write('<IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=1><TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD WIDTH=60>&nbsp;</TD><TD VALIGN=TOP><IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=1><BR>');
dsm_closemainheading='YES';}

/* level2..5 , subheading+indent content in view*/
if (headingtext2!='' & dsm_IsPublication=='NO' & dsm_documentid==''){
document.write('<IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=1><TABLE WIDTH=98% BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD COLSPAN=2 ><TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0 BORDER=0><TR><TD WIDTH=10 ROWSPAN=2><IMG SRC="/cfonb_img/subheadingblue.gif" ></TD><TD>&nbsp;&nbsp;<SPAN CLASS="headinglevel2"><B>'+headingtext2+'&nbsp;</B></SPAN></TD></TR><TR><TD BGCOLOR=D6EFFF><IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=2></TD></TR></TABLE></TD></TR><TR><TD WIDTH=60><IMG SRC="/icons/ecblank.gif" WIDTH=60></TD><TD VALIGN=TOP><IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=16><BR>');
dsm_closemainheading='YES';}

/* level2..5 , subheading+indent content more in document*/
if (headingtext2!='' & dsm_IsPublication=='NO' & dsm_documentid!=''){
document.write('<IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=26><TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD WIDTH=55>&nbsp;</TD><TD WIDTH=518><BR><TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0 BORDER=0><TR><TD WIDTH=10 ROWSPAN=2><IMG SRC="/cfonb_img/subheadingblue.gif" ></TD><TD>&nbsp;&nbsp;<SPAN CLASS="headinglevel2"><B>'+headingtext2+'&nbsp;</B></SPAN></TD></TR><TR><TD BGCOLOR=D6EFFF><IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=2></TD></TR></TABLE></TD></TR><TR><TD>&nbsp;</TD><TD VALIGN=TOP><IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=16><BR>');
dsm_closemainheading='YES';}

}


// Publication
else if (heading!="" & dsm_IsPublication=='YES') {
document.write('<TABLE WIDTH=573 CELLPADDING=0 CELLSPACING=0 BORDER=0><TR><TD WIDTH=10 ROWSPAN=2><IMG SRC="/'+dsm_skin+'_img/heading_'+dsm_viewcurrentcategory+'.gif" ></TD><TD ALIGN=RIGHT><SPAN CLASS="heading">'+headingtext1+'&nbsp;</SPAN></TD></TR><TR><TD BGCOLOR=94BDF6><IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=2></TD></TR></TABLE><BR>');
}
else if (heading!="" & isFBF=="YES") {
// date et imprimer
if(headingtext1!="") {headingtext1+='&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<IMG SRC="/cfonb_img/sep_vertical_blue.gif">'}
document.write('<TABLE WIDTH=573 CELLPADDING=0 CELLSPACING=0 BORDER=0><TR><TD WIDTH=10 ROWSPAN=2><IMG SRC="/'+dsm_skin+'_img/heading_'+heading+'.gif" ></TD><TD ALIGN=RIGHT VALIGN=MIDDLE><SPAN CLASS="default">'+headingtext1+'&nbsp;</SPAN><A HREF="#" Onclick="_doWindow(\'/'+dsm_webdbname+'/DocumentsPrintBYIDWeb/'+dsm_documentid +'?OpenDocument\',\'658\',\'500\');return false;"><IMG SRC="/cfonb_img/action_printheading.gif" BORDER=0></A></TD></TR><TR><TD BGCOLOR=94BDF6><IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=2></TD></TR></TABLE><BR>');
}

else {document.write("<BR>")}
}
var dsm_subcatpane_header='<TABLE WIDTH=511 CELLPADDING=0 CELLSPACING=0 BORDER=0><TR><TD WIDTH=60>&nbsp;</TD><TD WIDTH=451 COLSPAN=2 VALIGN=BOTTOM><IMG SRC="/cfonb_img/heading_subcategorypane.gif" WIDTH=451></TD></TR><TR><TD>&nbsp;</TD><TD COLSPAN=2 BGCOLOR=E3E2C6>&nbsp;</TD></TR>';

var dsm_subcatpane_footer='<TR><TD>&nbsp;</TD><TD COLSPAN=2 BGCOLOR=E3E2C6>&nbsp;</TD></TR></TABLE>';

function _doAddToSubCatPane(url, text, role) {
tmp_string='<TR><TD>&nbsp;</TD><TD WIDTH=23 BGCOLOR=E3E2C6>&nbsp;</TD><TD WIDTH=428 BGCOLOR=E3E2C6><IMG SRC="/cfonb_img/triangle_red2.gif">&nbsp;<A HREF="'+url+'" CLASS="viewtitle">'+text+'</A>'+_doViewSecurityIcon(role , 'lev') +'</TD></TR>';
if (role.indexOf('WebPrivilege')==-1 | _doOkToDisplay(role)==true) {dsm_subcatpane+=tmp_string}}
