function popup(url, width, height) {
  var params = "";
  if (width != 0 && height != 0) {
    params = "width=" + width + ",height=" + height + ",resizable=yes,scrollbars=yes";
  } else {
    params = "";
  }
  window.open(url,"popup",params);
}

function F6_popup(url, nom, statut){
  window.open(url,nom,statut);
}

//popup agrandir
function ferme(){
	document.alea.close();
	document.alea=false;
}
alea="pop";
document.alea=false;

function viewreal(URL) {
	if (!document.layers && document.alea) ferme();
//	if (document.alea) ferme();
	alea="pop"+Math.round((Math.random())*10000)+1;
	windowprops = "left=50,top=50,width=340,height=300,resizable=1,toolbar=0,scrollbars=0,status=0,menubar=0";	
	text = '<html><head><TITLE>'+URL+'</TITLE></head><body TOPMARGIN=0 LEFTMARGIN=0 BOTTOMMARGIN=0 MARGINHEIGHT=0 MARGINWIDTH=0 RIGHTMARGIN=0 BGCOLOR="#000000"><object id="video" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" width="320" height="240"><param name="SRC" value="'+URL+'"/><param name="CONTROLS" value="ImageWindow"/><param name="CONSOLE" value="one"/><param name="AUTOSTART" value="true"/><embed src="'+URL+'" width="320" height="240" nojava="false" controls="ImageWindow" console="one" autostart="true"/></object><object id="video" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" width="320" height="28"><param name="CONTROLS" value="ControlPanel"/><param name="CONSOLE" value="one"/><embed src="'+URL+'" width="350" height="36" nojava="true" controls="ControlPanel" console="one"/></object></body></html>';	
	document.alea = window.open("", alea, windowprops);
	document.alea.document.open();
	document.alea.document.write(text);
	document.alea.document.close();
}

function viewflash(URL) {
	if (!document.layers && document.alea) ferme();
//	if (document.alea) ferme();
	alea="pop"+Math.round((Math.random())*10000)+1;
	windowprops = "left=50,top=50,width=340,height=300,resizable=1,toolbar=0,scrollbars=0,status=0,menubar=0";	
	text = '<html><head><TITLE>'+URL+'</TITLE></head><body TOPMARGIN=0 LEFTMARGIN=0 BOTTOMMARGIN=0 MARGINHEIGHT=0 MARGINWIDTH=0 RIGHTMARGIN=0 BGCOLOR="#000000"><object id="videoflash" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" width="320" height="240"><param name="SRC" value="'+URL+'"/><embed src="'+URL+'" width="320" height="240" /></object></body></html>';	
	document.alea = window.open("", alea, windowprops);
	document.alea.document.open();
	document.alea.document.write(text);
	document.alea.document.close();
}

