function popup(nom){
var nom = nom.split('/');
nom[nom.length-1] = nom[nom.length-1].substring(6);
nom = nom.join('/')
window.open('popup.html?'+nom, 'ediflor', 'left=0,top=0,width=1,height=1,toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=0,scrollbars=0');
}
function swap(nom, inc){
	document.getElementsByName(nom)[0].onmouseover = '';
    setTimeout('swap2(\'' + nom + '\', ' + inc + ', \'\')', 1000);
}
function swap2(nom, inc, taille){
  var obj = document.getElementsByName(nom)[0];
  var height_old = obj.height;
  if(taille == ''){
    taille = obj.width;
  }
  var tmp = obj.width - inc;
  if (tmp > 1){
	  obj.width = tmp;
  } else {
	  obj.width = 1;
  }
  if (obj.width == 1){
    var tmp = obj.getAttribute('src');
    obj.setAttribute('src', obj.getAttribute('src2'));
    obj.setAttribute('src2', tmp);
    inc = -inc;
  } else if (obj.width > taille){
	obj.width = taille;
  }
  obj.height = height_old;
  if (obj.width < taille){
    setTimeout('swap2(\'' + nom + '\', ' + inc +', ' + taille + ')', 1);
  } else {
  	if (obj.getAttribute('onClick') != null){
	    obj.onmouseover = function(){ this.style.cursor='pointer'; swap(nom , -inc); }
	} else {
	    obj.onmouseover = function(){ swap(nom, -inc); }
	}
	if (obj.parentNode.lastChild.lastChild.nodeValue == 'Recto'){
	    obj.parentNode.lastChild.lastChild.nodeValue = 'Verso';
	} else {
	    obj.parentNode.lastChild.lastChild.nodeValue = 'Recto';
	}
  }
}