// JavaScript Document

// pour afficher n'importe quel swf
function displaySWF (swfname, myid, mywidth, myheight, bgcol){
	var n = document.getElementById(myid);
	var swfNode ="";
	if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { // netscape plugin architecture
		swfNode = '<embed type="application/x-shockwave-flash" src="'+swfname+'" ';
		swfNode+= 'pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"';
		swfNode+= 'width="'+mywidth+'" height="'+myheight+'" ';
		//swfNode+= 'id="playerSwf" name="playerSwf" ';
		swfNode+= 'bgcolor="#'+bgcol+'" ';
		swfNode+= 'quality="high" ';
		swfNode+= 'allowFullScreen="true" ';
		swfNode+= '/>';
	} else {  // ie
		swfNode = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
		swfNode+= 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" ';
		swfNode+= 'width="'+mywidth+'" height="'+myheight+'" >';
		swfNode+= '<param name="movie" value="'+swfname+'" />';
		swfNode+= '<param name="bgcolor" value="#'+bgcol+'" />';
		swfNode+= '<param name="quality" value="high" />';
		swfNode+= '<param name="allowFullScreen" value="true" />';
		swfNode+= '</object>';
	}
	n.innerHTML = swfNode;
}


// pour la partie admin : popup
function openNewWindow(URLtoOpen) {
	newWindow=window.open(URLtoOpen, "video", "menubar=no, status=no, scrollbars=no, width=550, height=330");
	newWindow.document.bgColor="#000000";
	newWindow.document.body.leftMargin="0";
	newWindow.document.body.topMargin="0";
	newWindow.moveTo(30,30);
	newWindow.focus();
}

// pour les popup du site
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

/*
function removeFLV(theid) {
	var msg = "Êtes-vous sûr de vouloir supprimer la vidéo db_flv/"+theid+".flv ?";
	var lien = "include/rmvflv.php?id="+theid;
	if (confirm(msg)) location.replace(lien);
}
*/

