    // renvoie l'objet de nom n dans le document d...
	function findObj(n, d) 
	{
		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 && document.getElementById) 
			x=document.getElementById(n); 
			
		return x;
	}
	
// affiche les propiŽtŽs d'un objet
	function show_props(obj, objName) {
	 var res ='';
	 for (var i in obj)
	 {
	  res += objName + "." + i + " = " + obj[i] + '\n'
	 }
	 prompt("props:"+objName,res);
	 return res
	}

/*

  FONCTION POUR LA POURSUITE DE LA SOURIS : GROS CURSEUR POUR LES MIROS 
  
  NB : La fonction followmouse sert aussi pour le centrage dans la fenetre...

*/

var cursorIMG=["/images/curseur.png", 37, 49] //image path, largeur, hauteur
//var offsetFromMouse=[-4,2] //dŽcalage par rapport ˆ la souris. Si 0,0 suivant le navigateur on risque de ne pas pouvoir cliquer (clique sur l'image du curseur) !!!
var offsetFromMouse=[-2,10] //dŽcalage par rapport ˆ la souris. Si 0,0 suivant le navigateur on risque de ne pas pouvoir cliquer (clique sur l'image du curseur) !!!

if (document.getElementById || document.all)
  document.write('<div id="grosCurseur" style="position:absolute;visibility:visible;left:-'+cursorIMG[1]+'px;left:-'+cursorIMG[2]+'px;top:0px;width:auto;height:auto;z-index:9999;"><img src="'+cursorIMG[0]+'" border="0" width="'+cursorIMG[1]+'px" height="'+cursorIMG[2]+'px"></div>')

function followmouse(e)
{
  if (oldMouseMove!=null)
    oldMouseMove(e);
  curseur = gmobj("grosCurseur");
  if (curseur != null) 
  {
	if (affGrosCurseur)
	{
      curseur.style.top = MouseY + offsetFromMouse[1];
  	  curseur.style.left = MouseX + offsetFromMouse[0];
  	  curseur.style.visibility = "visible";
    }
    else
    {
      curseur.style.top=0;
      curseur.style.left=0;
  	  curseur.style.visibility = "hidden";
    }
  }
}




function afficherDiapo()
{
  var diapo=findObj('diapo');
  var diapoImg=findObj('diapoImg');
  var diapoComment=findObj('diapoComment');
  diapoTop=(getWindowHeight()-diapoImg.height-65)/2;
  diapoLeft=(getWindowWidth()-diapoImg.width-getWindowWidth()*0.1)/2;
  diapo.style.top = diapoTop;
  diapo.style.left = diapoLeft;
  
  if (diapoTop+diapoImg.height+30>getWindowHeight()-65)
    commentTop=getWindowHeight()-30-65;
   else
    commentTop = diapoTop+diapoImg.height+10;
  if (diapoComment!="")
  diapoComment.style.top= commentTop;
  diapo.style.visibility="visible";
  diapoImg.style.visibility="visible";
  if (diapoComment!="")
  diapoComment.style.visibility="visible";
}

function getWindowWidth() 
{
  var myWidth = 0;
  if( typeof( window.innerWidth ) == 'number' ) 
  {
    myWidth = window.innerWidth;
  } 
  else if( document.documentElement && document.documentElement.clientWidth) 
  {
    myWidth = document.documentElement.clientWidth;
  } 
  else if( document.body && document.body.clientWidth ) 
  {
    myWidth = document.body.clientWidth;
  }
  return myWidth;
}

function getWindowHeight() 
{
  var myHeight = 0;
  if( typeof( window.innerHeight ) == 'number' ) 
  {
    myHeight = window.innerHeight;
  } 
  else if( document.documentElement && document.documentElement.clientHeight) 
  {
    myHeight = document.documentElement.clientHeight;
  } 
  else if( document.body && document.body.clientHeight ) 
  {
    myHeight = document.body.clientHeight;
  }
  return myHeight;
}