function replaceContent(URL,val){
	n="divvideo";
	//alert(val);
	//if(val==1) newcontent = '<DIV align="center"><object id="oPlayerIE" name="oPlayerIE" classid="CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA" width="320" height="240" order="1" VIEWASTEXT="VIEWASTEXT"><param name="Src" value="'+URL+'"></param><param name="AutoStart" value="true" /><param name="AutoSize" value="false" /><param name="_ExtentX" value="4230" /><param name="_ExtentY" value="529" /><param name="NOLABELS" value="0" /><param name="CONTROLS" value="ImageWindow" /><param name="CONSOLE" value="cons" /><param name="LOOP" value="false" /><param name="Center" value="true" /><param name="MAINTAINASPECT" value="false" /><param name="BACKGROUNDCOLOR" value="#000000" /><embed width="320" height="240" src="'+URL+'" name="oPlayerNetscape" center="1" type="audio/x-pn-realaudio-plugin" controls="ImageWindow" console="cons" vspace="0" hspace="0" border="0" AutoStart="true"></embed></object><object id="controls" classid="CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA" width="320" height="36"><param name="Src" value="'+URL+'"></param><param name="AutoStart" value="true"></param><param name="console" value="cons"></param><param name="controls" value="ControlPanel"></param><embed width="320" height="36" src="'+URL+'" name="oPlayerNetscape" type="audio/x-pn-realaudio-plugin" console="cons" controls="ControlPanel" AutoStart="true"></embed></object><object id="status" classid="CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA" width="320" height="20"><param name="Src" value="'+URL+'"></param><param name="AutoStart" value="true"></param><param name="console" value="cons"></param><param name="controls" value="StatusBar"></param><embed width="320" height="20" src="'+URL+'" name="oPlayerNetscape" type="audio/x-pn-realaudio-plugin" console="cons" controls="StatusBar" AutoStart="true"></embed></object></DIV>';
	//else  newcontent = '<DIV align="center"><object id="oPlayerIE" name="oPlayerIE" classid="CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA" width="192" height="144" order="1" VIEWASTEXT="VIEWASTEXT"><param name="Src" value="'+URL+'"></param><param name="AutoStart" value="true" /><param name="AutoSize" value="false" /><param name="_ExtentX" value="4230" /><param name="_ExtentY" value="529" /><param name="NOLABELS" value="0" /><param name="CONTROLS" value="ImageWindow" /><param name="CONSOLE" value="cons" /><param name="LOOP" value="false" /><param name="Center" value="true" /><param name="MAINTAINASPECT" value="false" /><param name="BACKGROUNDCOLOR" value="#000000" /><embed width="192" height="144" src="'+URL+'" name="oPlayerNetscape" center="1" type="audio/x-pn-realaudio-plugin" controls="ImageWindow" console="cons" vspace="0" hspace="0" border="0" AutoStart="true"></embed></object><br><object id="controls" classid="CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA" width="192" height="36"><param name="Src" value="'+URL+'"></param><param name="AutoStart" value="true"></param><param name="console" value="cons"></param><param name="controls" value="ControlPanel"></param><embed width="192" height="36" src="'+URL+'" name="oPlayerNetscape" type="audio/x-pn-realaudio-plugin" console="cons" controls="ControlPanel" AutoStart="true"></embed></object><br><object id="status" classid="CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA" width="192" height="20"><param name="Src" value="'+URL+'"></param><param name="AutoStart" value="true"></param><param name="console" value="cons"></param><param name="controls" value="StatusBar"></param><embed width="192" height="20" src="'+URL+'" name="oPlayerNetscape" type="audio/x-pn-realaudio-plugin" console="cons" controls="StatusBar" AutoStart="true"></embed></object></DIV>';

	if (!URL || URL == '') {
		alert('Ce flux n\'est pas disponible');
	} else {

		if(val==1) newcontent = '<DIV align="center"><table cellpadding="0" cellspacing="0" border="0"><tr><td align="center"><object hspace="0" vspace="0" width="320" height="240" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" id="video" ><param value="'+URL+'" name="SRC"/><param value="ZPlayer" name="Console"/><param value="ImageWindow" name="controls"/><param value="True" name="autostart"/><embed name="videons" nojava="false" controls="ImageWindow" console="ZPlayer" type="audio/x-pn-realaudio-plugin" autostart="True" vspace="0" hspace="0" height="240" width="320" src="'+URL+'"></embed></object></td><td rowspan="2"><img height="8" width="13" src="'+base+'/img/'+lang+'/vide.gif"/></td></tr><tr><td><img usemap="#mapctrlvideo" border="0" height="17" width="320" src="'+base+'/img/'+lang+'/btn/btn_control.gif"/></td></tr></table></DIV>';
		else  newcontent = '<DIV align="center"><table cellpadding="0" cellspacing="0" border="0"><tr><td align="center"><object hspace="0" vspace="0" width="192" height="144" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" id="video" ><param value="'+URL+'" name="SRC"/><param value="ZPlayer" name="Console"/><param value="ImageWindow" name="controls"/><param value="True" name="autostart"/><embed name="videons" nojava="false" controls="ImageWindow" console="ZPlayer" type="audio/x-pn-realaudio-plugin" autostart="True" vspace="0" hspace="0" height="144" width="192" src="'+URL+'"></embed></object></td><td rowspan="2"><img height="8" width="13" src="'+base+'/img/'+lang+'/vide.gif"/></td></tr><tr><td><img usemap="#mapctrlvideo" border="0" height="17" width="192" src="'+base+'/img/'+lang+'/btn/btn_control2.gif"/></td></tr></table></DIV>';
	
		if(document.all) eval("document.all."+n+".innerHTML='"+newcontent+"'");
		else if(document.layers) {
			eval("document."+n+".document.write('"+newcontent+"')");
			eval("document."+n+".document.close()");
		}
		else{
			var tmp=document.getElementById(n);
			tmp.innerHTML=newcontent;
		}
	}	
}

