<!--
function open_popup_url(url) {
	window.open(url,'pop_html','width=370,height=220,location=0,menubar=0,resizable=0,scrollbars=0,status=0,titlebar=0,toolbar=0');
}
function open_popup_url_option(url,x,y) {
	window.open(url,'more_html','width='+x+',height='+y+',location=0,menubar=0,resizable=0,scrollbars=0,status=0,titlebar=0,toolbar=0');
}
function open_popup(pim) {
	window.open('affichage_photo.php?pim='+pim,'pop_agrandi','width=640,height=480,location=0,menubar=0,resizable=0,scrollbars=0,status=0,titlebar=0,toolbar=0');
}

function refresh()
{
    window.location.reload( false );
}

var sURL = unescape(window.location.pathname);

function doLoad()
{
    setTimeout( "refresh()", 60*1000 );
	window.self.focus();
}

function SimpleSwap(el,which){
  el.src=el.getAttribute(which || "origsrc");
}

function SimpleSwapSetup(){
  var x = document.getElementsByTagName("img");
  for (var i=0;i<x.length;i++){
    var oversrc = x[i].getAttribute("oversrc");
    if (!oversrc) continue;
      
    // preload image
    // comment the next two lines to disable image pre-loading
    x[i].oversrc_img = new Image();
    x[i].oversrc_img.src=oversrc;
    // set event handlers
    x[i].onmouseover = new Function("SimpleSwap(this,'oversrc');");
    x[i].onmouseout = new Function("SimpleSwap(this);");
    // save original src
    x[i].setAttribute("origsrc",x[i].src);
  }
}

var PreSimpleSwapOnload =(window.onload)? window.onload : function(){};
window.onload = function(){PreSimpleSwapOnload(); SimpleSwapSetup();}


// ************************************************************
// POUR LE ALT EN DYNAMIQUE HTML - PAR LE STUDIO - ATOS ORIGIN
// ************************************************************

// 1] D�tection du navigateur
	var ns4=(document.layers)? true:false;
	var ns6=(document.getElementById)? true:false;
	var ie4=(document.all)? true:false;
	var ie5=false;
	if(ie4){
		if((navigator.userAgent.indexOf('MSIE 5')> 0)||(navigator.userAgent.indexOf('MSIE 6')> 0)){
			ie5=true;
		}
		if(ns6){
			ns6=false;
		}
	}

var x=0; var y=0;

if (ns4) { document.captureEvents(Event.MOUSEMOVE); }
document.onmousemove = foncAlt;

// 1bis] D�tection de la r�solution
if (screen.width >= 800 && !ns4) {
  var scraper=true;
} else {
  var scraper=false;
}


// 2] Mouvement de la souris - Grand public
function showAlt(txt,intro) {
	var coulBord = "#000080";
	var coulFond = "#ffffdd";
	var coulTxt = "#000000";
	contenu = '<table style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; border: '+coulBord+'; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; background-color: '+coulFond+'" border="0" cellspacing="1" cellpadding="1"><tr><td nowrap><font style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: '+coulTxt+'">';
	if (intro) {
		contenu=contenu+'<b>'+unescape(intro)+'</b>'+unescape(txt)+'</font></td></tr></table> ';
		longueur = getTailleDiv(unescape(intro)+unescape(txt));
		
	} else {
		contenu=contenu+unescape(txt)+'</font></td></tr></table> '; 
		longueur = getTailleDiv(unescape(txt));
	}
	creaAlt(contenu);
}

function getTailleDiv(txt) {
	var result =0;
	var re = new RegExp ('<br>', 'gi') ;
	var textetmp= txt.replace(re,'<BR>');
	var re2 = new RegExp ('&eacute;', 'gi') ;
	var texte= textetmp.replace(re2,'e');
	var lignes = texte.split("<BR>");
	for (i=0;i< lignes.length;i++) {
		if (lignes[i].length> result) {
			result=lignes[i].length;
		}
	}
	return result*5;
}

