/*
Gestion des clip video
*/
function video(nb) {
	document.getElementById("cadre"+document.numVideo).style.visibility = "hidden";
	document.numVideo = nb;
	document.getElementById("cadre"+nb).style.visibility = "visible";
	document.getElementById("video").innerHTML = writeSwf(chemin+nb+".swf", largeur, hauteur);
}


/* 
Generation du code pour l'affichage des swf
*/
function writeSwf(swf, l, h) {
	code = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="'+l+'" height="'+h+'">';
	code += '<param name="movie" value="'+swf+'">';
	code += '<param name="quality" value="high">';
	code += '<embed src="'+swf+'" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="'+l+'" height="'+h+'"></embed>';
	code += '</object>';
	return code;
}


/*
Gestion des clip video + textes pour producteurs
*/
function videoProd(nb) {
	video(nb);
	document.getElementById("texte"+document.numTexte).style.display = "none";
	document.getElementById("legende"+document.numTexte).style.display = "none";
	document.numTexte = nb;
	document.getElementById("texte"+document.numTexte).style.display = "block";
	document.getElementById("legende"+document.numTexte).style.display = "block";
}

/* FCT JUNE22 */
//Default browsercheck, added to all scripts!
function checkBrowser(){
	this.ver=navigator.appVersion
	this.dom=document.getElementById?1:0
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
	this.ie4=(document.all && !this.dom)?1:0;
	this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5)
	return this
}
bw=new checkBrowser()
//With nested layers for netscape, this function hides the layer if it's visible and visa versa
	 
/* showHide */
function showHideOld(div,nest){
	obj=bw.dom?document.getElementById(div).style:bw.ie4?document.all[div].style:bw.ns4?nest?document[nest].document[div]:document[div]:0;
	if(obj.visibility=='visible' || obj.visibility=='show') obj.visibility='hidden'
	else obj.visibility='visible'
}
function showHide(div,nest){
	obj=bw.dom?document.getElementById(div).style:bw.ie4?document.all[div].style:bw.ns4?nest?document[nest].document[div]:document[div]:0;
	if(obj.display=='block' || obj.display=='show') obj.display='none'
	else obj.display='block'
}

