var dsm_debugmode='OFF';
/*function stopError() {return true;} 
window.onerror=stopError; */

// set page title
if (document.title=='') {document.title='Bienvenue sur le site internet de l AFB';}

////////////////////////////
/*you are here positionning*/
///////////////////////////
var isMac=false;
if (navigator.userAgent.indexOf("Mac")!=-1) {isMac=true;}
document.write('<STYLE>');
if (isMac==true) {document.write('#LayerYouarehere {position:absolute; top:133; left:175; width:602; height: 16; z-index:2; visibility:visible;}');}
else {document.write('#LayerYouarehere {position:absolute; top:133 ; left:175 ; width:602; height: 16; clip:rect(0,602,30,0);}');}
document.write('</STYLE>');

/////////////////
/*     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/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 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;}

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);}


////////////////////////
/* Image in correct skin*/
///////////////////////
function _doImg (img,alt) {document.write('<IMG SRC="/'+dsm_skin+'_img/'+ img+'" BORDER=0 ALT="'+alt+'" STYLE="border: 0px">');}

/////////////////////////////
/*Popup with / 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;}

/////////////////
/* Security Icon */
////////////////
var dsm_userprivilege_array=dsm_userprivilege.split(";");
function _doViewSecurityIcon(role,levelordoc) {
if (role !="" & levelordoc=="level") {return "&nbsp;<img src=\"/internet_img/left_lock.gif\" ALT=\"Vous bénéficiez d\'un accès privilégié à cette rubrique\">"} 
else if (role !="") {return "&nbsp;<img src=\"/internet_img/left_lock.gif\" ALT=\"Vous bénéficiez d\'un accès privilégié à ce document\">"} 
else {return ""}}

///////////////////////////
/*Link to Printable Version*/
//////////////////////////
if (dsm_languagesite=='EN') {dsm_text_linktoprintable='Print'} else {dsm_text_linktoprintable='Imprimer'}
function _doPrintableVersion (printable) {if (printable!="NO") {document.write('<TR HEIGHT=18 VALIGN=MIDDLE><TD WIDTH=34 BGCOLOR=CEE7E7><A HREF="javascript:_doWindow(\'/'+dsm_webdbname+'/DocumentsPrintBYIDWeb/'+dsm_documentid +'?OpenDocument\',\'416\',\'500\')"><IMG SRC="/'+dsm_skin+'_img/action_print.gif" BORDER=0 ALT="Cliquez ici pour obtenir une version imprimable de ce document"></A></TD><TD BGCOLOR=CEE7E7><A HREF="javascript:_doWindow(\'/'+dsm_webdbname+'/DocumentsPrintBYIDWeb/'+dsm_documentid +'?OpenDocument\',\'416\',\'500\')"><SPAN CLASS="smalltext">'+dsm_text_linktoprintable+'</A></TD></TR><TR><TD COLSPAN=2><IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=1></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 WIDTH=34 BGCOLOR=CEE7E7><IMG SRC="/internet_img/icon_'+fileext+'.gif" BORDER=0></TD><TD WIDTH=478 BGCOLOR=CEE7E7><SPAN CLASS="normaltext"><A HREF="'+dsm_documentid+'/$File/'+filename+'" CLASS="'+dsm_downloadstyle+'">'+filename +'  - [t&eacute;l&eacute;chargement  '+tmpfilesize+'ko]</A></SPAN></TD></TR>');}
}

//////////////////////
/*  Send To a friend  */
/////////////////////
if (dsm_languagesite=='EN') {dsm_text_linksendto='Mail this document'} else {dsm_text_linksendto='Envoyer ce document'}
function _doSendToAFriend (allowed) {
if (allowed=='YES') {document.write('<TR><TD BGCOLOR=CEE7E7><A HREF="javascript:_doWindow2 (\'/Web/Incoming.nsf/InternetSendToAFriend?ReadForm&DocumentID='+dsm_documentid+'&Language='+dsm_languagesite+'\',373, 215)"><IMG SRC="/'+dsm_skin+'_img/action_sendto.gif" ALT="'+dsm_text_linksendto+'"BORDER=0></A></TD><TD BGCOLOR=CEE7E7><A HREF="javascript:_doWindow2 (\'/Web/Incoming.nsf/InternetSendToAFriend?ReadForm&DocumentID='+dsm_documentid+'&Language='+dsm_languagesite+'\',373, 215)"><SPAN CLASS="smalltext">'+dsm_text_linksendto+'</A></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 BGCOLOR=DFF0F7><A HREF="/Web/Internet/Intermain.nsf/DocumentsByIDWeb/'+id+'?OpenDocument"><IMG SRC="/'+dsm_skin+'_img/action_switch_'+langue+'.gif" BORDER=0></A></TD><TD BGCOLOR=DFF0F7>'+dsm_text_languageswitch+'</TD></TR>')}
}