// 2bis] Mouvement de la souris - Pro
function showPro(txt) {
	var coulBord = "#FFC60A";
	var coulFond = "#FFEBAA";
	var coulTxt = "#000000";
	contenu = '<table width="245" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; border: '+coulBord+'; border-style: solid; border-top-width: 2px; border-right-width: 2px; border-bottom-width: 2px; border-left-width: 2px; background-color: '+coulFond+'" border="0" cellspacing="1" cellpadding="4"><tr><td><font style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: '+coulTxt+'">'+unescape(txt)+'</font></td></tr></table> ';
	creaAlt(contenu);
}

function showPubAlt(txt) {
	var coulBord = "#000000";
	var coulFond = "#FFFFFF";
	var coulTxt = "#000000";
	contenu = '<table width="140" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; border: '+coulBord+'; border-style: solid; border-top-width: 2px; border-right-width: 2px; border-bottom-width: 2px; border-left-width: 2px; background-color: '+coulFond+'" border="0" cellspacing="1" cellpadding="4"><tr><td><font style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: '+coulTxt+'">'+txt+'</font></td></tr></table> ';
	creaAlt(contenu);
}
var longueur=0;
// 3] Cr�ation du contenu du layer
function creaAlt(contenu) {
	if (ie4 || ie5) {
		if (longueur) {
			x=  window.ALTdHTML.style.left.substr(0,window.ALTdHTML.style.left.indexOf("px"))*1;

			if (x  > document.body.clientWidth- (longueur)) {
				if (x-longueur <0) {
					window.ALTdHTML.style.left=0;
				} else {
					window.ALTdHTML.style.left=x-longueur;
				}
				
			}
		}
		window.ALTdHTML.innerHTML=contenu;
		window.ALTdHTML.style.visibility='visible';
	}
  if (ns4) {
		document.layers["ALTdHTML"].document.write(contenu);
		document.layers["ALTdHTML"].document.close();
		document.layers.ALTdHTML.visibility='show';
	}
  if (ns6) {
		if (longueur) {
			x=  document.getElementById("ALTdHTML").style.left.substr(0,document.getElementById("ALTdHTML").style.left.indexOf("px"))*1;

			if (x  > document.body.clientWidth- (longueur)) {
				if (x-longueur <0) {
					document.getElementById("ALTdHTML").style.left=0;
				} else {
					document.getElementById("ALTdHTML").style.left=x-longueur;
				}
				
			}
		}
		document.getElementById("ALTdHTML").innerHTML=contenu;
		document.getElementById("ALTdHTML").style.visibility='visible';
		
  }
}
LIMIT =160;
// 4] Positionner le layer							///// onmusemouve !!!!!!

var isIE = document.all;
var mouseX = 0;
var mouseY = 0;

function foncAlt(evt) {

	if (ie4 || ie5) {
		x=event.clientX+document.body.scrollLeft; y=event.clientY+document.body.scrollTop;
		window.ALTdHTML.style.left=x+10;
		if (longueur) {
			x=  window.ALTdHTML.style.left.substr(0,window.ALTdHTML.style.left.indexOf("px"))*1;

			if (x  > document.body.clientWidth- (longueur)) {
				if (x-longueur <0) {
					window.ALTdHTML.style.left=0;
				} else {
					window.ALTdHTML.style.left=x-longueur;
				}
				
			}
		}
	  	window.ALTdHTML.style.top=y+14;
	}
	if (ns4) {
		x = (navigator.appName.substring(0,3) == "Net") ? evt.pageX : event.x+document.body.scrollLeft;
		y = (navigator.appName.substring(0,3) == "Net") ? evt.pageY : event.y+document.body.scrollTop;
		document.layers.ALTdHTML.left=x+10;
		document.layers.ALTdHTML.top=y+14;
	}
	if (ns6) {
		x=evt.clientX+document.body.scrollLeft; y=evt.clientY+document.body.scrollTop;
	  	document.getElementById("ALTdHTML").style.left=x+10;
	  	if (longueur) {
			x=  document.getElementById("ALTdHTML").style.left.substr(0,document.getElementById("ALTdHTML").style.left.indexOf("px"))*1;

			if (x  > document.body.clientWidth- (longueur)) {
				if (x-longueur <0) {
					document.getElementById("ALTdHTML").style.left=0;
				} else {
					document.getElementById("ALTdHTML").style.left=x-longueur;
				}
				
			}
		}
	  	document.getElementById("ALTdHTML").style.top=y+14;
	}
	if (!evt) evt = window.event;	
	if (evt) {
			mouseX = isIE ? (evt.clientX + document.body.scrollLeft) : evt.pageX;
			mouseY = isIE ? (evt.clientY + document.body.scrollTop) : evt.pageY;
	}
}

