//JAVASCRIPT DE GESTION DU POPUP RADIO (HAUT DEBIT - BAS DEBIT)
radioPopup = null;
var videoPopup = null;

function openRadio(debit) {
	var url = "";
switch (debit){
	case 'hd':
		url = "hd/hd.html";
		break;
	case 'bd':
		url = "bd/bd.html";
		break;
}

  var pWidth = 350;
  var pHeight= 150;
	//if (radioPopup != null) radioPopup.close();
	var params = "scrollbars=no, status=no, resizable=no, hotkeys=no, alwaysRaised=yes, z-lock=true, dependent=yes ";
	params += " , width="+ pWidth;
	params += " , height="+ pHeight;
	y = ((screen.height-pHeight)/2) +',';
	x = ((screen.width-pWidth)/2);
	params += " , left="+ x;
	params += " , top="+ y;
	radioPopup = window.open("http://www.canalacademie.com/player/"+url, "radioPopup", params);
	//radioPopup = window.open("http://homologation.canal-academie.org/player/"+url, "radioPopup", params);
	radioPopup.focus();
}

function openVideo(mavideo){
	var pWidth = 448;
	var pHeight= 282;
	var popvideo_url = "/squelettes/popvideo.php?video="+ mavideo;
	var params = "scrollbars=no, status=no, resizable=no, hotkeys=no, alwaysRaised=yes, z-lock=true, dependent=yes ";
	params += " , width="+ pWidth;
	params += " , height="+ pHeight;
	y = ((screen.height-pHeight)/2) +',';
	x = ((screen.width-pWidth)/2);
	params += " , left="+ x;
	params += " , top="+ y;
	videoPopup = window.open(popvideo_url, "videoPopup", params);
	videoPopup.focus();
	
}
