function detail(id) 
{
    var xhr; 
    try {  xhr = new ActiveXObject('Msxml2.XMLHTTP');   }
    catch (e) 
    {
        try {   xhr = new ActiveXObject('Microsoft.XMLHTTP');    }
        catch (e2) 
        {
          try {  xhr = new XMLHttpRequest();     }
          catch (e3) {  xhr = false;   }
        }
     }
 
    xhr.onreadystatechange  = function()
    { 
         if(xhr.readyState  == 4)
         {
              if(xhr.status  == 200) 
                 prompt_open(xhr.responseText); 
              else 
                 prompt_open("Erreur");
         }
    }; 

   var data = "id=" + id + "&ajax=1";
   xhr.open("POST", "index.php", true);
   xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");       
   xhr.send(data);
}

function prompt_open(content)
{  
  var _docHeight = Math.max(document.documentElement.clientHeight, document.documentElement.scrollHeight);
  var _docWidth = (document.width !== undefined) ? document.width : document.body.offsetWidth;
  
  if(window.innerHeight > _docHeight){ _docHeight = window.innerHeight;}

  promptBg = document.createElement('div');
  promptBg.id = 'promptBg';
  promptBg.className = 'prompt_bg';
  document.getElementsByTagName('body').item(0).appendChild(promptBg);  

  promptBg.style.height = _docHeight + 'px';
  promptBg.style.width = _docWidth + 'px';
  promptBg.style.display = 'block';

  myPrompt = document.createElement('div');
  document.getElementsByTagName('body').item(0).appendChild(myPrompt);

  myPrompt.innerHTML = '';
  myPrompt.id = 'myPrompt';
  myPrompt.className = 'prompt_body';
  promptHTML = content;
  myPrompt.innerHTML = promptHTML;
  
  var vscroll = (document.all ? document.documentElement.scrollTop : window.pageYOffset);
  var clientHeight = (document.all ? document.documentElement.clientHeight : window.innerHeight);
  
  var h = ((clientHeight/2) - (300));
  myPrompt.style.top =  (h + vscroll) + "px";

  myPrompt.style.left = ((_docWidth-800)/2) +"px";
  myPrompt.style.display = 'block';
}

function prompt_close()
{
  promptBg.style.display = 'none';
  myPrompt.style.display = 'none';
  myPrompt.innerHTML = '';
}


timerID = null; 

function ChangePage(num){ 
if(document.getElementById){ 
obj.style.visibility = "hidden"; 
active = num; 
obj.style.visibility = "visible"; 
} 
} 

function ScrollLeft(speed){ 
if(document.getElementById){ 
if(parseInt(obj.style.left) < 0){ 
if(parseInt(obj.style.left) + speed > 0){obj.style.left = "0px";}else{obj.style.left = parseInt(obj.style.left) + speed + "px";} 
} 
}
} 

function ScrollRight(speed){ 
if(document.getElementById){ 
if(parseInt(obj.style.left) > document.getElementById('scroll').offsetWidth - obj.offsetWidth){ 
if(parseInt(obj.style.left) - speed < -(document.getElementById('slide').offsetWidth - document.getElementById('scroll').offsetWidth)){
obj.style.left = -(document.getElementById('slide').offsetWidth - document.getElementById('scroll').offsetWidth)+1 + "px";
}else{
obj.style.left = parseInt(obj.style.left) - speed + "px";
}
}  
} 
} 

function ScrollPageInit() { 
if(document.getElementById){ 
obj = document.getElementById("slide"); 
obj.style.visibility = "visible"; 
obj.style.left = 0; 
} 
} 

