

/**********afficheDetail(baliseId)************/

function affiche(baliseId){

  if (document.getElementById && document.getElementById(baliseId) != null)
    {
    document.getElementById(baliseId).style.visibility='visible';
    document.getElementById(baliseId).style.display='block';
    }
  }

/**********cacheId(baliseId)************/

/*function cacheId(baliseId){

  if (document.getElementById && document.getElementById(baliseId) != null)
    {
    document.getElementById(baliseId).style.visibility='hidden';
    document.getElementById(baliseId).style.display='none';
    }
  }*/


cacheId('{$this->id}');
// si JavaScript est disponible, cache le contenu dès le
// chargement de la page. Sans JavaScript, le contenu sera
// affiché.
function cacheId(baliseId){

  if (document.getElementById && document.getElementById(baliseId) != null)
    {
  
    document.getElementById(baliseId).style.visibility='hidden';
    document.getElementById(baliseId).style.display='none';
    }
  }

function changeParagraphe(baliseId) {
    
  maSource=document.getElementById(baliseId);
 
  document.getElementById("contenuTexte").innerHTML = maSource ;    
}

function getTxtAll(before,after){

    var b = document.getElementById(before);
    var p = b.innerHTML;
   
    var a = document.getElementById(after);
  while (a.childNodes.length>0) {
 a.removeChild(a.firstChild);
}
    var txt = document.createTextNode(p);
   
    //var u = txt.nodeValue;
   
    a.appendChild(txt); 
  
   // a.removeChild(txt); 
   
}


 
function afficherComposition(baliseId){
  div=document.getElementById(baliseId);
  maFen = window.open(div, "accueil", "height=400,width=600, screenX=200, screenY=300, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=yes, directories=no, status=no");
  maFen.focus();
}



function zoom(obj) {
  img=document.getElementById("zoom");
  imZoom=document.createElement("img");
  cible=obj.src.replace("icone", "web");
  imZoom.setAttribute ("src", cible);
  imZoom.alt=obj.alt;
  img.appendChild(imZoom);
  img.style.visibility="visible";
}


/*function affiche(url) {
  // ouvre le iframe avec le loader

upl= document.getElementById('loader');
upl.innerHTML = "<iframe src=\"" + url + "\" width=\"100%\" height=\"300px\" id=\"ifobj\" frameborder=\"0\"></iframe>";
upl.style.display='block';
}*/

                   
function limite(zone,max)
 {
 if(zone.value.length>=max){zone.value=zone.value.substring(0,max);}
 /* var nd = document.createElement("div");
	var compte = document.getElementById("compte");
	  compte.appendChild(nd);
	var input = document.createElement ("input");
	//var texte= zone.value.length;
	input.value=zone.value.length;
	//texte.appendChild(input);
	 nd.appendChild (input); */
	
	
 //alert (zone.value.length);
 }

function ddrivetip(thetext, thewidth, thecolor,tipobj){

if (typeof thewidth!="undefined") tipobj.style.width=thewidth+"px"

if (typeof thecolor!="undefined" && thecolor!="") tipobj.style.backgroundColor=thecolor

tipobj.innerHTML=thetext

enabletip=true

return false



}