<!--
sfHover = function() {
    if (document.getElementById("menu")) {
        var ellt = document.getElementById("menu").getElementsByTagName("li");
        for (var i=0; i<ellt.length; i++) {
            ellt[i].onmouseover=function() {
                this.className+=" sfhover";
            }
            ellt[i].onmouseout=function() {
                this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
            }
        }
    }
}
if (window.attachEvent) {
    window.attachEvent("onload", sfHover);
}

function fixPNG(myImage) 
{
    if ((version >= 5.5) && (version < 7) && (document.body.filters)) 
    {
       var imgID = (myImage.id) ? "id='" + myImage.id + "' " : ""
	   var imgClass = (myImage.className) ? "class='" + myImage.className + "' " : ""
	   var imgTitle = (myImage.title) ? 
		             "title='" + myImage.title  + "' " : "title='" + myImage.alt + "' "
	   var imgStyle = "display:inline-block;" + myImage.style.cssText
	   var strNewHTML = "<span " + imgID + imgClass + imgTitle
                  + " style=\"" + "width:" + myImage.width 
                  + "px; height:" + myImage.height 
                  + "px;" + imgStyle + ";"
                  + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
                  + "(src=\'" + myImage.src + "\', sizingMethod='scale');\"></span>"
	   myImage.outerHTML = strNewHTML	  
    }
}

// champs obligatoires
function checkrequiredfields() 
{
  for(i=0; i < checkrequiredfields.arguments.length; i++) 
  {
    if (document.main.elements[checkrequiredfields.arguments[i]].value == "") 
    {
      alert("Champs obligatoire ");
      document.main.elements[checkrequiredfields.arguments[i]].focus()           
      return false;
    }
  }
  return true;
}

// champs obligatoires
function checkrequiredfieldsname() 
{
  for(i=0; i < checkrequiredfieldsname.arguments.length; i++) 
  {
    if (document.inscription.elements[checkrequiredfieldsname.arguments[i]].value == "") 
    {
      alert("Champs obligatoire ");
      document.inscription.elements[checkrequiredfieldsname.arguments[i]].focus()           
      return false;
    }
  }
  return true;
}

function record_news(p_action) 
{
  document.main.p_action.value = p_action;
  document.main.submit();
}

function send(p_inscription) 
{
  if (checkrequiredfieldsname("form_log", "form_pass", "form_nom", "form_prenom", "form_adresse", "form_cp", "form_ville", "form_pays", "form_email", "form_tel")) 
  {
    document.inscription.p_inscription.value = p_inscription;    
    document.inscription.submit();  
  }  
}

function act(p_act) 
{
  document.inscription.act.value = p_act;    
	document.inscription.submit();   
}

function nouveau_compte(p_inscription) 
{
  if (checkrequiredfieldsname("form_login", "form_password", "form_nom", "form_prenom", "form_adresse", "form_cp", "form_ville", "form_pays", "form_email", "form_tel")) 
  {    
    var re = /^[A-Za-z0-9\._%-]+@[A-Za-z0-9\._%-]+\.[A-Za-z]{2,6}$/;
    if(document.inscription.form_email.value.match(re)) 
    { 
      document.inscription.p_inscription.value = p_inscription;    
      document.inscription.submit();  
    }
    else
        alert("Votre adresse e-mail n'est pas valide");
  }  
}

function send_message(send_message) 
{
  if (checkrequiredfieldsname("form_nom", "form_prenom", "form_nom", "form_objet", "form_mess")) 
  {
    document.inscription.send_message.value = send_message;    
    document.inscription.submit();  
  }  
}

function send_pass(send_pass) 
{
  if (checkrequiredfieldsname("form_email")) 
  {
    document.inscription.send_pass.value = send_pass;    
    document.inscription.submit();  
  }  
}

function change_adresse(p_adresse) 
{
  document.inscription.p_adresse.value = p_adresse;    
  document.inscription.submit();  
}

function change_type_adresse(type_adresse) 
{
  document.inscription.type_adresse.value = type_adresse;    
  document.inscription.submit();  
}

function getSwf9(id, src, width, height, color) {
    document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="' + width + '" height="' + height + '" id="' + id + '" align="middle">\n');
    document.write('<param name="allowScriptAccess" value="sameDomain" />\n');
    document.write('<param name="allowFullScreen" value="false" />\n');    
    document.write('<param name="movie" value="' + src + '" />\n');
    document.write('<param name="quality" value="high" />\n');
    document.write('<param name="scale" value="noscale" />\n');    
    document.write('<param name="bgcolor" value="' + color + '" />\n');
    document.write('<embed src="' + src + '" quality="high" bgcolor="' + color + '" width="' + width + '" height="' + height + '" name="' + id + '" align="middle" scale="noscale" allowFullScreen="false" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n');
    document.write('</object>\n');
}

//-->
