function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

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];}}
}
 
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
} 
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_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];}
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_nbGroup(event, grpName) { //v3.0
  var i,img,nbArr,args=MM_nbGroup.arguments;
  if (event == "init" && args.length > 2) {
    if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
      img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
      if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
      nbArr[nbArr.length] = img;
      for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
        if (!img.MM_up) img.MM_up = img.src;
        img.src = img.MM_dn = args[i+1];
        nbArr[nbArr.length] = img;
    } }
  } else if (event == "over") {
    document.MM_nbOver = nbArr = new Array();
    for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = (img.MM_dn && args[i+2]) ? args[i+2] : args[i+1];
      nbArr[nbArr.length] = img;
    }
  } else if (event == "out" ) {
    for (i=0; i < document.MM_nbOver.length; i++) {
      img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
  } else if (event == "down") {
    if ((nbArr = document[grpName]) != null)
      for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
    document[grpName] = nbArr = new Array();
    for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = img.MM_dn = args[i+1];
      nbArr[nbArr.length] = img;
  } }
}

function popup(src,titre,param) {
	var w =	window.open(src,titre,param);
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
	window.open(theURL,winName,features);
}
function openNewWindow(URLtoOpen, windowName, windowFeatures) {
newWindow=window.open(URLtoOpen, windowName, windowFeatures); 
}

var posBan1=0, ban1, delaiBan1, msgBan1;
function banniere1(delai) {
	delaiBan1 = delai;
	if(posBan1 >= msgBan1.length)
		posBan1 = 0;
	else if (posBan1 == 0) {
	msgBan1 = '        ' + msgBan1;
	while (msgBan1.length < 128)
		msgBan1 += '        ' + msgBan1;
	}
	document.formBan1.Fbanniere1.value = msgBan1.substring(posBan1,posBan1+msgBan1.length);
	posBan1++;
	ban1 = setTimeout("banniere1(delaiBan1)",delai);
}
function deloginer() {
	if(confirm('Etes-vous sûr de vouloir quitter votre profil ?'))
		document.location.href=document.location.href+((document.location.href.indexOf("?")!=-1)?'&':'?')+'delete_user=ok';
}


function ieExecWB( intOLEcmd, intOLEparam ) { 
 var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>'; 
 document.body.insertAdjacentHTML('beforeEnd', WebBrowser); 
 if (!intOLEparam || intOLEparam < -1 || intOLEparam > 1 ) { 
 intOLEparam = 1; 
 } 
 WebBrowser1.ExecWB( intOLEcmd, intOLEparam ); 
 WebBrowser1.outerHTML = ""; 
}


function envoi_recherche() {
	
	with(document.searchForm) {
		if(mot.value=="" || mot.value.length <=2 || mot.value=="les" || mot.value=="des") {
			alert("Vous devez entrer un mot à rechercher.");
			return false;
		}
		else {
			texte.value=mot.value;
			return true;
		}
	}
	
}

function ouvreLien(url,mode) {
if (mode == "self"){
window.location=url;}
else {window.open(url)};

}

