function drawPlayerObject( block_id, player_id, object_params, embeded_params ) {

	width = 466;
	height = 348;

	object_params = $j.extend( {
		'AutoStart' : 'true',
		'stretchToFit' : 'true',
		'uiMode' : 'mini',
		'URL' : VIDEO_STREAM_URL
	}, object_params );
	
	embeded_params = $j.extend( {
		'AutoStart' : '1',
		'stretchToFit' : '1',
		'uiMode' : 'mini',
		'src' : VIDEO_STREAM_URL
	}, embeded_params );
	
	var html = '<object id="' + player_id + '" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" width="' + width + '" height="'+ height + '">';
	
	for( var idx in object_params ) {
		html +='<param name="' + idx + '" value="' + object_params[idx] + '"/>';
	}
	
	html += '<embed type="application/x-mplayer2" width="' + width + '" height="'+ height + '" name="' + player_id + '" ';
	
	for( var idx in embeded_params ) {
		html += ' ' + idx + '="' + embeded_params[idx] + '"';
	}
	
	html += '></embed></object>';
	
	$( block_id ).innerHTML = html;

}

function hideWebcam() {
	if( $( 'webcam' ) ) {
		showPreloader( 'webcam', 1 );
	}
	return true;
}

function showWebcam() {
	if( $( 'webcam' ) ) {
		drawPlayerObject( 'webcam', 'media_player' );
	}
	return true;
}