////////////////////////
/*You are Here HTML */
///////////////////////
function _doYouAreHere (html) {if (html!="" & dsm_viewcategory1!='59GLKV') {document.write(html)}}

/////////////////////////
/* Sub categories pane */
/////////////////////////
var dsm_subcatpane_header='<TABLE WIDTH=589 CELLPADDING=0 CELLSPACING=0 BORDER=0><TR><TD BGCOLOR=E2ECEE VALIGN=BOTTOM><IMG SRC="/internet_img/heading_subcategorypane.gif" WIDTH=589 HEIGHT=23><BR><BR></TD></TR>';
var dsm_subcatpane_footer='<TR><TD><IMG SRC="/internet_img/footer_subcategorypane.gif" WIDTH=589 HEIGHT=17></TD></TR></TABLE>';
function _doAddToSubCatPane(url, text) {tmp_string='<TR><TD BGCOLOR=E2ECEE><IMG SRC="/internet_img/triangle_red.gif" ALIGN=TOP>&nbsp;&nbsp;<A HREF="'+url+'" CLASS="viewsubcategory">'+text+'</A></TD></TR>';dsm_subcatpane+=tmp_string}

//
/* Filet gris */
//
function _doFilet(htmlcode) {document.write('<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0 BORDER=0><TR><TD WIDTH=70% BACKGROUND="/internet_img/filet_bgleft.gif">'+htmlcode+'&nbsp;</TD><TD WIDTH=10% ><IMG SRC="/internet_img/filet_middle.gif"></TD><TD WIDTH=20%  BACKGROUND="/internet_img/filet_bgright.gif">&nbsp;</TD></TR></TABLE>');}
//***************************************
// Views
//***************************************

// Localisation
if (dsm_languagesite=='EN') {
dsm_text_source='By';
dsm_text_linktodoc='more...';
}
else {
dsm_text_source='Source';
dsm_text_linktodoc='lire la suite'
}

// End Localisation

// customisation here or in the domino form (cat1...cat5)
var dsm_viewformattype=1;// 1 or 2 columns display
var dsm_viewformatoffset=1;// start multi column display after this number of doc
var dsm_viewtablemode='YES';// build table for image or use image align html tag
var dsm_viewhighlightmode='';// default highlight  mode
var dsm_viewsubheadingmode='';// default subheading  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='';

