// JavaScript Document
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function writemail(hostname,username,linktext,mode) {
  if (hostname.length > 0) {
	  mail_to="mail" + "to:" + username + "@" + hostname;
	  if (mode==0) {  
		  (linktext.length > 0)?document.write("<a href=" + mail_to + ">" + linktext + "</a>"):document.write("<a href=" +  mail_to + ">" + username + ""+"@" + hostname +"" + "</a>"); 
	  }
	  else { document.location.replace(mail_to); }
  }
}


function fnInsertPrint()
{
   // Création d'un lien
   var oA = document.createElement('a');
   oA.setAttribute('href', '#');
   oA.innerHTML='<img src="http://www2.cnrs.fr/sites/00-elements-communs/image/icon/imprimer.gif" alt=" Imprimer" width="19" height="19" border="0" />';
 //  var oTxtA = document.createTextNode('');
   //oA.appendChild(oTxtA);

   // Affectation de la méthode print() au clic sur le lien
   oA.onclick = function() { window.print(); return false; }
	
   // Positionnement du lien dans la page
   var oCont = document.getElementById('print');
   if(!oCont) return;
   oCont.appendChild(oA);   
   
   var oA1 = document.createElement('span');

   var oA2 = document.createElement('a');
   oA2.setAttribute('href', '#');
   oA2.innerHTML='Imprimer';

   // Affectation de la méthode print() au clic sur le lien
   oA2.onclick = function() { window.print(); return false; }
  
   var oCont2 = document.getElementById('print2');
   if(!oCont2) return;
   oA1.appendChild(oA2);
   oCont2.appendChild(oA1);
}

function fnInsertPrint2()
{
   // Création d'un lien
   var oA = document.createElement('span');
   //oA.setAttribute('href', '#');
   oA.innerHTML='Imprimer';
 //  var oTxtA = document.createTextNode('');
   //oA.appendChild(oTxtA);

   // Affectation de la méthode print() au clic sur le lien
   oA.onclick = function() { window.print(); return false; }
	
   // Positionnement du lien dans la page
   var oCont = document.getElementById('print');
   if(!oCont) return;
   oCont.appendChild(oA);   
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}

function fnInsertPrintEn()
{
   // Création d'un lien
   var oA = document.createElement('a');
   oA.setAttribute('href', '#');
   oA.innerHTML='<img src="http://www2.cnrs.fr/sites/00-elements-communs/image/icon/imprimer.gif" alt="Print" width="19" height="19" border="0" />';
 //  var oTxtA = document.createTextNode('');
   //oA.appendChild(oTxtA);

   // Affectation de la méthode print() au clic sur le lien
   oA.onclick = function() { window.print(); return false; }
	
   // Positionnement du lien dans la page
   var oCont = document.getElementById('print');
   if(!oCont) return;
   oCont.appendChild(oA);   
   
   var oA1 = document.createElement('span');

   var oA2 = document.createElement('a');
   oA2.setAttribute('href', '#');
   oA2.innerHTML='Print';

   // Affectation de la méthode print() au clic sur le lien
   oA2.onclick = function() { window.print(); return false; }
  
   var oCont2 = document.getElementById('print2');
   if(!oCont2) return;
   oA1.appendChild(oA2);
   oCont2.appendChild(oA1);
}

function fnInsertPrintEn2()
{
   // Création d'un lien
   var oA = document.createElement('span');
   //oA.setAttribute('href', '#');
   oA.innerHTML='Print version';
 //  var oTxtA = document.createTextNode('');
   //oA.appendChild(oTxtA);

   // Affectation de la méthode print() au clic sur le lien
   oA.onclick = function() { window.print(); return false; }
	
   // Positionnement du lien dans la page
   var oCont = document.getElementById('print');
   if(!oCont) return;
   oCont.appendChild(oA);   
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}

function execImage(id_media,id_site){
window.open('/image.php?id_media='+id_media+'&id_site='+id_site,'image','width=200,height=200,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes')
}