<!--
var dossierROOT = "/" ;

var isIE = (document.all) ? true : false;   // Internet Explorer 
var isNS = (document.layers) ? true : false ; // Navigateur Netscape 4.7 et moins. 
var isOTHER = (document.getElementById) ? true : false ;   // Navigateur Netscape 5 + ou  et DOM-1.

var PositionCalque = new Array();
var skinMenu  ;
var skinSSMenu ;
var LP = 0 ;

// gestion du print 
function imprim(){
if (window.print)window.print();
else alert("Pour imprimer avec votre navigateur, \ncliquer sur le menu Fichier / Imprimer.");
}

// BUSINESS CONTINUITY PLAN / PLAN CONTINUITE ACTIVITE
function InfoBCP() {
	if ( PCA != null && PCA == 1 )
	{
		document.getElementById('blockBCP').style.display = 'block'  ;
		document.getElementById('lienBCP').href = "bcp/" ;
	}
}

function translate(){
		
	var HostLien = location.pathname ;

	var tab = HostLien.split('/');
	var prefixe = "" ;
	if(tab[1].toUpperCase() == 'FR')prefixe = "en" ;
	else if(tab[1].toUpperCase() == 'EN')prefixe = "fr" ;
	
	if(prefixe != "")
		parent.document.location.href = "/"+prefixe+ HostLien.substr(3, HostLien.length) ;
	else
		parent.document.location.href = "/en/" ;
}

function RefreshLink(DocLien) {

var CSSOn = "MenuLateralOver" ;
var CSSOff = "MenuLateral" ;
var LienDoc = DocLien.toString().toLowerCase();
var LienRef = document.referrer.toString().toLowerCase();
var HostLien = 'http://' + document.location.host.toString().toLowerCase() ;
// special recrut 
if (LienDoc.indexOf('/offres_en_ligne/annonce/') != -1 
	&& (LienRef == HostLien + '/recrutement/offres_en_ligne/' || LienRef == HostLien + '/recrutement/offres_en_ligne/stage/'))
	LienDoc = LienRef ;
else // special Une & Actu -
if (LienDoc.indexOf('/actualites/srvlnews?req_srvl=bplgactualite') != -1)
	LienDoc = (LienRef.indexOf('leaseune.htm') != -1 ) ? LienRef  :  HostLien + '/actualites/' ;

// gestion page
var found = ( LienDoc.indexOf('search/find') != -1  ) ? true : false ;
// page encours
var NoRub = (LienDoc.indexOf('/#') != -1 ) ? true : false;

// recherche lien
if (!found)// recherche lien	
	for (var i = 0 ; document.links[i] != null ; i++)
		if ( LienDoc == document.links[i].href.toString().toLowerCase() && !NoRub 
		&& document.links[i].className != "header" && document.links[i].className != "chemin"
			&& document.links[i].className != "bas" )
				{document.links[i].className = CSSOn ;}

// PARTIE QUI PERMET DE MODIFIER L'IMAGE DU BANDEAU PRINCIPAL
var Rub = location.pathname.toString().substring(1) ;
var tab = Rub.split('/');
Rub = tab[0] ;
if(Rub.toUpperCase() == "EN" || Rub.toUpperCase() == "FR"){// Ajout JG
	if( tab[1].trim() == "" )//home
		Rub = "home" ;
	else 
		Rub = tab[1] ;
}
if (document.images[Rub]!= null) {
	var ImgOver = document.images[Rub].src ;
	//alert(ImgOver);
	if(ImgOver.indexOf('_o') != -1){ImgOver = ImgOver.substring(0, (ImgOver.length - 6)) + '.png' ;}
	//ImgOver = ImgOver.substring(0, (ImgOver.length - 4)) + '_select.gif' ;
	ImgOver = ImgOver.substring(0, (ImgOver.length - 4)) + '_o.png' ;
	document.images[Rub].src = ImgOver ;
 }

}
// temps affichage encart lien de droite
//var Tempo = (document.location.href.toString().indexOf('/recrutement/') != -1) ? 500 : 200 ;
var Tempo = 500 ;

setTimeout('RefreshLink(document.location.href)', Tempo);

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
  
  RefreshLink(document.location.href);   
}

//RollOver des boutons
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
   var d=document;
   if(d.images){ 
   	if(!d.MM_p) d.MM_p=new Array();
   	var i,j=d.MM_p.length,a=MM_preloadImages.arguments;
   	for(i=0; i<a.length; i++){
   		if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}
	}
   }
}