function replaceAudioContent(URL){
	n="divaudio";
	
	//alert(val);
	//if(val==1) newcontent = '<DIV align="center"><object id="oPlayerIE" name="oPlayerIE" classid="CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA" width="320" height="240" order="1" VIEWASTEXT="VIEWASTEXT"><param name="Src" value="'+URL+'"></param><param name="AutoStart" value="true" /><param name="AutoSize" value="false" /><param name="_ExtentX" value="4230" /><param name="_ExtentY" value="529" /><param name="NOLABELS" value="0" /><param name="CONTROLS" value="ImageWindow" /><param name="CONSOLE" value="cons" /><param name="LOOP" value="false" /><param name="Center" value="true" /><param name="MAINTAINASPECT" value="false" /><param name="BACKGROUNDCOLOR" value="#000000" /><embed width="320" height="240" src="'+URL+'" name="oPlayerNetscape" center="1" type="audio/x-pn-realaudio-plugin" controls="ImageWindow" console="cons" vspace="0" hspace="0" border="0" AutoStart="true"></embed></object><object id="controls" classid="CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA" width="320" height="36"><param name="Src" value="'+URL+'"></param><param name="AutoStart" value="true"></param><param name="console" value="cons"></param><param name="controls" value="ControlPanel"></param><embed width="320" height="36" src="'+URL+'" name="oPlayerNetscape" type="audio/x-pn-realaudio-plugin" console="cons" controls="ControlPanel" AutoStart="true"></embed></object><object id="status" classid="CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA" width="320" height="20"><param name="Src" value="'+URL+'"></param><param name="AutoStart" value="true"></param><param name="console" value="cons"></param><param name="controls" value="StatusBar"></param><embed width="320" height="20" src="'+URL+'" name="oPlayerNetscape" type="audio/x-pn-realaudio-plugin" console="cons" controls="StatusBar" AutoStart="true"></embed></object></DIV>';
	//else  newcontent = '<DIV align="center"><object id="oPlayerIE" name="oPlayerIE" classid="CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA" width="192" height="144" order="1" VIEWASTEXT="VIEWASTEXT"><param name="Src" value="'+URL+'"></param><param name="AutoStart" value="true" /><param name="AutoSize" value="false" /><param name="_ExtentX" value="4230" /><param name="_ExtentY" value="529" /><param name="NOLABELS" value="0" /><param name="CONTROLS" value="ImageWindow" /><param name="CONSOLE" value="cons" /><param name="LOOP" value="false" /><param name="Center" value="true" /><param name="MAINTAINASPECT" value="false" /><param name="BACKGROUNDCOLOR" value="#000000" /><embed width="192" height="144" src="'+URL+'" name="oPlayerNetscape" center="1" type="audio/x-pn-realaudio-plugin" controls="ImageWindow" console="cons" vspace="0" hspace="0" border="0" AutoStart="true"></embed></object><br><object id="controls" classid="CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA" width="192" height="36"><param name="Src" value="'+URL+'"></param><param name="AutoStart" value="true"></param><param name="console" value="cons"></param><param name="controls" value="ControlPanel"></param><embed width="192" height="36" src="'+URL+'" name="oPlayerNetscape" type="audio/x-pn-realaudio-plugin" console="cons" controls="ControlPanel" AutoStart="true"></embed></object><br><object id="status" classid="CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA" width="192" height="20"><param name="Src" value="'+URL+'"></param><param name="AutoStart" value="true"></param><param name="console" value="cons"></param><param name="controls" value="StatusBar"></param><embed width="192" height="20" src="'+URL+'" name="oPlayerNetscape" type="audio/x-pn-realaudio-plugin" console="cons" controls="StatusBar" AutoStart="true"></embed></object></DIV>';

	if (!URL || URL == '') {
		alert('Ce flux n\'est pas disponible');
	} else {

		newcontent = '<DIV align="center"><table cellpadding="0" cellspacing="0" border="0"><tr><td align="center"><object hspace="0" vspace="0" width="320" height="1" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" id="audio" ><param value="'+URL+'" name="SRC"/><param value="ZPlayer" name="Console"/><param value="ImageWindow" name="controls"/><param value="True" name="autostart"/><embed name="audions" nojava="false" controls="ImageWindow" console="ZPlayer" type="audio/x-pn-realaudio-plugin" autostart="True" vspace="0" hspace="0" height="1" width="320" src="'+URL+'"></embed></object></td><td rowspan="2"><img height="8" width="13" src="'+base+'/img/'+lang+'/vide.gif"/></td></tr><tr><td><img usemap="#mapctrlvideo" border="0" height="17" width="320" src="'+base+'/img/'+lang+'/btn/btn_control.gif"/></td></tr></table></DIV>';
		
		if(document.all) eval("document.all."+n+".innerHTML='"+newcontent+"'");
		else if(document.layers) {
			eval("document."+n+".document.write('"+newcontent+"')");
			eval("document."+n+".document.close()");
		}
		else{
			var tmp=document.getElementById(n);
			tmp.innerHTML=newcontent;
		}
	}	
}

