// fonction permettant ecrire flash
function flash_object(url,anim,width,height,button){
	
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+width+'" height="'+height+'">')
	document.write('<param name="movie" value="'+url+'flash/'+anim+'.swf?url='+url+'&button='+button+'&link='+button+'">')
	document.write('<param name="quality" value="high">')
	document.write('<param name="wmode" value="transparent">')
	document.write('<embed src="'+url+'flash/'+anim+'.swf?url='+url+'&button='+button+'&link='+button+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'" wmode="transparent">')
	document.write('</embed></object>')
}

// fonction permettant ecrire flash en centrer milieu
function flash_object1(url,anim,width,height,button){
	
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+width+'" height="'+height+'"  valign="center">')
	document.write('<param name="movie" value="'+url+'flash/'+anim+'.swf?url='+url+'&button='+button+'&link='+button+'">')
	document.write('<param name="quality" value="high">')
	document.write('<param name="wmode" value="transparent">')
	document.write('<embed src="'+url+'flash/'+anim+'.swf?url='+url+'&button='+button+'&link='+button+'" valign="center" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'" wmode="transparent">')
	document.write('</embed></object>')
}

// popup simple => 1 ou 0 pr le scroll
function popup(page, nom, largeur, hauteur, scrol) {
  window.open(page, ""+nom+"", "scrollbars="+ scrol +",menubar=no,toolbar=no,resizable=yes,width="+ largeur + ",height=" + hauteur);
}
// changement de couleur au survol des lignes
function change_color_ligne(id,defaut,txt){
	document.getElementById(id).style.backgroundColor=defaut;
	// si on mouseover col=#FF8000 sinon col=#000000
	var col = (txt) ? "#000000" : "#494949";	
	// on change la couleur de la police pr les 5 <td>
	document.getElementById(id+'1').style.color=col;
	document.getElementById(id+'2').style.color=col;
	document.getElementById(id+'3').style.color=col;
	document.getElementById(id+'4').style.color=col;
	document.getElementById(id+'5').style.color=col;
}

// fonction ajout aux favoris et marque-page  
function bookmarksite(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}

/*************** paires pour les formulaires ********************/

// remet la couleur dans l'input 
function couleur(obj) {
     obj.style.backgroundColor = "#FFFFFF";
}
// regarde si les champs sont vides
function check() {
	var msg = "";
	var color = "#FFFF99";
if (document.form_paiement.nature.value == "")   {
      msg += "Veuillez choisir la nature du paiement\n";
      document.form_paiement.nature.style.backgroundColor = color;
   }
if (document.form_paiement.montant.value == "")   {
      msg += "Veuillez saisir un montant\n";
      document.form_paiement.montant.style.backgroundColor = color;
   }
if (document.form_paiement.reference.value == "")   {
      msg += "Veuillez saisir une r&eacute;f&eacute;rence du dossier\n";
      document.form_paiement.reference.style.backgroundColor = color;
   }
if (document.form_paiement.nom.value == "")   {
      msg += "Veuillez saisir votre nom\n";
      document.form_paiement.nom.style.backgroundColor = color;
   }
if (document.form_paiement.ville.value == "")   {
      msg += "Veuillez saisir la ville du siège social\n";
      document.form_paiement.ville.style.backgroundColor = color;
   }
if (msg == "") return(true);
   else   {
      alert(msg);
      return(false);
   }
}

/* ouverture pop up conseiller a un  ami */
// popup centre
function popupcentre(page,largeur,hauteur,scrol) {
  var top=(screen.height-hauteur)/2;
  var left=(screen.width-largeur)/2;
  window.open(page,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+",menubar=no,toolbar=no,resizable=yes,scrollbars="+ scrol);
}


/**************************/

