﻿// JavaScript Document

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}



// D'autres scripts et des tutoriaux sur http://www.toutjavascript.com
// Script pour ouverture de pop-up à la taille de l'image
/*function PopupImage(img) {
	titre="Popup Image - Tout Javascript.com";
	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+12,document.images[0].height+30); window.focus();} else { setTimeout('check()',250) } }</"+"SCRIPT>");
	w.document.write("<BODY onload='checksize()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0><IMG src='"+img+"' border=0>");
	w.document.write("");
	w.document.write("</BODY></HTML>");
	w.document.close();
}

*/

// script diapo auto page d'accueil http://webmaster.lycos.fr/tips/988878374/
/*
var timeDelay = 5;
var Pix = new Array
("images/accueil/IBDSU014_3D.jpg"
,"images/accueil/IBDSU014_7D.jpg"
,"images/accueil/IBPIE044_3D.jpg"
,"images/accueil/IBPIE044_7D.jpg"
);
var howMany = Pix.length;
timeDelay *= 300;
var PicCurrentNum = 0;
var PicCurrent = new Image();
PicCurrent.src = Pix[PicCurrentNum];
function startPix() {
setInterval("slideshow()", timeDelay);
}
function slideshow() {
PicCurrentNum++;
if (PicCurrentNum == howMany) {
PicCurrentNum = 0;
}
PicCurrent.src = Pix[PicCurrentNum];
document["ChangingPix"].src = PicCurrent.src;
}
//  End
		*/

// Fadein

      var timer = 0;
      var iFade = 1;
      var iOpacity = 0;
      var idFade = "";
      
      function FadeById(id) {
        idFade = id;
        timer = setInterval("FadeIn()", 75);
      }
      
      function CancelFadeById() {
        if (timer == 0) return;
        clearInterval(timer);
        timer = 0;
      }
      
      function FadeIn() {
        var elem = document.getElementById(idFade + iFade);
        if (iOpacity >= 1) {
          iFade++;
          elem = document.getElementById(idFade + iFade);
          if (! elem) {
            CancelFadeById();
            return;
          }
          iOpacity = 0;
        }
        iOpacity += 0.1;
        elem.style.opacity = iOpacity;
        elem.style.MozOpacity = iOpacity;
        elem.style.KhtmlOpacity = iOpacity;
        elem.style.filter = "alpha(opacity=" + iOpacity * 100 + ")";
      }
	  
    <noscript>
      <style>
        .imgfade {
          opacity: 1;
          -Moz-Opacity: 1;
          -Khtml-Opacity: 1; 
          filter: alpha(opacity=100);
        }
      </style>
    </noscript>


// splash - diapo photo - http://www.chez-xuxu.net/ressources/javascript/splash.image/
// Voir lien fichier js et css de splash, dans inc.header.php





// Info bulle sur les liens (galeries)

//D'autres scripts sur http://www.toutjavascript.com
//Auteur original :Olivier Hondermarck  <<voir adresse mail sur site>>
//Modifs compatibilité Netscape 6/Mozilla : Cédric Lamalle 09/2001>
//Correction Mac IE5 (Merci Fred)

var IB=new Object;
var posX=0;posY=0;
var xOffset=10;yOffset=10;
function AffBulle(texte) {
  contenu="<TABLE border=0 cellspacing=0 cellpadding="+IB.NbPixel+"><TR bgcolor='"+IB.ColContour+"'><TD><TABLE border=0 cellpadding=2 cellspacing=0 bgcolor='"+IB.ColFond+"'><TR><TD><FONT size='-1' face='arial' color='"+IB.ColTexte+"'>"+texte+"</FONT></TD></TR></TABLE></TD></TR></TABLE>&nbsp;";
  var finalPosX=posX-xOffset;
  if (finalPosX<0) finalPosX=0;
  if (document.layers) {
    document.layers["bulle"].document.write(contenu);
    document.layers["bulle"].document.close();
    document.layers["bulle"].top=posY+yOffset;
    document.layers["bulle"].left=finalPosX;
    document.layers["bulle"].visibility="show";}
  if (document.all) {
    //var f=window.event;
    //doc=document.body.scrollTop;
    bulle.innerHTML=contenu;
    document.all["bulle"].style.top=posY+yOffset;
    document.all["bulle"].style.left=finalPosX;//f.x-xOffset;
    document.all["bulle"].style.visibility="visible";
  }
  //modif CL 09/2001 - NS6 : celui-ci ne supporte plus document.layers mais document.getElementById
  else if (document.getElementById) {
    document.getElementById("bulle").innerHTML=contenu;
    document.getElementById("bulle").style.top=posY+yOffset;
    document.getElementById("bulle").style.left=finalPosX;
    document.getElementById("bulle").style.visibility="visible";
  }
}
function getMousePos(e) {
  if (document.all) {
  posX=event.x+document.body.scrollLeft; //modifs CL 09/2001 - IE : regrouper l'évènement
  posY=event.y+document.body.scrollTop;
  }
  else {
  posX=e.pageX; //modifs CL 09/2001 - NS6 : celui-ci ne supporte pas e.x et e.y
  posY=e.pageY; 
  }
}
function HideBulle() {
	if (document.layers) {document.layers["bulle"].visibility="hide";}
	if (document.all) {document.all["bulle"].style.visibility="hidden";}
	else if (document.getElementById){document.getElementById("bulle").style.visibility="hidden";}
}

function InitBulle(ColTexte,ColFond,ColContour,NbPixel) {
	IB.ColTexte=ColTexte;IB.ColFond=ColFond;IB.ColContour=ColContour;IB.NbPixel=NbPixel;
	if (document.layers) {
		window.captureEvents(Event.MOUSEMOVE);window.onMouseMove=getMousePos;
		document.write("<LAYER name='bulle' top=0 left=0 visibility='hide'></LAYER>");
	}
	if (document.all) {
		document.write("<DIV id='bulle' style='position:absolute;top:0;left:0;visibility:hidden'></DIV>");
		document.onmousemove=getMousePos;
	}
	//modif CL 09/2001 - NS6 : celui-ci ne supporte plus document.layers mais document.getElementById
	else if (document.getElementById) {
	        document.onmousemove=getMousePos;
	        document.write("<DIV id='bulle' style='position:absolute;top:0;left:0;visibility:hidden'></DIV>");
	}

}