// 5] Effacer le layer
function hideAlt() {
	if (ie4 || ie5) {
		window.ALTdHTML.style.visibility='hidden';
		window.ALTdHTML.innerHTML="";
		longueur=0;
	}else if (ns4) {
		document.layers.ALTdHTML.visibility='hide';
		document.layers["ALTdHTML"].document.write("");
		document.layers["ALTdHTML"].document.close();
	}else if (ns6) {
		document.getElementById("ALTdHTML").style.visibility='hidden';
		document.getElementById("ALTdHTML").innerHTML="";
		longueur=0;
	}
}
// ************************************************************
// OUVERTURE D'UN LAYER AVEC PARAMETRE - PAR LE STUDIO - ATOS ORIGIN
// ************************************************************

function ShoHidLayers() { //v6.0

   var i,p,v,obj,args=ShoHidLayers.arguments;



   if (ShoHidLayers.arguments[1] && document.outils.elements[ShoHidLayers.arguments[1]].checked == true)
   {
      v='show';
      if (ShoHidLayers.arguments[0] == "hydro")
      {
         EcrireCookie("Hydro");
      }
      if (ShoHidLayers.arguments[0] == "dept")
      {
         EcrireCookie("dept");
      }
      if (ShoHidLayers.arguments[0] == "villes")
      {
         EcrireCookie("villes");
      }

   }
   else
   {
      v='hide';
      if (ShoHidLayers.arguments[0] == "hydro")
      {
         EffacerCookie("Hydro");
      }
      if (ShoHidLayers.arguments[0] == "dept")
      {
         EffacerCookie("dept");
      }
      if (ShoHidLayers.arguments[0] == "villes")
      {
         EffacerCookie("villes");
      }
   }
   for (i=0; i<(args.length-2); i+=3)
      if ((obj=MM_findObj(args[i]))!=null)
      {
         if (ShoHidLayers.arguments[1]=="") { v=args[i+2];
      }
      if (obj.style)
      {
         obj=obj.style;
         v=(v=='show')?'visible':(v=='hide')?'hidden':v;
      }
      obj.visibility=v;
   }
}
//-->

<!-- //
//var isIE = document.all;
//var mouseX = 0;
//var mouseY = 0;

function getMouseXY(e) {
		if (!e) e = window.event;	
		if (e)
			{
				mouseX = isIE ? (e.clientX + document.body.scrollLeft) : e.pageX;
				mouseY = isIE ? (e.clientY + document.body.scrollTop) : e.pageY;
			}
}
//document.onmousemove = getMouseXY;

function tooltipShow(myDiv,msg) {

		if (msg) document.getElementById(myDiv).innerHTML=msg;
		document.getElementById(myDiv).style.visibility ="visible";
		document.getElementById(myDiv).style.left = mouseX +"px";
  		document.getElementById(myDiv).style.top = mouseY +"px";
}

function tooltipHide(myDiv) {
		document.getElementById(myDiv).style.visibility ="hidden";
}
// -->
