	



function clearMediaSpace(){
	playercode='';
	fotocode='';
	document.getElementById('mediaspace').innerHTML = '';
	document.getElementById('mediaspace').style.display = '';
}





function printSmallPlayerCode(url){
	
	try{ window.status ='loaded media from: ' + completeUrl; }catch(errorObject){};

	if (player=="wmp"){	
		playercode='';
		playercode += '<OBJECT ID="MediaPlayer" width="200" height="65" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">';
		playercode += '	<PARAM NAME="url"          		VALUE="'+completeUrl+url+'">';
		playercode += '	<PARAM NAME="AutoStart"         	Value="true">';
		playercode += '	<PARAM NAME="Name"         	Value="MediaPlayer">';
		playercode += '	<PARAM NAME="Id"         	Value="MediaPlayer">';
		playercode += '	<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" clsid="{6BF52A52-394A-11d3-B153-00C04F79FAA6}"';
		playercode += '	  src="'+completeUrl+url+'"';
		playercode += '	  Name="MediaPlayer"';
		playercode += '	  width="200"';
		playercode += '   height="65"'; 
		playercode += '	  autostart="true"';
		playercode += '	  >';
		playercode += '	</OBJECT>';
	
	}else if (player=="qt"){
		
		playercode='';
    	qtnext_splitstring = location.href.split('?');
    	qtnext_string = qtnext_splitstring[0];

		playercode += '<OBJECT classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" ';
		playercode += '	codebase="" ';
		playercode += '	        width="200" height="65" ';
		playercode += '        id="MediaPlayer" > ';
		playercode += '        <PARAM name="src" value="'+completeUrl+url+'"> ';
		playercode += '        <PARAM name="scale" value="aspect"> ';
		playercode += '        <PARAM name="TARGET1" value="_self"> ';
		playercode += '        <PARAM name="enablejavascript" value="true"> ';
		playercode += '		   <PARAM name="bgcolor" value="000000">';		
		playercode += '        <PARAM name="pluginspage" value="http://www.apple.com/quicktime/download/"> ';	
		playercode += '        <PARAM name="type" value="video/quicktime"> ';	
		
		playercode += '	<embed src="'+completeUrl+url+'" ';
		playercode += '	width="200" ';
		playercode += '	height="65" ';
		playercode += '	border="0" ';
		playercode += '	scale="aspect"';
		playercode += '	controller="true" ';
		playercode += '	bgcolor="000000" ';
		playercode += '	autoplay="true"';
		playercode += '	name="MediaPlayer"';
		playercode += '	id="MediaPlayer"';
		playercode += '	target1="_self"';
		playercode += '	enablejavascript="true" type="video/quicktime"';
		playercode += '	pluginspage="http://www.apple.com/quicktime/download/"';
		playercode += '>';
		playercode += ' </OBJECT>'; 
	}
		
}	



