// Original:  Randy Bennett (rbennett@thezone.net) 
// Modifié pour 2 objets: Michel Fingerhut (mf@ircam.fr)
// Web Site:  http://home.thezone.net/~rbennett/utility/javahead.htm 

// This script and many more are available free online at 
// The JavaScript Source!! http://javascript.internet.com 

function setFormButtons() {
   imgwidth=45;  // logo width, in pixels
   imgheight=10;  // logo height, in pixels
   if (navigator.appName == "Netscape") {
	horz=".left";
	vert=".top";
	docStyle="document.";
	styleDoc="";
	innerW="window.innerWidth";
	innerH="window.innerHeight";
	offsetX="window.pageXOffset";
	offsetY="window.pageYOffset";
   } else {
	horz=".pixelLeft";
	vert=".pixelTop";
	docStyle="";
	styleDoc=".style";
	innerW="document.body.clientWidth";
	innerH="document.body.clientHeight";
	offsetX="document.body.scrollLeft";
	offsetY="document.body.scrollTop";
   }
}

function checkLocation() {
   var availableX=eval(innerW);
   var availableY=eval(innerH);
   var currentX=eval(offsetX);
   var currentY=eval(offsetY);
   xg=10+currentX;
   xd=availableX-(imgwidth+35)+currentX;
   y=availableY-(imgheight+30)+currentY;
   eval(docStyle + "gauche" + styleDoc + horz + "=" + xg);
   eval(docStyle + "gauche" + styleDoc + vert + "=" + y);
   eval(docStyle + "droit" + styleDoc + horz + "=" + xd);
   eval(docStyle + "droit" + styleDoc + vert + "=" + y);
   setTimeout("checkLocation()",10);
}

function showObject () {
   eval(docStyle + "droit" + styleDoc + ".visibility=\"visible\"");
   eval(docStyle + "gauche" + styleDoc + ".visibility=\"visible\"");
}