function creer_menu() {
	
	
document.write('<div id="Recherche" style="position:absolute; width:279px; height:31px; z-index:3; left: 9px; top: 155px;">    <form  class="recherche_form"action="engine.php"  method=GET>      <input type=hidden value="go" name=action>      <input class="recherche_box" type=text name=blork onfocus="if (this.value==\'Rechercher sur le site...\') this.value=\'\'" maxlength=200 value="Rechercher sur le site...">   </input><input name="ok" type="image" title="Valider" alt="ok" src="img/skin/ok.gif" align="absbottom"  value=\'Valider\' ></form ></div>');
	
document.write('<DIV id=Layer1 class="layer1"><TABLE width="26" height="150" border=0 cellPadding=0 cellSpacing=0>');
document.write('<TR><TD bgColor=#00217E><A onmouseover="MM_showHideLayers(\'Layer2\',\'\',\'show\',\'Layer3\',\'\',\'show\',\'Layer4\',\'\',\'show\',\'Layer5\',\'\',\'show\')"   href="Accueil.php"><IMG height=25  src="img/skin/spacer.gif" width=26  border=0 name=rubrique1></A></TD></TR>');
document.write('<TR><TD bgColor=#008C00><A onmouseover="MM_showHideLayers(\'Layer2\',\'\',\'show\',\'Layer3\',\'\',\'show\',\'Layer4\',\'\',\'show\',\'Layer5\',\'\',\'show\')" href="Societe.php"><IMG height=25 src="img/skin/spacer.gif" width=26 border=0 name=rubrique1></A></TD></TR>');
document.write('<TR><TD bgColor=#FCA019><A onmouseover="MM_showHideLayers(\'Layer2\',\'\',\'show\',\'Layer3\',\'\',\'show\',\'Layer4\',\'\',\'show\',\'Layer5\',\'\',\'show\')" href="Revue.php"><IMG height=25 src="img/skin/spacer.gif" width=26 border=0 name=rubrique1></A></TD></TR>');
document.write('<TR><TD bgColor=#DB020D><A onmouseover="MM_showHideLayers(\'Layer2\',\'\',\'show\',\'Layer3\',\'\',\'show\',\'Layer4\',\'\',\'show\',\'Layer5\',\'\',\'show\')"  href="Conferences.php"><IMG height=25 src="img/skin/spacer.gif" width=26 border=0 name=rubrique1></A></TD></TR>');
document.write('<TR><TD bgColor=#794022><a onMouseOver="MM_showHideLayers(\'Layer2\',\'\',\'show\',\'Layer3\',\'\',\'show\',\'Layer4\',\'\',\'show\',\'Layer5\',\'\',\'show\')" href="Contact.php">	  <img height=25 src="img/skin/spacer.gif" width=26  border=0 name=rubrique1></a></TD></TR>');
document.write('<TR><TD bgColor=#ffcc00><A  onmouseover="MM_showHideLayers(\'Layer2\',\'\',\'show\',\'Layer3\',\'\',\'show\',\'Layer4\',\'\',\'show\',\'Layer5\',\'\',\'show\')"  href="Liens.php">	  <IMG height=25 src="img/skin/spacer.gif" width=26 border=0 name=rubrique1></A></TD></TR>');
document.write('</TABLE></DIV>');
document.write('<DIV id=Layer2 class="layer2"><TABLE class="nav" width=150 border=0 cellPadding=0 cellSpacing=0>');
document.write('<TR> <TD bgcolor="#FFFFFF" onmouseover="this.bgColor =\'#00217E\'; acc.style.color=\'white\';" onmouseout="this.bgColor =\'#FFFFFF\'; acc.style.color=\'black\'" onClick="ouvreLien(\'Accueil.php\',\'self\');"  > <A id="acc" href="Accueil.php">Accueil</A></TD></TR>');
document.write('<TR><TD bgcolor="#FFFFFF" onmouseover="this.bgColor =\'#008C00\'; soc.style.color=\'white\';" onmouseout="this.bgColor =\'#FFFFFF\'; soc.style.color=\'black\'" onClick="ouvreLien(\'Societe.php\',\'self\');" ><A id="soc"	href="Societe.php">La Soci&eacute;t&eacute;</a></TD></TR>');
document.write('<TR> <TD  bgcolor="#FFFFFF"  onClick="ouvreLien(\'Revue.php\',\'self\');" onmouseover="this.bgColor =\'#FCA019\'; rev.style.color=\'white\';" onmouseout="this.bgColor =\'#FFFFFF\'; rev.style.color=\'black\'" >   <A id="rev"	href="Revue.php">La Revue </a></TD></TR>');
document.write('<TR> <TD  bgcolor="#FFFFFF"   onClick="ouvreLien(\'Conferences.php\',\'self\');" onmouseover="this.bgColor =\'#DB020D\'; conf.style.color=\'white\';" onmouseout="this.bgColor =\'#FFFFFF\'; conf.style.color=\'black\'" ><A id="conf"	href="Conferences.php" >Les Conf&eacute;rences </a></TD></TR>');
document.write('<TR><TD bgcolor="#FFFFFF"  onClick="ouvreLien(\'Contact.php\',\'self\');"  onmouseover="this.bgColor =\'#794022\'; cont.style.color=\'white\';" onmouseout="this.bgColor =\'#FFFFFF\'; cont.style.color=\'black\'" ><A id="cont"	href="Contact.php">Nous contacter</a></TD></TR>');
document.write('<TR> <TD  height=25  bgcolor="#FFFFFF"  onClick="ouvreLien(\'Liens.php\',\'self\');" onmouseover="this.bgColor =\'#FFCC00\'; lie.style.color=\'white\';" onmouseout="this.bgColor =\'#FFFFFF\'; lie.style.color=\'black\'" ><A id="lie" href="Liens.php">Liens</a></TD></TR>');
document.write('</TABLE></DIV>');
document.write('<DIV id=Layer3  class="layer3"><A onmouseover="MM_showHideLayers(\'Layer2\',\'\',\'hide\',\'Layer3\',\'\',\'hide\',\'Layer4\',\'\',\'hide\',\'Layer5\',\'\',\'hide\')" href="javascript:;"><IMG height=25 src="img/skin/spacer.gif" width=214 border=0></A></DIV>');
document.write('<DIV id=Layer4 class="layer4"><A onmouseover="MM_showHideLayers(\'Layer2\',\'\',\'hide\',\'Layer3\',\'\',\'hide\',\'Layer4\',\'\',\'hide\',\'Layer5\',\'\',\'hide\')" href="javascript:;"><IMG height=186 src="img/skin/spacer.gif" width=24 border=0></A></DIV>');
document.write('<DIV id=Layer5 class="layer5"><A onmouseover="MM_showHideLayers(\'Layer2\',\'\',\'hide\',\'Layer3\',\'\',\'hide\',\'Layer4\',\'\',\'hide\',\'Layer5\',\'\',\'hide\')" href="javascript:;"><IMG height=25 src="img/skin/spacer.gif" width=180 border=0></A></DIV> ');

}

