//script chargé par tous les documents de Zarlino

//fonction
var liens = false;

function ecritCookie(nom, valeur, expire) {
  if (expire==null) expiration="";
  else expiration = '(";expires=" + expire.toGMTString())';
  document.cookie = nom + "=" + escape(valeur) + expiration;

}

//modifie le tableau "links" afin que les liens des appels de notes ne soient pas suivis.
function desactLiens () {
  
  for (i=0; i < document.links.length-1; i++) {
    sig=document.links[i].hash;
    if (sig.indexOf('#fn') != -1) {
      document.links[i].href = 'javascript:void(0)';
    } 
    
  }  
  liens = true;
}


function appelNote(note) {
  if (location.protocol=='http:'){
    //ecritCookie('cvf_note', location.pathname + "+" + note)
  
    if (liens==false) desactLiens();  
    nt=window.open("note.php?fich=" + location.pathname + "&id=" + note, "notes", "width=500,height=100,scrollbars=yes,resizable=yes");
    nt.focus();
  }
  
}  

//code exécuté à l'ouverture du document

if(navigator.appVersion.substring(0,1) >3){
  if((parent.frames.length==0) ||  (location.pathname.indexOf('zarlino')==-1) ) nomCadre='rien'; else nomCadre=parent.frames[0].name;

  if((nomCadre!='navigationZ') && (window.name!='sansCadres') && (window.name!='notes')) {
  
    
    ecritCookie('zarlino_doc', location);
  
    window.location = 'index.html';
   
  }    
}
