<!--
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];}}
}

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];}
}
// --------------------- active_menu()
function active_menu(action,id) {

if(document.getElementById("menu"+id).className=="menu_active" || document.getElementById("menu"+id).className=="menu_active_smenu") {
	active="yes";
}
else {
	active="no";
}

if(action=="on" && active=="no")
	{
	document.getElementById("menu"+id).className="menu_on";
	}
else if(action=="off" && active=="no")
	{
	document.getElementById("menu"+id).className="menu_off";
	}
}
// --------------------- active_smenu()
function active_smenu(action,id) {
if(action=="on")
	{
	document.getElementById("smenu"+id).className="smenu_on";
	}
else if(action=="off")
	{
	document.getElementById("smenu"+id).className="smenu_off";
	}
}
// --------------------- affiche_smenu()
function affiche_smenu(id) {
	if(document.getElementById("smenu"+id).style.display=="none") {
		document.getElementById("smenu"+id).style.display="";
		// document.getElementById("menu"+id).className="menu_active_smenu";
	}
	else {
		document.getElementById("smenu"+id).style.display="none";
		// document.getElementById("menu"+id).className="menu_on";
	}
}

// --------------------- trim()
function trim(string)
{
return string.replace(/(^\s*)|(\s*$)/g,'');
}
// --------------------- Trouver la position exact d'un objet
function fDomOffset(oObj,sProp)
{
 // oObj : [Object] - Objet dont on désire le positionnement
 // sProp : [String] - Propriété désirée : offsetLeft - offsetTop
 var iVal = 0;
 // On boucle tant que l'on n'est pas à la racine du document
 while (oObj && oObj.tagName != 'body') {
  eval('iVal += oObj.' + sProp + ';');
  oObj = oObj.offsetParent;
 }
 return iVal;
}

// --------------------- Ajustement de la position haute du bloc Actualité	
function ajustePosition () {
	if(document.getElementById("actualite")) {
		hauteur_actualite = document.getElementById("actualite").offsetHeight;
		oO.hauteur_actualite=hauteur_actualite;
		Haut = fDomOffset(document.getElementById("newsletter_submit"),"offsetTop");
		Haut = Haut+50;
	} else {
		false;
	}
}

// --------------------- Anti-spm	
function mspm () {
	window.location.href="mailto:%67%72%6F%75%70%65%6D%65%6E%74%5F%61%6D%75%72%40%6F%72%61%6E%67%65%2E%66%72";
}

// --------------------- active_popup	
function active_popup(nom) {
	if(LireCookie(nom)!="oui") {
	document.getElementById("popup_fond").style.display="";
	document.getElementById("popup_contenu").style.display="";
	}
}

// --------------------- close_popup	
function close_popup(nom) {
	document.getElementById("popup_fond").style.display="none";
	document.getElementById("popup_contenu").style.display="none";
	EcrireCookie(nom, "oui");
}
// --------------------- EcrireCookie()
function EcrireCookie(nom, valeur)
{
var argv=EcrireCookie.arguments;
var argc=EcrireCookie.arguments.length;
var expires=(argc > 2) ? argv[2] : null;
var path=(argc > 3) ? argv[3] : null;
var domain=(argc > 4) ? argv[4] : null;
var secure=(argc > 5) ? argv[5] : false;
document.cookie=nom+"="+escape(valeur)+
((expires==null) ? "" : ("; expires="+expires.toGMTString()))+
((path==null) ? "" : ("; path="+path))+
((domain==null) ? "" : ("; domain="+domain))+
((secure==true) ? "; secure" : "");
}
// --------------------- LireCookie()
function getCookieVal(offset)
{
var endstr=document.cookie.indexOf (";", offset);
if (endstr==-1) endstr=document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}
function LireCookie(nom)
{
var arg=nom+"=";
var alen=arg.length;
var clen=document.cookie.length;
var i=0;
while (i<clen)
{
var j=i+alen;
if (document.cookie.substring(i, j)==arg) return getCookieVal(j);
i=document.cookie.indexOf(" ",i)+1;
if (i==0) break;

}
return null;
}
//-->

