
var titrevod;
var lienvideovod;
var indice_vod =1;
var arretervod=0;
var tabvod;
    window.dhx_globalImgPath="images/teste/";
  var currentregion =2;
  var currentuser = '-1';
	oldId=0;
	function afficher(newId){
	
	hidelayers(oldId);
	
	if(oldId!=newId){
	$("div#div"+oldId).fadeOut(300,function(){
	$("div#div"+newId).fadeIn(300);
	});
	oldId=newId;
	indice_vod=newId;
	}
	
	displaylayers(newId);
	}
 
 
 
  function vodtournant()
  {
        setTimeout('getvodtournant()',5000);
  }
 
  function getvodtournant()
  { 
       if (arretervod==0)
         afficher(indice_vod);
       
       indice_vod=indice_vod+1;      
   
   if (indice_vod>=4)
      indice_vod=0;
    if (arretervod==0)
        vodtournant(); 
  }
  function arreter_vod()
  {
  arretervod=1;
  }
  function getposvod(id)
  {
  var trouve=0;
  for(i=0;i<4 && trouve==0;i++)
  {
  if (tabvod[i]==id)
  {
    trouve=1;
    indice_vod=i;
  }
  }
  
  }
   function getvod2(id)
  {
    
    getposvod(id);
	var a='getvod('+id+')';
	setTimeout(a,300);
  }
  function displaylayers(id)
  {
  
  document.getElementById('txt_vod_element'+id).style.display='block';
  document.getElementById('vod_btn_video'+id).style.display='block';
  document.getElementById('vod_img_exculsif'+id).style.display='block';
  document.getElementById('vod_element'+id).style.backgroundImage='url(images/teste/vod_vignette_selected.jpg)';
  document.getElementById('vod_element'+id).style.backgroundRepeat='no-repeat';
  document.getElementById('vod_element'+id).className='vod_selected';
  
   
  }
  function hidelayers(id)
  {
  
  document.getElementById('txt_vod_element'+id).style.display='none';
   document.getElementById('vod_btn_video'+id).style.display='none';
  document.getElementById('vod_img_exculsif'+id).style.display='none';
  document.getElementById('vod_element'+id).style.backgroundImage='url(images/teste/vod_vignette.jpg)';
  document.getElementById('vod_element'+id).style.backgroundRepeat='repeat-y';
  document.getElementById('vod_element'+id).className='vod';
 
   

 }
  