/////////////////////
// View main function
/////////////////////
function _doView (specialtype, title, headline, documentdate, documentsource, format, image, link, downloadfile, relatedint, relatedext, more, role) {

// if HEADER(entete) we increase offset and display text in simple manner
if (specialtype=='HEADER') {dsm_viewformatoffset+=1;dsm_viewstarttable=1;document.write('<BR><SPAN CLASS="viewheadline"><B>'+headline+'</B></SPAN><BR>')}

// Brochures
else if (dsm_viewcategory2=='59GGHA') {
if (image!='')  {tmpimg='<td ALIGN=CENTER VALIGN=CENTER width=120><img src="'+image+'"><td>'} else {tmpimg=''}
if (headline!='') {tmpheadline=headline+'<BR><BR>'} else {tmpheadline=''}
document.write('<BR><img src="/internet_img/icon_download.gif">&nbsp;<SPAN CLASS=viewtitle>'+title+'</SPAN><BR><BR><TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0 BORDER=0><TR>'+tmpimg+'<TD VALIGN=TOP>'+tmpheadline+'<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0 BORDER=0><TR><TD WIDTH=5 BGCOLOR=E2ECEE>&nbsp;</TD><TD BGCOLOR=E2ECEE WIDTH=138><BR><B>Date : </B>'+documentdate+'<BR><B>Source : </B>'+documentsource+'<BR><B>Public : </B>'+more+'</TD><TD VALIGN=TOP BGCOLOR=CBDDE1><BR>&nbsp;&nbsp;'+downloadfile+'</TD></TR><TD WIDTH=5 BGCOLOR=E2ECEE>&nbsp;</TD><TD BGCOLOR=E2ECEE>&nbsp;</TD><TD><IMG SRC="/internet_img/footer_brochures.gif"></TD></TR></TABLE></TD></TR></TABLE><BR>')}
// Fin Brochures

// Actu bancaires
else if (dsm_viewcategory2=='59GGHJ') {

if (dsm_docnumber==1) {
document.write('<BR><TABLE WIDTH=100% BORDER=0><TR><TD WIDTH=20% VALIGN=TOP><IMG SRC="/internet_img/visual_actubanque.gif"></TD><TD WIDTH=80% VALIGN=TOP><TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0><TR><TD WIDTH=70% VALIGN=TOP BACKGROUND="/internet_img/filet_bgleft.gif"><SPAN CLASS="viewtitle">'+title+'</SPAN></TD><TD WIDTH=10% ><IMG SRC="/internet_img/filet_middle.gif"></TD><TD WIDTH=20%  BACKGROUND="/internet_img/filet_bgright.gif">&nbsp;</TD></TR></TABLE><SPAN CLASS="viewsmall"><BR><BR>'+headline+'<BR><B>'+more +' - '+ documentdate +'</B><BR><BR><img src="/internet_img/icon_download.gif" ALIGN=MIDDLE>&nbsp;'+downloadfile+'</TD></TR></TABLE><TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0><TR><TD WIDTH=70% BACKGROUND="/internet_img/filet_bgleft.gif">&nbsp;</TD><TD WIDTH=10% ><IMG SRC="/internet_img/filet_middle.gif"></TD><TD WIDTH=20%  BACKGROUND="/internet_img/filet_bgright.gif">&nbsp;</TD></TR></TABLE>')} 

else {document.write('<BR><TABLE WIDTH=100% BORDER=0><TR><TD WIDTH=15 VALIGN=TOP><IMG SRC="/internet_img/triangle_blue.gif" VSPACE=2></TD><TD VALIGN=TOP><SPAN CLASS="viewtitle">'+title+'</SPAN><SPAN CLASS="viewsmall"><BR><B>'+more +' - '+ documentdate +'</B><BR><img src="/internet_img/icon_download.gif" ALIGN=MIDDLE>&nbsp;'+downloadfile+'</SPAN></TD></TR></TABLE>') ;}}
// Fin Actu bancaires

// phototeque
else if (dsm_viewcategory2=='59GLKK') {document.write('<BR>'+more+'<BR>')}
// fin phototèque

else {

//////////
//RULES
//////////
// 1 or 2 columns
if (dsm_viewcurrentcategory=='xxxxx') {dsm_viewformattype=2}
// subheading mode
if ((dsm_viewcurrentcategory=='xxxxxx') & (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}
// derniers numeros
if (dsm_docnumber==dsm_viewformatoffset+1 & (dsm_viewcurrentcategory=='xxxxxxx')) {_doSubHeading('les derniers num&eacute;ros', dsm_viewsubheadingmode);}
// highlight mode
if (dsm_docnumber==dsm_viewformatoffset & dsm_viewcurrentcategory=='xxxxxx') {dsm_viewhighlightmode='FRAME'} else if (specialtype=='HEADER') {dsm_viewhighlightmode='NONE'} else {dsm_viewhighlightmode='NONE'}
//////////////
//RULES END
//////////////


if (dsm_viewformattype==1 | (dsm_viewformattype==2 & dsm_docnumber<=dsm_viewformatoffset)) {var dsm_viewtablewidth='100';var dsm_viewcellwidth='100'} else {var dsm_viewtablewidth='100';var dsm_viewcellwidth='48'}

// marge ou bullet a gauche
if (dsm_viewformattype==1 & dsm_docnumber>dsm_viewformatoffset & dsm_viewcurrentcategory=='xxxxxx') {var dsm_viewtablemargin=''} 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

//date
if (documentdate!='') {
if (dsm_languagesite=='EN') {documentdate=convertDateToEN(documentdate)}
dsm_viewhtmlstream+='<BR><TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0 CLASS="viewdate"><TR><TD WIDTH=5% CLASS="viewdate" VALIGN=TOP  NOWRAP>'+documentdate+'</TD><TD BACKGROUND="/internet_img/background_view_date.gif">&nbsp;</TD></TR></TABLE><IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=4 BORDER=0><BR>'}

// title
if (title!='' & (dsm_viewtablemode=='NO' & image=='')) {dsm_verticalspace='<IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=10 BORDER=0><BR>'} else {dsm_verticalspace=''}
if (title!='' & link !='' & dsm_viewhighlightmode!='FRAME') {dsm_viewhtmlstream+=dsm_verticalspace+'<IMG SRC="/internet_img/triangle_blue.gif">&nbsp;<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+'<IMG SRC="/internet_img/triangle_blue.gif">&nbsp;<SPAN CLASS="viewtitle">'+title+'</SPAN>'+_doViewSecurityIcon(role)+'<BR>'}

//indent if triangle blue before title
dsm_viewhtmlstream+='<TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD WIDTH=10 VALIGN=TOP>&nbsp;</TD><TD VALIGN=TOP>';


// 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=='xxxxx') {image='<IMG SRC="/internet_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+='<IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=10><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=20>&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}



// headline
if (specialtype!='HEADER') {dsm_verticalspace=''}
if (headline!='') {dsm_viewhtmlstream+=dsm_verticalspace+'<SPAN CLASS="viewheadline">'+headline+'</SPAN>'}

// source and more
if (documentsource!='') {dsm_viewhtmlstream+='<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 CLASS="viewdate"><TR><TD WIDTH=35 CLASS="viewdatetitle" VALIGN=TOP>'+dsm_text_source+' :</TD><TD CLASS="viewdate" VALIGN=TOP>'+documentsource+'</TD></TR></TABLE>'}


// Links block
if (link!='') {link='<IMG SRC="/internet_img/icon_download.gif" BORDER=0 ALIGN=MIDDLE>&nbsp;&nbsp;<A HREF="/'+dsm_webdbname+'/'+link+'" CLASS="viewsmall">'+dsm_text_linktodoc+'</A>'}
if (downloadfile!='') {downloadfile='<IMG SRC="/internet_img/icon_download.gif" BORDER=0 ALIGN=MIDDLE>&nbsp;&nbsp;'+downloadfile+'<BR>'}
if (relatedint!='') {relatedint='<IMG SRC="/internet_img/icon_download.gif" BORDER=0 ALIGN=MIDDLE>&nbsp;&nbsp'+relatedint+'<BR>'}
if (relatedext!='') {relatedext='<IMG SRC="/internet_img/icon_download.gif" BORDER=0 ALIGN=MIDDLE>&nbsp;&nbsp'+relatedext+'<BR>'}

/* bloc */
if (link+downloadfile+relatedint+relatedext!='')
{dsm_viewhtmlstream+='<TABLE WIDTH=100%  BORDER=0 CELLPADDING=0 CELLSPACING=0><TR HEIGHT=16><TD VALIGN=MIDDLE CLASS="viewsmall2">'+link+downloadfile+relatedint+relatedext+'<IMG SRC="/icons/ecblank.gif" WIDTH=1 HEIGHT=1></TD></TR></TABLE>';}

//close image 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>'}

// close indent if triangle blue
dsm_viewhtmlstream+='</TD></TR></TABLE>'
// end inside element

// line separaton
var 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, ni brochure ni actu

// debug
if (dsm_debugmode=='ON') {document.write('<TEXTAREA>'+dsm_viewhtmlstream+'</TEXTAREA>')}

//re-init for next doc
dsm_viewhtmlstream='';dsm_docnumber+=1;
}


////////////////////////
/*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 subheading if needed
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 (dsm_languagesite=='EN' & (dsm_viewcategory2=='5A7DTJ') ) {document.write('<IMG SRC="/internet_img/heading_'+dsm_viewcategory2+'.gif" WIDTH=593 HEIGHT=23><BR>')}
else if (useDocumentID=="YES") {document.write('<IMG SRC="/internet_img/heading_'+dsm_documentid+'.gif" WIDTH=593 HEIGHT=23><BR>')}
else if (dsm_viewcategory2 != "") {document.write('<IMG SRC="/internet_img/heading_'+dsm_viewcategory2+'.gif" WIDTH=593 HEIGHT=23><BR>')}
}

// Doc - End
function _doDocEnd() {if (dsm_closemainheading=='YES') {document.write('</TD></TR></TABLE>')}}

// View - Subheading
function _doSubHeading(headingtext,headingmode) {}

// View - Highlight a document
function _doHighlight (texttohighlight,highlightmode,title) {document.write(texttohighlight)}
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

function _dSectionExpand(sec,linkurl) {
//we go to url from level1 only for some+English otherwise we expand the section
if (linkurl!='' & (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] !='66CE3A' & dsm_dhtmlsectionlist_array[i] !='66CEXK') { 
				 {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='/Web/Internet/Intermain.nsf/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=149 CELLPADDING=0 CELLSPACING=0 BORDER=0 BGCOLOR=E7831C><TR HEIGHT=16><TD WIDTH=15 VALIGN=TOP><a onclick="return _dSectionExpand(\''+category1+'\',\'\');"><IMG SRC="/internet_img/triangle_whitered.gif" border=0 ALIGN=TOP>&nbsp;</a></TD><TD WIDTH=134><SPAN CLASS="navigationlink"><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=149 CELLPADDING=0 CELLSPACING=0 BORDER=0 BGCOLOR=E7831C><TR HEIGHT=16><TD WIDTH=15 VALIGN=top><a onclick="return _dSectionCollapse(\''+category1+'\');" CLASS="navigationlink"><IMG SRC="/internet_img/triangle_whitered_selected.gif" border=0 ALIGN=TOP></a>&nbsp;</TD><TD WIDTH=134><SPAN CLASS="navigationlink"><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) {
// line separators before some categories
if (category1=="53CCN6" | category1=="54GMBX" | category1=="53CCLJ") {htmlcode += '<IMG SRC=\"/extranet_img/leftnav_sep.gif\" WIDTH=175>'}
// highlight the curent category
dsm_tmpsyle='navigationlink';
dsm_tmpimg='<IMG SRC="/internet_img/triangle_whitered.gif" ALIGN=TOP>&nbsp;';
if ((dsm_viewcategory1 == category1 & category1!="EN" ) | category1=='59GGGM' | category1=='59GGG2' | (dsm_languagesite=='ENO' & category1=='ENO')) {dsm_tmpimg='<IMG SRC="/internet_img/triangle_whitered_selected.gif">';}
if (dsm_viewcurrentcategory == category1) {dsm_tmpsyle='navigationlinkhighlited';}
return htmlcode+'<TABLE WIDTH=149 CELLPADDING=0 CELLSPACING=0 BORDER=0 BGCOLOR=E7831C><TR HEIGHT=16><TD WIDTH=15 ALIGN=CENTER>'+dsm_tmpimg+'</TD><TD WIDTH=134><SPAN CLASS="'+dsm_tmpsyle+'">'+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 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=149 CELLPADDING=0 CELLSPACING=0 BORDER=0 HEIGHT=10><TR><TD WIDTH=21 ALIGN=RIGHT VALIGN=TOP BGCOLOR=E7831C>&nbsp;</TD><TD WIDTH=125 ALIGN=LEFT VALIGN=TOP BGCOLOR=E7831C><A HREF="'+linkurl+'" TARGET=_top CLASS="'+dsm_tmpsyle+'">'+linktext+'</A>'+_doViewSecurityIcon(role,"level")+'</TD><TD WIDTH=3 BGCOLOR=E7831C><IMG SRC="/icons/ecblank.gif" WIDTH=3 HEIGHT=1></TD></TR></TABLE>');}
else {return htmlcode}
}
else {return htmlcode}
}