//affichage de texte sur la berre d'état
function MM_displayStatusMsg(msgStr) {
  status=msgStr;
  document.MM_returnValue = true;
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_jumpWindow(selObj,restore){ //v3.0
 if (selObj.options[selObj.selectedIndex].value.length > 0){
  eval("window.open('"+selObj.options[selObj.selectedIndex].value+"')");
  if (restore) selObj.selectedIndex=0;
  }
}

// GESTION DU MESSAGE
var actif ;
function montre(id) {
	var d = document.getElementById(id);
	for (var i = 1; i<=10; i++) {
		if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}
	}
	if (d) {d.style.display='block';}
	//window.clearTimeout(actif);
	//actif = setTimeout("arreter();",3000);
}
//function arreter() { montre(); window.clearTimeout(actif); }


function bgOn(something, nouv_class) {
	var t=document.getElementById(something);
	if (t.className == "nv-ab") {
		t.className = "nv-ab-h";
	} else {
		t.className = "nv-gr-h";
	}
	t.style.cursor='pointer';
}
	
function bgOff(something){
	var t=document.getElementById(something);
	if (t.className == "nv-ab-h") {
		t.className = "nv-ab";
	} else {
		t.className = "nv-gr";
	}
	t.style.cursor='auto';
}

function afficheSSMENU(index){

	
	//var widthIndexEn = new Array("","132","177","200","0","100"); // width:'+widthIndex[index]+'px;
	//var widthIndexFr = new Array("","132","177","200","0","100"); // width:'+widthIndex[index]+'px;
	
	var j = index ;
	document.write('<div id="smenu'+j+'" style="z-index:'+(100+j)+';position:absolute;top:104px;display:none;" class="menu" onMouseOver="showMenu(\'smenu'+j+'\');" onMouseOut="hideMenu(\'smenu'+j+'\');" >');
	//document.write(' <table width="143" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="menu">')
	for (var i=0 ; i < menu_principal[j].length ; i++){
		var lien =  menu_principal[j][i] ;
		lien = lien.split('|'); 		
		document.write('<div id="smenu'+i+'-'+j+'" onMouseOver="bgOn(\'smenu'+i+'-'+j+'\');" onMouseOut="bgOff(\'smenu'+i+'-'+j+'\');" class="nv-gr" style="cursor:pointer;" ');
		if( lien[2] == "_blank" ){
			document.write('onClick="window.open(\''+lien[1]+'\');" >' )
		} else {
			document.write('onClick="top.location=\''+dossierROOT+''+lien[1]+'\';" >' )
		}
		document.write(lien[0]);document.write('</div>');
		//document.write('<tr><td class="SSMenu"><div id="smenu'+i+'-'+j+'" onMouseOver="bgOn(\'smenu'+i+'-'+j+'\');" onMouseOut="bgOff(\'smenu'+i+'-'+j+'\');" class="nv-gr" ><a href="'+dossierROOT+''+lien[1]+'" '+ ( (lien[2]!="") ? ('target="'+lien[2]+'"') : '' ) +' class="itemSSMenu">'+lien[0]+'</a></div></td></tr>');
		if (i != menu_principal[j].length-1){			
		document.write('<div style="height:1px;width:141px;background-color:#E3E3E3;" ><img src="'+dossierROOT+'images/shim.gif" width="9" height="1"></div>');		
		//document.write('<div style="height:1px;background-image:url('+dossierROOT+'images/interligne_ssmenu.gif);background-repeat:repeat-x;" ><img src="'+dossierROOT+'images/interligne_ssmenu.gif" width="9" height="1"></div>');
		//document.write('<tr><td background="'+dossierROOT+'images/interligne_ssmenu.gif"><img src="'+dossierROOT+'images/interligne_ssmenu.gif" width="9" height="1"></td></tr>');
		}
	}
	//document.write('</table>');
	document.write('</div>');	
}

// permet d'afficher l'outif PublishBox dans un popup
function openPublishBox(catalogueId) {
			publishBoxP = window.open('/publishbox/'+catalogueId+'/index.htm', 'publishBoxF', 'top=1,left=1,width=950,height=750,location=no,status=no,scrollbars=auto,resizable=yes');	
}


String.prototype.trim = function()
{ return this.replace(/(^\s*)|(\s*$)/g, ""); }


