var isOpera = (navigator.userAgent.toLowerCase().indexOf('opera') > -1);     

	
  /*
  fonction retournant le texte contenu dans un element html
  */
  function objText(obj) {
        var text = '';
        var ok =false;
        // cas IE 
        if(obj.innerText) {
            
            text = obj.innerText;
            ok = true;
        }
        // cas Fx 
        if ((obj.textContent) &&(!ok))
        {
           text = obj.textContent;
           ok = true;
        }
        // nettoyage des retour chariot
        text = text.replace(/rn/g," ");
        return text; 
  } 

function objExplorer(obj,notNull) {
    msg = ''
    var k = 0;
    for (var i in obj)
    {
     if(!notNull)    {
         msg = msg + i + ' = ' + obj[i]+ ' | ';
       } else {   
           if(obj[i] != null) {
            msg = msg + i + ' = ' + obj[i]+ ' | ';
         }
       }  
         k++;
         if(k == 5 ) {
             msg = msg + "\n";
             k = 0;
         }
    
    }
    alert(msg);
}	

function favorites(){ 
if (navigator.appName.indexOf("Netscape") > -1) {
   window.alert("Pour ajouter cette page à vos signets tapez CTRL-D  Merci.")
}
else {
   window.external.AddFavorite('http://media-alarme.absolunet-demo.com/','Media Alarme - "sécurité - fiabilité - réactivité"');
}}

function setClass(obj,classe) {
    

    
    if ((document.all)&&(!isOpera)) {
        
        obj.setAttribute('className',classe);
         
    } else {
        
        obj.setAttribute('class',classe);
        
    }
}

