/**
* insertion d'un flv dans la page
* avec lecteur swf intégré
*/
function insert_flv(url, titre, image, autoplay) {
	var uid = new Date().getTime();
	html_tpl = '<div class="clear">&nbsp;</div>\n';
	html_tpl += '<div id="flv_' + uid + '" style="text-align:center;">\n';
	html_tpl += '\tPour voir la video, vous devez installer <a href="http://www.adobe.com/go/getflashplayer" target="_blank">le lecteur Flash</a>\n';
	html_tpl += '</div>\n';
	html_tpl += '<script type="text/javascript">\n';
	html_tpl += '\tvar so = new SWFObject(\'/share/mediaplayer/mediaplayer.swf\', \'mediaplayer\', \'350\', \'330\', \'8.0.15\', \'#FFFFFF\');\n';
	html_tpl += '\tso.addParam(\'menu\', \'false\');\n';
	html_tpl += '\tso.addVariable(\'file\', \'' + url + '\');\n';
	html_tpl += '\tso.addVariable(\'title\', \'' + titre + '\');\n';
	html_tpl += '\tso.addVariable(\'image\', \'' + image + '\');\n';
	html_tpl += '\tso.addVariable(\'autoplay\', \'' + autoplay + '\');\n';
	html_tpl += '\tso.addVariable(\'player_mode\', \'FULL_320\');\n';
	html_tpl += '\tso.addVariable(\'rating\', \'false\');\n';
	html_tpl += '\tso.write(\'flv_' + uid + '\');\n';
	html_tpl += '</script>\n';
	document.write (html_tpl);
}

/**
* insertion d'un mp3 dans la page
* avec lecteur swf intégré
*/
function insert_mp3(url, titre, autoplay) {
	var uid = new Date().getTime();
	html_tpl = '<div class="clear">&nbsp;</div>\n';
	html_tpl += '<div id="mp3_' + uid + '">\n';
	html_tpl += '\tPour voir le lecteur mp3, vous devez installer <a href="http://www.adobe.com/go/getflashplayer" target="_blank">le lecteur Flash</a>\n';
	html_tpl += '</div>\n';
	html_tpl += '<script type="text/javascript">\n';
	html_tpl += '\tvar so = new SWFObject(\'/share/mediaplayer/mediaplayer.swf\', \'mediaplayer\', \'350\', \'100\', \'8.0.15\', \'#FFFFFF\');\n';
	html_tpl += '\tso.addParam(\'menu\', \'false\');\n';
	html_tpl += '\tso.addVariable(\'player_mode\', \'MINIMAL_MP3\');\n';
	html_tpl += '\tso.addVariable(\'file\', \'' + url + '\');\n';
	html_tpl += '\tso.addVariable(\'title\', \'' + titre + '\');\n';
	html_tpl += '\tso.addVariable(\'autoplay\', \'' + autoplay + '\');\n';
	html_tpl += '\tso.addVariable(\'rating\', \'false\');\n';
	html_tpl += '\tso.write(\'mp3_' + uid + '\');\n';
	html_tpl += '</script>\n';
	document.write (html_tpl);
}

/**
* insertion d'une vidéo quicktime
*/
function insert_qtime(url, autoplay) {
	html_tpl = '<object id="IEQT" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="320" height="255" codebase="http://www.apple.com/qtactivex/qtplugin.cab">\n';
	html_tpl += '\t<param name="src" value="' + url + '" />\n';
	html_tpl += '\t<param name="controller" value="true" />\n';
	html_tpl += '\t<object type="video/quicktime" data="' + url + '" width="320" height="255" class="mov">\n';
	html_tpl += '\t<param name="controller" value="true" />\n';
	html_tpl += '\t<param name="autoplay" value="' + autoplay + '" />\n';
	html_tpl += '\tErreur plug incompatible.\n';
	html_tpl += '\t</object>\n';
	html_tpl += '</object>\n';
	document.write (html_tpl);
}