/*
Floating image II (up down)- Bruce Anderson (http://appletlib.tripod.com)
Submitted to Dynamicdrive.com to feature script in archive
Modified by DD for script to function in NS6
For 100's of FREE DHTML scripts, Visit http://www.dynamicdrive.com
Modifié par Mathieu Germain pour obtenir un logo flottant très personnalisable
*/

var delay_time=20; // Délai de vérification de la position en millisecondes

var ns4=document.layers?1:0;
var ie=document.all?1:0;
var ns6=document.getElementById&&!document.all?1:0;


//Paramètres pour NS6 parce que document.getElementById("regard").offsetHeight et offsetWidth ne fonctionnent pas.
var largeur=75; //Largeur de l'image
var hauteur=80;	//Hauteur de l'image

if(ie)
{
	XX=document.body.clientWidth-regard.offsetWidth-16;
	YY=document.body.clientHeight;
	regard.style.left=XX;
	regard.style.top=YY;
}

else if (ns4)
{
	XX=window.innerWidth-document.regard.clip.width-16;
	YY=window.innerHeight;
	document.regard.pageX=XX;
	document.regard.pageY=YY;
}

else if (ns6)
{
	XX=window.innerWidth-largeur-20;
	YY=window.innerHeight;
	document.getElementById("regard").style.left=XX;
	document.getElementById('regard').style.top=YY;
}


function reloc1()
{
	if(ie)
		regard.style.top=YY+document.body.scrollTop-regard.offsetHeight;
	else if (ns4)
		document.regard.pageY=YY+window.pageYOffset-document.regard.clip.height+20;
	else if (ns6)
		document.getElementById("regard").style.top=YY+window.pageYOffset-hauteur-20;//-document.getElementById("regard").offsetHeight;//si quelqu'un pouvait m'expliquer pourquoi la fonction 'offsetHeight' me retourne toujours 0, j'en serais très heureux.
}


function onad()
{
	if(ie)
		regard.style.visibility="visible";
	if(ns4)
		document.regard.visibility="visible";
	if(ns6)
		document.getElementById("regard").style.visibility="visible";
	loopfunc();
}


function loopfunc()
{
	reloc1();
	setTimeout('loopfunc()',delay_time);
}


if (ie||ns4||ns6)
	onad();