function printPlayerCode(url){

	var videoHost='http://video.vrtnieuws.net';
	var siteHost='http://www.vrtnieuws.net';

	var curUrl=location.href;
        var completeUrl = '';
	
	if (curUrl.indexOf('webprod') > 0){
		siteHost='http://vrtnieuws2-webprod.vrt.be';
	}

	if(curUrl.indexOf('http://www.vrtnieuws.be')!=-1){
		siteHost = 'http://www.vrtnieuws.be';
	}
	
	if(curUrl.indexOf('http://vrtnieuws.be')!=-1){
		siteHost = 'http://vrtnieuws.be';
	}

	if(curUrl.indexOf('http://vrtnieuws.net')!=-1){
		siteHost = 'http://vrtnieuws.net';
	}

	siteHostl=siteHost.length;


	if((url.indexOf('streampower') == -1) && (url.indexOf('194.78.112.2') == -1)){
		completeUrl= videoHost + curUrl.substring(siteHostl, curUrl.lastIndexOf('/')) + '/';
	}
	
	
	
	
	try{ window.status ='loaded media from: ' + completeUrl; }catch(errorObject){};

	

	var height;
	var strDebugInfo = '<u>Debuginfo printPlayerCode</u><br/><br/>';
	strDebugInfo += 'player = ' + player + '<br/>';
	if (player=="wmp"){	
		if(content_type == 'video'){
			height = 224;
		}else{
			height = 1;
		}
		playercode='';
		playercode += '<OBJECT ID="MediaPlayer" width="384" height="' + height + '" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">';
		playercode += '	<PARAM NAME="url"          		VALUE="'+completeUrl+url+'">';
		playercode += '	<PARAM NAME="uiMode" 				Value="none">';
		playercode += '	<PARAM NAME="AutoStart"         	Value="true">';
		playercode += '	<PARAM NAME="ShowControls"         	Value="0">';
		playercode += '	<PARAM NAME="Name"         	Value="MediaPlayer">';
		playercode += '	<PARAM NAME="Id"         	Value="MediaPlayer">';
		playercode += '	<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" clsid="{6BF52A52-394A-11d3-B153-00C04F79FAA6}"';
		playercode += '	  src="'+completeUrl+url+'"';
		playercode += '	  Name="MediaPlayer"';
		playercode += '	  width="384"';
		playercode += '   height="' + height + '"'; 
		playercode += '	  uiMode="none" showControls="0"';
		playercode += '	  autostart="true"';
		playercode += '	  >';
		playercode += '	</OBJECT><br/><img src="' + imagesFolder + 'wm_stop.gif" OnClick="try{ document.MediaPlayer.Stop()}catch(errorObject){ try{document.MediaPlayer.controls.stop()}catch(errorObject){ try{document.getElementById(\'MediaPlayer\').Stop()}catch(errorObject){ try{document.getElementById(\'MediaPlayer\').controls.stop()}catch(errorObject){ location.reload();} } } } " alt="fragment stoppen"  align="top">';
	
		if ((  navigator.userAgent.indexOf('Netscape') >= 0) ||  ( navigator.userAgent.indexOf('Gecko') >= 0) || (navigator.userAgent.indexOf("Firefox") > 0)||(navigator.userAgent.indexOf("Mac") > 0)){ 
			playercode += '<img src="' + imagesFolder + 'wm_controlbar.gif" width="368" height="16" alt="fragment stoppen" align="top">';	
		}else{
			playercode += '<img src="' + imagesFolder + 'wm_play.gif" OnClick="try{document.MediaPlayer.Play()}catch(errorObject){document.MediaPlayer.controls.play()}"  alt="fragment afspelen"  align="top">';
			playercode += '<img src="' + imagesFolder + 'wm_pause.gif" OnClick="try{document.MediaPlayer.Pause()}catch(errorObject){document.MediaPlayer.controls.pause()}"  alt="fragment pauzeren"  align="top">';
			playercode += '<img src="' + imagesFolder + 'wm_controlbar.gif">';
		}
	
	}else if (player=="qt"){
		if(content_type == 'video'){
			height = 240;
		}else{
			height = 17;
		}
		playercode='';
    	qtnext_splitstring = location.href.split('?');
    	qtnext_string = qtnext_splitstring[0];

		playercode += '<OBJECT classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" ';
		playercode += '	codebase="" ';
		playercode += '	        width="384" height="'+ height +'" ';
		playercode += '        id="MediaPlayer" > ';
		playercode += '        <PARAM name="src" value="'+completeUrl+url+'"> ';
		playercode += '        <PARAM name="scale" value="aspect"> ';
		playercode += '        <PARAM name="QTNEXT1" value="' + qtnext_string + '"> ';
		playercode += '        <PARAM name="TARGET1" value="_self"> ';
		playercode += '        <PARAM name="enablejavascript" value="true"> ';
		playercode += '		   <PARAM name="bgcolor" value="000000">';		
		playercode += '        <PARAM name="pluginspage" value="http://www.apple.com/quicktime/download/"> ';	
		playercode += '        <PARAM name="type" value="video/quicktime"> ';	
		
		playercode += '	<embed src="'+completeUrl+url+'" ';
		playercode += '	width="384" ';
		playercode += '	height="'+ height + '" ';
		playercode += '	border="0" ';
		playercode += '	scale="aspect"';
		playercode += '	controller="true" ';
		playercode += '	bgcolor="000000" ';
		playercode += '	autoplay="true"';
		playercode += '	name="MediaPlayer"';
		playercode += '	id="MediaPlayer"';
		playercode += '	qnext1="' + qtnext_string + '"';
		playercode += '	target1="_self"';
		playercode += '	enablejavascript="true" type="video/quicktime"';
		playercode += '	pluginspage="http://www.apple.com/quicktime/download/"';
		playercode += '>';
		playercode += ' </OBJECT>'; 
	}
	strDebugInfo += 'playercode = ' + playercode + '<br/>';
	writeDebugInfo(strDebugInfo);
		
/*	playercode += '<table cellspacing="0" cellpadding="0" width="384" class="mmmeta">';
	playercode += '<tr><td><img src="' + imagesFolder + 'spacer.gif" width="4" height="10"></td><td width="380" valign="top" align="right" class="fotobron">' + rights + '</td>';
	playercode += '<tr><td><img src="' + imagesFolder + 'spacer.gif" width="4" height="4"></td><td width="380" valign="top" class="fototext">' + text + '</td></tr></table>'; */
}	




