function PopupImage(img) { 
titre="Agrandissement"; 
w=open("",'image','width=400,height=400,toolbar=no,scrollbars=no,resizable=yes'); 
w.document.write("<HTML><HEAD><TITLE>"+titre+"</TITLE></HEAD>"); 
w.document.write("<SCRIPT language=javascript>function checksize() { if (document.images[0].complete) { window.resizeTo(document.images[0].width+10,document.images[0].height+30); window.focus();} else { setTimeout('checksize()',250) } }</"+"SCRIPT>"); 
w.document.write("<BODY onload='checksize()' onBlur='window.close()' onClick='window.close()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0>");
w.document.write("<TABLE width='100%' border='0' cellspacing='0' cellpadding='0' height='100%'><TR>");
w.document.write("<TD valign='middle' align='center'><IMG src='"+img+"' border=0 onClick='window.close()'>"); 
w.document.write("</TD></TR></TABLE>");
w.document.write("</BODY></HTML>");
w.document.close(); 
} 



function mo(o){
o.className='stateon'; }
function mx(o){
o.className='stateoff'; }

function don_date(une_date)	{
	var la_date;
	var months=new Array(12);
	months[1]="01";
	months[2]="02";
	months[3]="03";
	months[4]="04";
	months[5]="05";
	months[6]="06";
	months[7]="07";
	months[8]="08";
	months[9]="09";
	months[10]="10";
	months[11]="11";
	months[12]="12";
	var month=months[une_date.getMonth() + 1];	
	var date=une_date.getDate();
	var year=une_date.getYear();
	la_date=date + "-" + month + "-" + year;
	return la_date;
}	
function rollover_tjs(nom,src) {	
	// nom est le nom de l'image
	//	Dans cet exemple, nom = lesmiley
	// src est l'adresse du fichier d'image
document.images[nom].src=src;
}
// Fonctions de préload

