function flashEMBED(swf, L, H, divID, retourne){
    Lswf = 420;
    Hswf = 336;
    if(L){Lswf = L;}
    if(H){Hswf = H;}
    couleur = '#FFFFFF';
    Fswf = swf;
   	if ( typeof divID == 'undefined') { divID  = ''; }

    var codeFlash = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" '
    + 'width="'+Lswf+'" height="'+Hswf+'"'
    + 'codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" id="c2lavideo_player" align="middle" />'
    + '<param name="movie" value="'+Fswf+'" />'
    + '<param name="quality" value="high" />'
    + '<param name="scale" value="noscale" />'
    + '<param name="bgcolor" value="'+couleur+'" />'
    + '<param name="allowScriptAccess" value="never" />'
    + '<param name="wmode" value="transparent">'
    + '<param name="allowNetworking" value="internal">'
    + '<embed src="'+Fswf+'" ' 
    + 'width="'+Lswf+'" height="'+Hswf+'" ' 
    + 'bgcolor="'+couleur+'" ' 
    + 'wmode="transparent" '
    + 'name="video" '
    + 'align="middle" '
    + 'allowScriptAccess="never" '
    + 'allownetworking="internal" '
    + 'quality="high" ' 
    + 'scale="noscale" ' 
    + 'type="application/x-shockwave-flash" ' 
    + 'pluginspage="http://www.macromedia.com/go/getflashplayer" /> '
    + '</object>';

    /*
    var codeFlash = '<object width="'+Lswf+'" height="'+Hswf+'">'
    + '<param name="movie" value="'+Fswf+'"></param>'
    + '<embed src="'+Fswf+'" type="application/x-shockwave-flash" width="'+Lswf+'" height="'+Hswf+'"></embed>'
    + '</object>';
    */
    if(retourne=='1'){
        return codeFlash;
        }else{
        document.getElementById("showflashEMBED"+divID).innerHTML = codeFlash;
        }
    
    // <object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/_fN8ZePRuII&hl=fr"></param><embed src="http://www.youtube.com/v/_fN8ZePRuII&hl=fr" type="application/x-shockwave-flash" width="425" height="344"></embed></object>
    // <object width="420" height="336"><param name="movie" value="http://www.dailymotion.com/swf/x5t6c4&related=0"></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><embed src="http://www.dailymotion.com/swf/x5t6c4&related=0" type="application/x-shockwave-flash" width="420" height="336" allowFullScreen="true" allowScriptAccess="always"></embed></object>
    }



























//alert();

couleurFocus            = '#FFD6C1';

// verification du formmulaire 'avis'
function check_avis(o){
        
      if ( o.lecommentaire.value == '' ) {
	      alert('Veuillez remplire le champs "commentaire"');
	      o.lecommentaire.style.background=couleurFocus;
	      o.lecommentaire.focus();
	      return false;
	      }
      if ( o.lepseudo.value == '' ) {
	      alert('Veuillez remplire le champs "pseudo"');
	      o.lepseudo.style.background=couleurFocus;
	      o.lepseudo.focus();
	      return false;
	      }
      document.getElementById("butform").disabled = true;
	}

// [FONCTION] verifMail v2
function verifMail(a) {
	testm =	false ;
	
	// on donne les caracteres autorisés
      testchaine = 'ok';
      chaine = a;
      var alphabet     = 'a-z';     // alphabet
      var chiffre      = '0-9';     // chiffre
      var trait        = '\\-';     // trait d'union
      var underscore   = '\\_';     // underscore
      var caract_ok    = '['+alphabet+chiffre+trait+underscore+'@\.]';
      // on test les caractere valides
      jeTest = a;
      for (var j=0 ; j<(jeTest.length) ; j++) {
            var mon_exp = new RegExp (caract_ok, 'gi');
            var x = mon_exp.test(jeTest.charAt(j));
            var lepasbon = jeTest.charAt(j);
            if (lepasbon==' '){lepasbon = 'ESPACE';}
            if ( x == false ) {
            	alert('Le caractère \''+ lepasbon +'\' n\'est pas valide dans une adresse Email');
            	testchaine = 'ko';
                  return false;
            	}
            }
      // on regarde la coherence de la structure du mail
	for (var j=1 ; j<(a.length) ; j++) {
            if (a.charAt(j)=='@') {
			if (j<(a.length-4)){
				for (var k=j ; k<(a.length-2) ;	k++) {
					if (a.charAt(k)=='.') testm = true;
						}
				}
			}
		}
	if (testm==false) { alert('adresse e-mail incorrecte.');return false}
	else { return true; }
	
		// ELSE	facultatif ; la	fonction retournant testm, la suite du traitement du formulaire	peut donc avoir	lieu
	return testm ; 
	}

function check_recovideo(o){
      //alert('yes');
     	couleurFocus = '#FFD8BA';
        
      if ( o.prenom.value == '' || o.prenom.value == defaultvalue_prenom) {
	      alert('Veuillez saisir votre "prénom"');
	      o.prenom.style.background=couleurFocus;
	      o.prenom.focus();
	      return false;
	      }
      verifMail(o.email.value);
      if (testm==false) { 
      	o.email.style.background=couleurFocus;
      	o.email.focus();
      	return false;
      	}
      if ( o.email.value == defaultvalue_email ) {
	      alert('Veuillez saisir l\'Email de votre destinataire');
	      o.email.style.background=couleurFocus;
	      o.email.focus();
	      return false;
	      }
      if ( o.page.value == '' ) {
	      alert('Erreur');
	      return false;
	      }
      }

