function grade(pourcent) {
    Obj = document.getElementById('lightboxfond');
	Obj.style.filter="alpha(opacity="+pourcent+")";
	Obj.style.opacity="0."+pourcent;
	if(pourcent < 72) {
		var suivant = pourcent+9;
		setTimeout('grade('+suivant+');', 1);
	}
}
function degrade(pourcent) {
    Obj = document.getElementById('lightboxfond');
	Obj.style.filter="alpha(opacity="+pourcent+")";
	Obj.style.opacity="0."+pourcent;
	if(pourcent > 0) {
		var suivant = pourcent-10;
		setTimeout('degrade('+suivant+');', 1);
	} else { 
	  Obj.style.display="none";
	}
}
function ShowForm(){
  var Obj;
  //-- on affiche le fond
  Obj = document.getElementById('lightboxfond');
  if(Obj){
    with(Obj.style){
      display="block";
	  //si IE6 debut
	  re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
	  if (re.exec(navigator.userAgent) != null) {
		  rv = parseInt( RegExp.$1 );
		  if(rv == 6) {
			  Obj.style.position="absolute";
			  taillenav = document.getElementsByTagName("html")[0].clientWidth;
			  taillebody = Obj.clientWidth;
			  Obj.style.left = ((taillebody-taillenav)/2)+"px";
			  if(Obj.style.left > 0) { Obj.style.left = "-"+Obj.style.left; }
			  Obj.style.width = taillenav+"px";
			  Obj.style.top = "-2%";
			  Obj.style.height = document.getElementsByTagName("html")[0].clientHeight;
		  }
	  } //si ie6 fin
	  grade('1');
    }
  }
  //-- on affiche le formulaire
  Obj = document.getElementById('lightbox');
  if( Obj){
    with( Obj.style){
      display="block";
	  left="50%";
	  top="50%";
	  margin="-200px 0 0 -200px";
    }
    Obj.focus();
  }
}
function HideForm(){
  var Obj;
  Obj = document.getElementById('lightbox');
  //-- on masque le formulaire
  if( Obj){
    with( Obj.style){
      display="none";
    }
  }
  //-- on masque le fond  
  Obj = document.getElementById('lightboxfond');
  if( Obj){
    with( Obj.style){
	  degrade('70');
    }
  }
}
