if (typeof(lapi_ad_URL) == "undefined" ){
	lapi_asx_url = url_player +'generateasx.php?media='+media+'&id_portail='+id_portail+'&id_theme='+id_theme+'&id_soustheme='+id_soustheme+'&pubtag=0';
}else{
	pub_url = racine_url_pub + '' + lapi_ad_URL;
	lapi_asx_url = url_player +'generateasx.php?pub=' + pub_url +'&media='+media+'&id_portail='+id_portail+'&id_theme='+id_theme+'&id_soustheme='+id_soustheme+'&pubtag=1';
}	

<!--document.write("<script type='text/javascript' src='http://video.videoclick.com/AC_OETags.js'></script>");  -->
switch(id_portail) {

		case '213':
			if(flash=='yes') { 
				
			document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+pl_width+'" height="'+pl_height+'" id="playerUniversel" align="middle">');
			document.write('<param name="allowFullScreen" value="true" />');
			
			document.write('<param name="movie" value="http://video.videoclick.com/videoclick_tv.swf?flashidmedia='+media+'&flashiddiffuseur='+id_portail+'" />');
			document.write('<param name="quality" value="high" />');
			document.write('<param name="wmode" value="transparent"/>');
			document.write('<embed src="http://video.videoclick.com/videoclick_tv.swf?flashidmedia='+media+'&flashiddiffuseur='+id_portail+'" quality="high" wmode="transparent" width="'+pl_width+'" height="'+pl_height+'" name="playerUniversel" align="middle" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
			document.write('</object>');
			} else {
			
				if ( (parseInt(navigator.appVersion) >= 4) && (navigator.appName.indexOf("Microsoft")!= -1) )
				{ // ie
				  document.write('<table border="0" cellspacing="0" cellpadding="0"><tr><td colspan="2">');
				  document.write('<div id="videodiv" width="'+pl_width+'" height="'+pl_height+'">');
				  document.write('  <OBJECT  id="VIDEO" width="'+pl_width+'" height="'+pl_height+'" classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" type="application/x-oleobject">');
				  document.write('    <PARAM name="url" value="'+lapi_asx_url+'">');
				  document.write('    <PARAM name="playCount" value="1">');
				  document.write('    <PARAM name="autoStart" value="1">');
				  document.write('    <PARAM name="ShowStatusBar" value="1">');
				  document.write('    <PARAM name="SendPlayStateChangeEvents" value="1">');
				  document.write('    <PARAM name="uiMode" value="none">');
				  document.write('    <PARAM name="stretchToFit" value="1">');
				  document.write('  </OBJECT>');
				  document.write(' </div>'); 
				  document.write('<!-- END OF renderVideoPlayer -->');
				  document.write('</TD></TR>');
				 document.write('</TABLE>');
				 document.write('  <!-- END OF renderVideoPlayerButtons -->');
				
				} else { // not ie			
				  document.write('<div  id="videodiv" width="'+pl_width+'" height="'+pl_width+'">');
				  document.write('  <!-- BROWSER ID IS NOT MSIE -->');
				  document.write('  <EMBED type="application/x-mplayer2"  id = "VIDEO"  name = "VIDEO"  src = "'+lapi_asx_url+'"  width = "'+pl_width+'"  height = "'+pl_height+'"  pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" autostart = "1" loop = "0"  showstatusbar = "1"  stretchToFit = "1"   showcontrols = "1" >');
				  document.write('  </EMBED>');
				  document.write(' </div>'); 
				  document.write('  <!-- END OF renderVideoPlayer -->');
				  
				}
			}
		break;

		case '999281':
		case '999283':
		case '999285':
		case '289':
		case '290':
		case '291':
		case '999292':
		case '999304':		
		case '999312':

			if(flash=='yes') { 				
			document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+pl_width+'" height="'+pl_height+'" id="playerUniversel" align="middle">');
			document.write('<param name="allowFullScreen" value="true" />');
			document.write('<param name="movie" value="http://video.videoclick.com/videoclickcom_english.swf?flashidmedia='+media+'&flashiddiffuseur='+id_portail+'" />');
			document.write('<param name="quality" value="high" />');
			document.write('<param name="wmode" value="transparent"/>');
			document.write('<param name="allowScriptAccess" value="sameDomain" />');
			document.write('<embed src="http://video.videoclick.com/videoclickcom_english.swf?flashidmedia='+media+'&flashiddiffuseur='+id_portail+'" quality="high" wmode="transparent" width="'+pl_width+'" height="'+pl_height+'" name="playerUniversel" align="middle" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
			document.write('</object>');
			} else {
			
				if ( (parseInt(navigator.appVersion) >= 4) && (navigator.appName.indexOf("Microsoft")!= -1) )
				{ // ie
				  document.write('<table border="0" cellspacing="0" cellpadding="0"><tr><td colspan="2">');
				  document.write('<div id="videodiv" width="'+pl_width+'" height="'+pl_height+'">');
				  document.write('  <OBJECT  id="VIDEO" width="'+pl_width+'" height="'+pl_height+'" classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" type="application/x-oleobject">');
				  document.write('    <PARAM name="url" value="'+lapi_asx_url+'">');
				  document.write('    <PARAM name="playCount" value="1">');
				  document.write('    <PARAM name="autoStart" value="1">');
				  document.write('    <PARAM name="ShowStatusBar" value="1">');
				  document.write('    <PARAM name="SendPlayStateChangeEvents" value="1">');
				  document.write('    <PARAM name="uiMode" value="none">');
				  document.write('    <PARAM name="stretchToFit" value="1">');
				  document.write('  </OBJECT>');
				  document.write(' </div>'); 
				  document.write('<!-- END OF renderVideoPlayer -->');
				  document.write('</TD></TR>');
				 document.write('</TABLE>');
				 document.write('  <!-- END OF renderVideoPlayerButtons -->');
				
				} else { // not ie			
				  document.write('<div  id="videodiv" width="'+pl_width+'" height="'+pl_width+'">');
				  document.write('  <!-- BROWSER ID IS NOT MSIE -->');
				  document.write('  <EMBED type="application/x-mplayer2"  id = "VIDEO"  name = "VIDEO"  src = "'+lapi_asx_url+'"  width = "'+pl_width+'"  height = "'+pl_height+'"  pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" autostart = "1" loop = "0"  showstatusbar = "1"  stretchToFit = "1"   showcontrols = "1" >');
				  document.write('  </EMBED>');
				  document.write(' </div>'); 
				  document.write('  <!-- END OF renderVideoPlayer -->');
				  
				}
			}
		break;
		
		case '999':
			document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+pl_width+'" height="'+pl_height+'" id="playerUniversel" align="middle">');
			document.write('<param name="allowFullScreen" value="true" />');
			//alert('http://video.videoclick.com/videoclick_uk.swf?flashidmedia='+media+'&flashiddiffuseur='+id_portail);
			document.write('<param name="movie" value="http://video.videoclick.com/videoclick_uk.swf?flashidmedia='+media+'&flashiddiffuseur='+id_portail+'" />');
			document.write('<param name="quality" value="high" />');
			document.write('<param name="wmode" value="transparent"/>');
			document.write('<embed src="http://video.videoclick.com/videoclick_uk.swf?flashidmedia='+media+'&flashiddiffuseur='+id_portail+'" quality="high" wmode="transparent" width="'+pl_width+'" height="'+pl_height+'" name="playerUniversel" align="middle" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
			document.write('</object>');
		break;

		case '157':
			document.write('<table border="0" cellpadding="0" cellspacing="0">');
			document.write('   <tbody>');
			document.write('     <tr>');
			document.write('       <td  valign="top">');
			var url_content = lapi_asx_url;
			var r_number = Math.random();
			document.write('<script>var r_number = '+ r_number +';\r\n var url_content = \''+ lapi_asx_url +'\';\n\r var _inbetween_html = \'</td><td  align="center" valign="top">\';</script>');
			document.write('         <div id="adc_rich_lb">');
			document.write('           <!-- BRANCHEZ-VOUS.tv/TAG --> ');
			document.write('<SCRIPT language="javascript" src="http://pubs.branchez-vous.com/adcentric/tag/'+ url_tag +'?number=' + r_number + '"></SCRIPT>'); 			
			document.write('         </div> ');
			document.write('       </td>');
			document.write('     </tr>');
			document.write('</tbody>');
			document.write('</table> ');							
		break;	
		default:
		
			if(flash=='yes') { 
				
			document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+pl_width+'" height="'+pl_height+'" id="playerUniversel" align="middle">');
			document.write('<param name="allowFullScreen" value="true" />');
			
			document.write('<param name="movie" value="http://video.videoclick.com/player.swf?flashidmedia='+media+'&flashiddiffuseur='+id_portail+'" />');
			document.write('<param name="quality" value="high" />');
			document.write('<param name="bgcolor" value="#000000" />');
			document.write('<embed src="http://video.videoclick.com/player.swf?flashidmedia='+media+'&flashiddiffuseur='+id_portail+'" quality="high" bgcolor="#000000" width="'+pl_width+'" height="'+pl_height+'" name="playerUniversel" align="middle" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
			document.write('</object>');
			} else {
			
				if ( (parseInt(navigator.appVersion) >= 4) && (navigator.appName.indexOf("Microsoft")!= -1) )
				{ // ie
				  document.write('<table border="0" cellspacing="0" cellpadding="0"><tr><td colspan="2">');
				  document.write('<div id="videodiv" width="'+pl_width+'" height="'+pl_height+'">');
				  document.write('  <OBJECT  id="VIDEO" width="'+pl_width+'" height="'+pl_height+'" classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" type="application/x-oleobject">');
				  document.write('    <PARAM name="url" value="'+lapi_asx_url+'">');
				  document.write('    <PARAM name="playCount" value="1">');
				  document.write('    <PARAM name="autoStart" value="1">');
				  document.write('    <PARAM name="ShowStatusBar" value="1">');
				  document.write('    <PARAM name="SendPlayStateChangeEvents" value="1">');
				  document.write('    <PARAM name="uiMode" value="none">');
				  document.write('    <PARAM name="stretchToFit" value="1">');
				  document.write('  </OBJECT>');
				  document.write(' </div>'); 
				  document.write('<!-- END OF renderVideoPlayer -->');
				  document.write('</TD></TR>');
				 document.write('</TABLE>');
				 document.write('  <!-- END OF renderVideoPlayerButtons -->');
				
				} else { // not ie			
				  document.write('<div  id="videodiv" width="'+pl_width+'" height="'+pl_width+'">');
				  document.write('  <!-- BROWSER ID IS NOT MSIE -->');
				  document.write('  <EMBED type="application/x-mplayer2"  id = "VIDEO"  name = "VIDEO"  src = "'+lapi_asx_url+'"  width = "'+pl_width+'"  height = "'+pl_height+'"  pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" autostart = "1" loop = "0"  showstatusbar = "1"  stretchToFit = "1"   showcontrols = "1" >');
				  document.write('  </EMBED>');
				  document.write(' </div>'); 
				  document.write('  <!-- END OF renderVideoPlayer -->');
				  
				}
			}
		break;
	
}		