// efface champs 1.1
// onFocus="effaceChamps(this.form.name,this.name,'mots clés');
function effaceChamps (o,s,textToErase) {
	if (textToErase == document.forms[o].elements[s].value){ document.forms[o].elements[s].value="" }
	}

// [FONCTION] tof v4
// popUp dynamique image
function tof(monImage){

    // cherche XP pr agrandir les popUp
    var chercheXP 	= new RegExp("Windows NT 5.1","gi");
    cestXP	= chercheXP.test(navigator.appVersion);

    var AddXPH = 0;
    if (cestXP==true){AddXPH = 25;}
    Lwindow = 700;
    Hwindow = 500;
	posX = (((screen.width)-Lwindow)/2);
	posY = (((screen.height)-Hwindow)/2);
    
	w = window.open('','chargement','width='+Lwindow+',height='+Hwindow+',scrollbars=1,status=no,top='+posY+',left='+posX);
	w.document.write( "<html><head><title>Photo</title>\n" );
	w.document.write( "<script language='JavaScript'>\n");
	w.document.write( "IE5=NN4=NN6=false;\n");
	w.document.write( "if(document.all)IE5=true;\n");
	w.document.write( "else if(document.getElementById)NN6=true;\n");
	w.document.write( "else if(document.layers)NN4=true;\n");
	w.document.write( "function autoSize() {\n");
	w.document.write( "LI = document.images[0].width; HI = document.images[0].height;\n");     // Image
	w.document.write( "LS = screen.width; HS = screen.height;\n");                             // Screen
	w.document.write( "LF = LI; HF = HI+50;\n");                                                  // Fenetre (si on ajoute pas de la hauteur, l'image est coupe)
	w.document.write( "moveToX = ((LS-LF)/2); moveToY = ((HS-HF)/2);\n");                        // Position Fenetre
	w.document.write( "if (LI>=LS){LF=LS-10;moveToX=0;}\n");
	w.document.write( "if (HI>=HS){HF=HS-30;moveToY=0;}\n");
	w.document.write( "self.moveTo(moveToX,moveToY);\n");  // on deplace avant de redimentionner sinon Pb
	w.document.write( "if(IE5) self.resizeTo(LF+10, HF+"+AddXPH+" );\n");
	w.document.write( "else window.resizeTo(LF, HF+15+"+ AddXPH+" );\n");
	w.document.write( "self.focus();\n");
	w.document.write( "document.getElementById('photo').style.display = 'none';\n");
	w.document.write( "if (moveToX!=0 && moveToY!=0) {document.body.style.overflow='hidden';}\n");
	w.document.write( "" );
	w.document.write( "}\n</scri");
	w.document.write( "pt>\n");
    w.document.write( "<meta http-equiv='imagetoolbar' content='no'>\n");
	w.document.write( "</head><body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 onLoad='javascript:autoSize();'>" );
	w.document.write( "<div id=photo style='position:absolute;top:0;left:0;z-index:10;width:"+Lwindow+";text-align:center;background-color:#FF6600;color:#000000;font-weight:bold;'><br>Chargement...<br><br></div>" );
	w.document.write( "<a href='javascript:window.close();'><img src='"+monImage+"' border=0 alt='Cliquez pour FERMER'></a>");
	w.document.write( "</body></html>" );
	w.document.close();
	}


// [FONCTION] c2lazik_player v2.1
function c2lazik_player(zik, swf, L, H, divID, couleur){
    
    Lswf = 160;
    Hswf = 16;
    if(L){Lswf = L;}
    if(H){Hswf = H;}
    //couleur = "#FFFFFF";
    if(swf){SWFFILE = swf;}else{SWFFILE = 'c2lazik_player';}
    Fswf = SWFFILE+'.swf?son='+zik;
   	if ( typeof divID == 'undefined') { divID  = ''; }
   	if ( typeof couleur == 'undefined') { couleur  = ''; }

    var codeFlash = '<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" '
    + 'WIDTH="'+Lswf+'" HEIGHT="'+Hswf+'"'
    + 'CODEBASE="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" id="c2lazik_player" align="middle" />'
    + '<PARAM NAME="MOVIE" VALUE="'+Fswf+'" />'
    + '<PARAM NAME="QUALITY" VALUE="high" />'
    + (couleur==''?'<PARAM NAME="WMODE" VALUE="transparent"> ':'')
    //+ '<PARAM NAME="MENU" VALUE="false" />'
    + '<PARAM NAME="SCALE" VALUE="noscale" />'
    + '<PARAM NAME="BGCOLOR" VALUE="'+couleur+'" />'
    + '<PARAM NAME="allowScriptAccess" VALUE="sameDomain" />'
    + '<EMBED SRC="'+Fswf+'" ' 
    + 'WIDTH="'+Lswf+'" HEIGHT="'+Hswf+'" ' 
    + 'bgcolor="'+couleur+'" ' 
    + 'name="video" '
    + 'align="middle" '
    + 'allowScriptAccess="sameDomain" '
    + 'QUALITY="high" ' 
    + (couleur==''?'WMODE="transparent" ':'')
    + 'SCALE="noscale" ' 
    //+ 'MENU="false" ' 
    + 'TYPE="application/x-shockwave-flash" ' 
    + 'PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" /> '
    //+ '</EMBED>'
    + '</OBJECT>';
    document.getElementById("c2lazikplayer"+divID).innerHTML = codeFlash;
    }