function creer_menu(chemin1) {
var chemin;
if (chemin1) {chemin=chemin1}else{chemin=''}

document.write('<div id="Recherche" style="position:absolute; width:279px; height:31px; z-index:3; left: 9px; top: 155px;">    <form  class="recherche_form"action="'+chemin+'engine.php"  method=GET>      <input type=hidden value="go" name=action>      <input class="recherche_box" type=text name=blork onfocus="if (this.value==\'Rechercher sur le site...\') this.value=\'\'" maxlength=200 value="Rechercher sur le site...">   </input><input name="ok" type="image" title="Valider" alt="ok" src="'+chemin+'img/skin/ok.gif" align="absbottom"  value=\'Valider\' ></form ></div>');
	
document.write('<DIV id=Layer1 class="layer1"><TABLE width="26" height="150" border=0 cellPadding=0 cellSpacing=0>');
document.write('<TR><TD bgColor=#00217E><A onmouseover="MM_showHideLayers(\'Layer2\',\'\',\'show\',\'Layer3\',\'\',\'show\',\'Layer4\',\'\',\'show\',\'Layer5\',\'\',\'show\')"   href="'+chemin+'Accueil.php"><IMG height=25  src="'+chemin+'img/skin/spacer.gif" width=26  border=0 name=rubrique1></A></TD></TR>');
document.write('<TR><TD bgColor=#008C00><A onmouseover="MM_showHideLayers(\'Layer2\',\'\',\'show\',\'Layer3\',\'\',\'show\',\'Layer4\',\'\',\'show\',\'Layer5\',\'\',\'show\')" href="'+chemin+'Societe.php"><IMG height=25 src="'+chemin+'img/skin/spacer.gif" width=26 border=0 name=rubrique1></A></TD></TR>');
document.write('<TR><TD bgColor=#FCA019><A onmouseover="MM_showHideLayers(\'Layer2\',\'\',\'show\',\'Layer3\',\'\',\'show\',\'Layer4\',\'\',\'show\',\'Layer5\',\'\',\'show\')" href="'+chemin+'Revue.php"><IMG height=25 src="'+chemin+'img/skin/spacer.gif" width=26 border=0 name=rubrique1></A></TD></TR>');
document.write('<TR><TD bgColor=#DB020D><A onmouseover="MM_showHideLayers(\'Layer2\',\'\',\'show\',\'Layer3\',\'\',\'show\',\'Layer4\',\'\',\'show\',\'Layer5\',\'\',\'show\')"  href="'+chemin+'Conferences.php"><IMG height=25 src="'+chemin+'img/skin/spacer.gif" width=26 border=0 name=rubrique1></A></TD></TR>');
document.write('<TR><TD bgColor=#794022><a onMouseOver="MM_showHideLayers(\'Layer2\',\'\',\'show\',\'Layer3\',\'\',\'show\',\'Layer4\',\'\',\'show\',\'Layer5\',\'\',\'show\')" href="'+chemin+'Contact.php">	  <img height=25 src="'+chemin+'img/skin/spacer.gif" width=26  border=0 name=rubrique1></a></TD></TR>');
document.write('<TR><TD bgColor=#ffcc00><A  onmouseover="MM_showHideLayers(\'Layer2\',\'\',\'show\',\'Layer3\',\'\',\'show\',\'Layer4\',\'\',\'show\',\'Layer5\',\'\',\'show\')"  href="'+chemin+'Liens.php">	  <IMG height=25 src="'+chemin+'img/skin/spacer.gif" width=26 border=0 name=rubrique1></A></TD></TR>');
document.write('</TABLE></DIV>');
document.write('<DIV id=Layer2 class="layer2"><TABLE class="nav" width=150 border=0 cellPadding=0 cellSpacing=0>');
document.write('<TR> <TD bgcolor="#FFFFFF" onmouseover="this.bgColor =\'#00217E\'; acc.style.color=\'white\';" onmouseout="this.bgColor =\'#FFFFFF\'; acc.style.color=\'black\'" onClick="ouvreLien(\''+chemin+'Accueil.php\',\'self\');"  > <A id="acc" href="'+chemin+'Accueil.php">Accueil</A></TD></TR>');
document.write('<TR><TD bgcolor="#FFFFFF" onmouseover="this.bgColor =\'#008C00\'; soc.style.color=\'white\';" onmouseout="this.bgColor =\'#FFFFFF\'; soc.style.color=\'black\'" onClick="ouvreLien(\''+chemin+'Societe.php\',\'self\');" ><A id="soc"	href="'+chemin+'Societe.php">La Soci&eacute;t&eacute;</a></TD></TR>');
document.write('<TR> <TD  bgcolor="#FFFFFF"  onClick="ouvreLien(\''+chemin+'Revue.php\',\'self\');" onmouseover="this.bgColor =\'#FCA019\'; rev.style.color=\'white\';" onmouseout="this.bgColor =\'#FFFFFF\'; rev.style.color=\'black\'" >   <A id="rev"	href="'+chemin+'Revue.php">La Revue </a></TD></TR>');
document.write('<TR> <TD  bgcolor="#FFFFFF"   onClick="ouvreLien(\''+chemin+'Conferences.php\',\'self\');" onmouseover="this.bgColor =\'#DB020D\'; conf.style.color=\'white\';" onmouseout="this.bgColor =\'#FFFFFF\'; conf.style.color=\'black\'" ><A id="conf"	href="'+chemin+'Conferences.php" >Les Conf&eacute;rences </a></TD></TR>');
document.write('<TR><TD bgcolor="#FFFFFF"  onClick="ouvreLien(\''+chemin+'Contact.php\',\'self\');"  onmouseover="this.bgColor =\'#794022\'; cont.style.color=\'white\';" onmouseout="this.bgColor =\'#FFFFFF\'; cont.style.color=\'black\'" ><A id="cont"	href="'+chemin+'Contact.php">Nous contacter</a></TD></TR>');
document.write('<TR> <TD  height=25  bgcolor="#FFFFFF"  onClick="ouvreLien(\''+chemin+'Liens.php\',\'self\');" onmouseover="this.bgColor =\'#FFCC00\'; lie.style.color=\'white\';" onmouseout="this.bgColor =\'#FFFFFF\'; lie.style.color=\'black\'" ><A id="lie" href="'+chemin+'Liens.php">Liens</a></TD></TR>');
document.write('</TABLE></DIV>');
document.write('<DIV id=Layer3  class="layer3"><A onmouseover="MM_showHideLayers(\'Layer2\',\'\',\'hide\',\'Layer3\',\'\',\'hide\',\'Layer4\',\'\',\'hide\',\'Layer5\',\'\',\'hide\')" href="javascript:;"><IMG height=25 src="'+chemin+'img/skin/spacer.gif" width=214 border=0></A></DIV>');
document.write('<DIV id=Layer4 class="layer4"><A onmouseover="MM_showHideLayers(\'Layer2\',\'\',\'hide\',\'Layer3\',\'\',\'hide\',\'Layer4\',\'\',\'hide\',\'Layer5\',\'\',\'hide\')" href="javascript:;"><IMG height=186 src="'+chemin+'img/skin/spacer.gif" width=24 border=0></A></DIV>');
document.write('<DIV id=Layer5 class="layer5"><A onmouseover="MM_showHideLayers(\'Layer2\',\'\',\'hide\',\'Layer3\',\'\',\'hide\',\'Layer4\',\'\',\'hide\',\'Layer5\',\'\',\'hide\')" href="javascript:;"><IMG height=25 src="'+chemin+'img/skin/spacer.gif" width=180 border=0></A></DIV> ');

}

