// ##### ANIMATION FLASH #####
function CreateFlash(id, chemin, width, height, vars){
    //id : id de l'element dans lequel on va ecrire le flash
    var d = document.getElementById(id);
    var flash = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="' + width + '" height="' + height + '">' +
    '<param name="movie" value="' + chemin + '" />' +
    '<param name="quality" value="high" />' +
	'<param name="wmode" value="transparent" />' +
    '<param name="flashvars" value="' + vars + '">' +
    '<embed src="' + chemin + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" flashvars="' + vars + '" width="' + width + '" height="' + height + '"></embed></object>'

    d.innerHTML = flash
}

// ##### VERIFICATION FORMULAIRES #####
var _nom, _prenom, _mail, _tel

function VerifForm(){
	if(!VerifChamps(document.getElementById("ctl00_ContentPlaceHolder1_nom"))){_nom = false} else{_nom = true}
	if(!VerifChamps(document.getElementById("ctl00_ContentPlaceHolder1_prenom"))){_prenom = false} else{_prenom = true}
	if(!VerifChamps(document.getElementById("ctl00_ContentPlaceHolder1_tel"))){_tel = false} else{_tel = true}
	if(!VerifMail(document.getElementById("ctl00_ContentPlaceHolder1_email"))){_mail = false} else{_mail = true}
	
	if( _nom==false || _prenom==false || _mail==false || _tel==false){return false}
	return true
}

function VerifChamps(c){
	if (!c.value){
		c.className = 'champcontacterreur'; return false}
	else{
		c.className = 'champcontact'; return true}
}

function VerifMail(c){
c.value = c.value.toLowerCase() ;
	if (!c.value){
		c.className = 'champcontacterreur'; return false}
	else if(c.value.search(/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9]+)*$/) == -1){
		c.className = 'champcontacterreur'; return false}
	else{
		c.className = 'champcontact'; return true}
}

function FocusChamps(c){
		c.className = 'champfocus';
}
function BlurChamps(c){
		c.className = 'champcontact';
}
function jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