/* DEBUT PARTIE CONCERNANT MOTEUR DE RECHERCHE */
function ValidSearch(TheForm){
var checkNOK = "~°;<>|&$!:#{}[]`_=,";
var RepRub = location.pathname.toString().substring(1) ;
var pos = RepRub.indexOf('/') ;
RepRub = (pos != -1) ? '/' + RepRub.substring(0, pos) + '/' : '' ;
if (RepRub != '/search/') { TheForm.rep.value = RepRub ; }
TheForm.isContext.value = 0 ;
TheForm.Agent.value = 'Search' ;
TheForm.NbRecord.value = '10' ;

var UserQuery = TheForm.Query.value ;
UserQuery = UserQuery.trim();
TheForm.Query.focus();	
if (UserQuery.length < 2 || UserQuery =='Rechercher' )  return(false);
var TestQuery = UserQuery ;
UserQuery = '' ;
var k = 0 ;
for (i = 0;  i < TestQuery.length;  i++) {
	var carOk = true ;
	for (j = 0;  j < checkNOK.length;  j++)
		if (TestQuery.charAt(i) == checkNOK.charAt(j)) {carOk = false ; break;}
	if (carOk) UserQuery = UserQuery + TestQuery.charAt(i);
	}
	
TheForm.Query.value = UserQuery  ;

return ((UserQuery.length) ? true : false );

}

function AffSomSearch(Contenu,Tmime){
if (Tmime == 'application/pdf') {
	Contenu = 'Document Acrobat au format PDF.' ;
	}
document.write(Contenu);
}
/* FIN PARTIE CONCERNANT MOTEUR DE RECHERCHE */

// valide email
function is_email(email)
  {
     var reg = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9._-]{2,}[.][a-zA-Z0-9]{2,4}$/
     var reg2 = /[.@]{2,}/
     return ((reg.exec(email)!=null) && (reg2.exec(email)==null))
  }

function envoyer_offre(page){
		var hauteur = 300 ;
		var largeur = 400 ;
		var top=(screen.height-hauteur)/2;
		var left=(screen.width-largeur)/2;
		window.open(page, 'EnvoyerOffre', 'top='+top+', left='+left+', width='+largeur+', height='+hauteur+', location=no, status=no, scrollbars=no,resizable=no');	
}


function verifdate(VDATE)  {
if (VDATE.length == 0) {return (true);}
  			
if ((VDATE.length != 8)&&(VDATE.length != 10)) {return (false);}

if (!chiffre(VDATE,'Date'))
  		   {return (false);  } 			
//8 chiffres
  if (VDATE.length==8)
	{ var arrdate=new Array (VDATE.substring(0,2),VDATE.substring(2,4),VDATE.substring(4,8));}

//10 chiffres
  if (VDATE.length==10)		{
		var sep=VDATE.substring(2,3);
		var sep2=VDATE.substring(5,6);
		if ( sep != sep2 ) { return(false); }  
		if ((sep!="/")&&(sep!=" ")&&(sep!="."))
			{ return (false); }
		else
			{var arrdate=new Array (VDATE.split(sep)[0],VDATE.split(sep)[1],VDATE.split(sep)[2]);}
	    }
//fin de detection ---
var JJMois=new Array(31,29,31,30,31,30,31,31,30,31,30,31);
var intMois=parseInt(arrdate[1]);

	
if(JJMois[intMois-1]<arrdate[0]) 	
 {return (false);}

if (arrdate[2] < 1900){return (false);}
if ((arrdate[0]<1)||(arrdate[0]>31)||(arrdate[1]<1)||(arrdate[1]>12))
		{return (false);}
		
	return (true);
}

function chiffre(valeur,type)
  {
		var checkOK = "0123456789";
		if (type=="Tel"){checkOK = "(+) 0123456789";}
		if (type=="Date"){checkOK = "/. 0123456789";}
		if (type=="Num"){checkOK = "/. 0123456789";}
		var checkStr = valeur;
  		var allValid = true;
   
  		for (i = 0;  i < checkStr.length;  i++)
  		{
  		  ch = checkStr.charAt(i);
  		  for (j = 0;  j < checkOK.length;  j++)
   		   if (ch == checkOK.charAt(j))
        break;
  		  if (j == checkOK.length)
   		 {
    		  allValid = false;
    		  return(false);
			  break;
    	 }
        }
		if (allValid){return(true);}
}


function selectGoodValueList(list, value){
	if (list && value != '')
	for (var i = 0 ; i < list.length ; i++){
		if (list.options[i].value == value){list.options[i].selected = true ; break;}
	}
}

function html2pdf(link2pdf){
	document.pdfForm.url.value = link2pdf;
	document.pdfForm.bufwrite.value = "1";
	document.pdfForm.headerhtml.value = "headerpd4ml.htm";
	document.pdfForm.headersize.value = "30";
	document.pdfForm.footerhtml.value = "footerpd4ml.htm";
	document.pdfForm.footersize.value = "30";
	document.pdfForm.action = "/docpdf/"
	document.pdfForm.target = "_blank"
	document.pdfForm.submit();
}

//-->