//POUR FAIRE TABLEAU AVEC SURBRILLANCE ET CROIX
function au_dessus(couleurbrillance){ //Permet de faire briller la cellule au passage de la souris
var marqueur=false;
if (document.getElementById('tab_surb')){
	for (j=1;j<document.getElementById('tab_surb').rows.length;j++){
		
			var current = document.getElementById('tab_surb').rows[j];
			var couleurfond=current.style.backgroundColor;
			current.onmouseover = function() {this.style.cursor='pointer'; if(!marqueur)this.style.backgroundColor=couleurbrillance};
			current.onclick = function() {popup('../Formulaire/BON_COMMANDE_REVUE.pdf','_blank','');};
			current.onmouseout = function() {if(!marqueur)this.style.backgroundColor=couleurfond};
		}
	}
}



//DATE
var dayarray=new Array("Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi");
var montharray=new Array("Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre");

function getthedate(){
var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var hours=mydate.getHours()
var minutes=mydate.getMinutes()
var seconds=mydate.getSeconds()
if (minutes<=9)
minutes="0"+minutes
if (seconds<=9)
seconds="0"+seconds
//change font size here
var cdate=dayarray[day]+", "+daym+" "+montharray[month]+" "+year+", "+hours+":"+minutes+":"+seconds
if (document.all)
document.all.clock.innerHTML=cdate
else if (document.getElementById)
document.getElementById("clock").innerHTML=cdate
else
document.write(cdate)
}
if (!document.all&&!document.getElementById)
getthedate()
function goforit(){
if (document.all||document.getElementById)
setInterval("getthedate()",1000)
}