function developper(obj,etat) {
var LeBloque = obj;
if  (etat == 'plus' ) {
 obj.etat = 'moins';
 document.getElementById(LeBloque).className = 'afftd';
 }  
else {

   obj.etat = 'plus';  
  document.getElementById(LeBloque).className = 'hidetd';
}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


///actualité
function affcomplement(lang){
if (lang=="FR"){
 var contenu= document.form1.text_fr.value;
   if (contenu==""){
   onglet('plus','compl_FR')
   onglet('moins','compl_FR_mod')
   }
   else if (contenu!=""){
   onglet('moins','compl_FR')
   onglet('plus','compl_FR_mod')   
   }
 }
 else if (lang=="GB"){
 var contenu_GB= document.form1.text_GB.value;
     if (contenu_GB==""){
     onglet('plus','compl_GB')
     onglet('moins','compl_GB_mod')
     }
     else if (contenu_GB!=""){
     onglet('moins','compl_GB')
     onglet('plus','compl_GB_mod')   
     }
 }
 else if (lang=="DE"){
 var contenu_DE= document.form1.text_DE.value;
     if (contenu_DE==""){
     onglet('plus','compl_DE')
     onglet('moins','compl_DE_mod')
     }
     else if (contenu_DE!=""){
     onglet('moins','compl_DE')
     onglet('plus','compl_DE_mod')   
     }
 }

}
function vider_comp(lang){
 if (lang=="FR"){
 document.form1.text_fr.value="";
 affcomplement('FR');
 }
 else if (lang=="GB"){
 document.form1.text_GB.value="";
 affcomplement('GB');
 }
 else if (lang=="DE"){
 document.form1.text_DE.value="";
 affcomplement('DE'); 
 }
}
///onglet emploi
function onglet(etat2,p){
	developper(p,etat2)
}
function aff(etat2,lg){
	p=lg
	developper(p,etat2)
	p=lg+'1'
	developper(p,etat2)	
	p=lg+'-1'
	developper(p,etat2)
	p=lg+'1-1'
	developper(p,etat2)
	p=lg+'-2'
	developper(p,etat2)
	p=lg+'1-2'
	developper(p,etat2)
}
function aff_fr(etat2,lg){
	p=lg
	developper(p,etat2)
	p=lg+'-1'
	developper(p,etat2)
	p=lg+'-2'
	developper(p,etat2)
}
function ongletrestactif(cas,action) {
var theForm = document.form1; 
if (cas=='FR' && action=='aff'){
  if (theForm.GBlang.checked==false && theForm.DElang.checked==false){
  onglet('plus','info_FR')
  onglet('moins','info_DE')
  onglet('moins','info_GB')
  }
}
else if (cas=='FR' && action=='hide'){
  if (theForm.GBlang.checked==true ){
  onglet('moins','info_FR')
  onglet('moins','info_DE')
  onglet('plus','info_GB')
  }
  else if (theForm.GBlang.checked==false && theForm.DElang.checked==true){
  onglet('moins','info_FR')
  onglet('plus','info_DE')
  onglet('moins','info_GB')  
  }
}
if (cas=='GB' && action=='aff'){
  if (theForm.FRlang.checked==false && theForm.DElang.checked==false){
  onglet('moins','info_FR')
  onglet('moins','info_DE')
  onglet('plus','info_GB')
  }
}
else if (cas=='GB' && action=='hide'){
  if (theForm.FRlang.checked==true ){
  onglet('plus','info_FR')
  onglet('moins','info_DE')
  onglet('moins','info_GB')
  }
  else if (theForm.DElang.checked==true && theForm.FRlang.checked==false){
  onglet('moins','info_FR')
  onglet('plus','info_DE')
  onglet('moins','info_GB')  
  }
}

if (cas=='DE' && action=='aff'){
  if (theForm.FRlang.checked==false && theForm.GBlang.checked==false){
  onglet('moins','info_FR')
  onglet('plus','info_DE')
  onglet('moins','info_GB')
  }
}
else if (cas=='DE' && action=='hide'){
  if (theForm.FRlang.checked==true ){
  onglet('plus','info_FR')
  onglet('moins','info_DE')
  onglet('moins','info_GB')
  }
  else if (theForm.GBlang.checked==true && theForm.FRlang.checked==false){
  onglet('moins','info_FR')
  onglet('moins','info_DE')
  onglet('plus','info_GB')  
  }
}

}
function affichage(PP) {
var theForm = document.form1; 
 if (PP==1){

     onglet('plus','onglet_option')
	 onglet('moins','onglet_image')
 }
 else if (PP==2)  {

     onglet('plus','onglet_image')
	 onglet('moins','onglet_option') 
 }
  if (PP==3){
    if (theForm.FRlang.checked==true){
	//alert('fraff')
	aff_fr('plus','FR')
    //onglet('plus','info_FR') 
	ongletrestactif('FR','aff')
    }
    else if (theForm.FRlang.checked==false){
	//alert('frhide')
	aff_fr('moins','FR')
    onglet('moins','info_FR')
	ongletrestactif('FR','hide') 
    }
 }
if (PP==4){
  if (theForm.GBlang.checked==true){
  aff('plus','GB')
  ongletrestactif('GB','aff')
  }
  else if (theForm.GBlang.checked==false){
  aff('moins','GB')
  onglet('moins','info_GB')
  ongletrestactif('GB','hide')
  // onglet('plus','info_FR')   
  }
 }
 else if(PP==5){
  if (theForm.DElang.checked==true){
	 //alert('DEaff')
  aff('plus','DE')
  //onglet('plus','info_DE')
  ongletrestactif('DE','aff')
//  ongletrestactif()
  }
  else if (theForm.DElang.checked==false){
	//  alert('DEhide')
  aff('moins','DE')
  onglet('moins','info_DE')
  ongletrestactif('DE','hide')
  //onglet('plus','info_FR')
  }
 } 
///affichage des onglets langues 
 else if(PP==6){
    onglet('moins','info_GB')
	onglet('moins','info_DE')
	onglet('plus','info_FR')
 }
  else if(PP==7){
    onglet('plus','info_GB')
	onglet('moins','info_DE')
	onglet('moins','info_FR')
 }
  else if(PP==8){
    onglet('moins','info_GB')
	onglet('plus','info_DE')
	onglet('moins','info_FR')
 }
    else if(PP==10){
    onglet('moins','aff_g_image')
	onglet('plus','aff_p_image')
 } 
  else if(PP==11){
    onglet('plus','aff_g_image')
	onglet('moins','aff_p_image')
 }
 
}

function reaffiche(){
	//alert('GB')
var theForm = document.form1; 
  if (theForm.FRlang.checked==true){
  aff_fr('plus','FR')
  ongletrestactif('FR','aff')
  }
  else if (theForm.FRlang.checked==false){
   aff_fr('moins','FR')
   onglet('moins','info_FR')
   ongletrestactif('FR','hide')
  }  
  if (theForm.GBlang.checked==true){
	//  alert('GB')
   aff('plus','GB')
   ongletrestactif('GB','aff')
  }
  else if (theForm.GBlang.checked==false){
   aff('moins','GB')
   onglet('moins','info_GB')
   ongletrestactif('GB','hide') 
  }
  if (theForm.DElang.checked==true){
 // alert('DE')
    aff('plus','DE')
     ongletrestactif('DE','aff')	
  }
  else if (theForm.DElang.checked==false){
  aff('moins','DE')
  onglet('moins','info_DE')
  ongletrestactif('DE','hide') 
  }
}
////////aff editeur

function createtext(p){
var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('/bo/')+1) ;
sBasePath =sBasePath + 'bo/tpl/FCKeditor/';
var oFCKeditor = new FCKeditor(p);
oFCKeditor.BasePath	= sBasePath ;
oFCKeditor.Config['CustomConfigurationsPath'] = sBasePath + '_samples/html/sample06.config.js' ;
oFCKeditor.ToolbarSet	= 'PluginTest' ;
oFCKeditor.CheckBrowser = true ;
oFCKeditor.Width = 400;
oFCKeditor.Height = 250;
oFCKeditor.ReplaceTextarea();
}
//*********conserne le fo