function replaceAudioContentFlash(URL,val){
	n="divaudio";
	//alert("Debug :"+URL);
	if (!URL || URL == '') {
		alert('Ce flux n\'est pas disponible');
	} else {
		if(val==1) newcontent = '<DIV align="center"><table cellpadding="0" cellspacing="0" border="0"><tr><td align="center"><embed quality="high" quality="high" allowScriptAccess="sameDomain" pluginspage="http://www.macromedia.com/go/getflashplayer" name="videoflash" type="application/x-shockwave-flash" vspace="0" hspace="0" height="80" width="340" src="'+base+'/img/'+lang+'/mediatheque/flvplayer340x80_audio.swf" flashvars="url='+URL+'"></embed></td><td><img height="8" width="13" src="/img/'+lang+'/vide.gif"/></td></tr></table></DIV>';
		else  newcontent = '<DIV align="center"><table cellpadding="0" cellspacing="0" border="0"><tr><td align="center"><embed quality="high" quality="high" allowScriptAccess="sameDomain" pluginspage="http://www.macromedia.com/go/getflashplayer" name="videoflash" type="application/x-shockwave-flash" vspace="0" hspace="0" height="80" width="340" src="'+base+'/img/'+lang+'/mediatheque/flvplayer340x80_audio.swf" flashvars="url='+URL+'"></embed></td><td><img height="8" width="13" src="/img/'+lang+'/vide.gif"/></td></tr></table></DIV>';	
		if(document.all) eval("document.all."+n+".innerHTML='"+newcontent+"'");
		else if(document.layers) {
			eval("document."+n+".document.write('"+newcontent+"')");
			eval("document."+n+".document.close()");
		}
		else{
			var tmp=document.getElementById(n);
			tmp.innerHTML=newcontent;
		}
	}
}

function replaceContentFlash(URL,val){
	n="divvideo";
	//alert("Debug :"+URL);
	if (!URL || URL == '') {
		alert('Ce flux n\'est pas disponible');
	} else {
		if(val==1){
		 newcontent  = '<DIV align="center"><table cellpadding="0" cellspacing="0" border="0"><tr><td align="center"><embed quality="high" quality="high" ';
		 newcontent  = newcontent + 'allowScriptAccess="sameDomain" pluginspage="http://www.macromedia.com/go/getflashplayer" name="videoflash" ';
		 newcontent  = newcontent + 'type="application/x-shockwave-flash" vspace="0" hspace="0" height="310" width="340" src="'+base+'/img/'+lang+'/mediatheque/flvplayer340x310.swf" ';
		 newcontent  = newcontent + 'flashvars="url='+URL+'"></embed></td><td><img height="8" width="13" src="'+base+'/img/'+lang+'/vide.gif"/></td></tr></table></DIV>';
		 }
		else  newcontent = '<DIV align="center"><table cellpadding="0" cellspacing="0" border="0"><tr><td align="center"><embed quality="high" quality="high" allowScriptAccess="sameDomain" pluginspage="http://www.macromedia.com/go/getflashplayer" name="videoflash" type="application/x-shockwave-flash" vspace="0" hspace="0" height="310" width="340" src="'+base+'/img/'+lang+'/mediatheque/flvplayer340x310.swf" flashvars="url='+URL+'"></embed></td><td><img height="8" width="13" src="'+base+'/img/'+lang+'/vide.gif"/></td></tr></table></DIV>';	
		if(document.all) eval("document.all."+n+".innerHTML='"+newcontent+"'");
		else if(document.layers) {
			eval("document."+n+".document.write('"+newcontent+"')");
			eval("document."+n+".document.close()");
		}
		else{
			var tmp=document.getElementById(n);
			tmp.innerHTML=newcontent;
		}
	}
	
}


