function changeIcontext(msg){
  document.getElementById("icontext").innerHTML = msg;
  if(msg == '') {
    document.getElementById("icontext").className = "icontextnobg";
  } else {
    document.getElementById("icontext").className = "icontextbg";
  }
}

function pop_win_v(ref) {
 var largeurEcran = (screen.width - 550) / 2;
 var hauteurEcran = (screen.height - 530) / 2;
 window.open(ref, 'popup mediaserver.unige.ch video', 'height=530, width=550, top=' + hauteurEcran + ', left=' + largeurEcran + ', scrollbars=no, resizable');
}
function pop_win_a(ref) {
 var largeurEcran = (screen.width - 400) / 2;
 var hauteurEcran = (screen.height - 212) / 2;
 window.open(ref, 'popup mediaserver.unige.ch audio', 'height=212, width=400, top=' + hauteurEcran + ', left=' + largeurEcran + ', scrollbars=no, resizable');
}

function pop_win(ref){	
	var strFeatures="toolbar=no,status=no,menubar=no,location=no";
	strFeatures=strFeatures+",scrollbars=no,resizable=no,height=419,width=400";
	window.open(ref,'aide',strFeatures);
}

function myPopup (url, largeur, hauteur) {
  var x, y;
  x = (screen.width-largeur)/2; // centrage horizontal
  y = (screen.height-hauteur)/2; // centrage vertical
  popup = window.open(url,'popup','status=yes, resizable=yes, scrollbars=yes, width='+largeur+', height='+hauteur+', screenX='+x+', screenY='+y+', left='+x+', top='+y);
  popup.focus();
} 


