// 24/09/09 | Laurent Quincet | - Passage � H�lios
function AffEff(id)
{
	el = document.getElementById(id);
	var display = el.style.display ? '' : 'none';
	el.style.display = display;
}

function Eff(id)
{
   el = document.getElementById(id);
   el.style.display = 'none'
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function testpromoteur()
{

  if (document.promoteur.IN_PRO_id.value=='') 
	{
	  alert("Vous n'avez choisi aucun promoteur") ;
	}
  else
 	{
    document.promoteur.submit();
	}
}

function testlabel()
{

  if (document.label.IN_LAB_id.value=='') 
	{
	  alert("Vous n'avez choisi aucun label") ;
	}
  else
 	{
    document.label.submit();
	}
}

function sendIT(fileName)
{
  if (fileName !="")
  {
    Somfen=window.open(fileName,"Som","toolbar=1,location=1,scrollbars=1,directories=1,status=1,menubar=1,resizable=1");
  }
}

// *** Juste pour la liste d'annonce, effet de onmouseover ***
function tablChgOff(id)
{
 id.style.borderColor = '#fff';
 id.style.borderBottomColor = '#ddd';
} 
function tablChgOn(id)
{
 id.style.borderColor = '#000';
}
// *** fin de l'effet d'annonce ***

// affichage des images des dossiers en popup //

function AfficherImage(img){
  Image1= new Image();
  Image1.src=(img);
  Control(img);
}
function Control(img){
  if((Image1.width!=0)&&(Image1.height!=0)){
    VoirImage(img);
  }
  else{
    fonction="Control('"+img+"')";
    intervalle=setTimeout(fonction,20);
  }
}
function VoirImage(img){
  largeur=Image1.width+20;
  hauteur=Image1.height+20;
  proprietes="width="+ largeur +",height="+ hauteur;
  win=window.open(img,"",proprietes);
}

function addLoadEvent(func) { 
    
    var currentOnload=function() {};
    
    if (typeof window.onload == 'function'){
        currentOnload = window.onload;
    }

    window.onload = function(){
        currentOnload();
        eval(func);
    }

}

function bait_favoris(url)
{
	if(url==undefined || url==null || url=="")
	{
		url = window.location.href;
	}
  var title = document.title;
  
  if(window.sidebar){
     window.sidebar.addPanel(title, url, "");
  } else if(document.all){
     window.external.AddFavorite(url, title);
  } else if(window.opera && window.print){
     alert('Appuyez sur ctrl+D pour ajouter aux favoris et cliquez sur Ok');
  } else if(window.chrome){
     alert('Appuyez sur ctrl+D pour ajouter aux favoris et cliquez sur Ok');
  }
}
