//##############################################################
//une fonction qui g�e l'envoi de courrier 
//##############################################################
function nous_ecrire ( arg1,arg2 )
{
	var envoi=new String(arg1+'%40'+arg2);
	envoi='mailto:'+envoi;
	document.location.href=envoi;
}
//####################################################
//envoi de formulaire classique avec methode post
//#################################################### 
function post_form (id_form,url)
{
	var obj_form=capt_obj(id_form,'prop');
	obj_form.method="POST";
	obj_form.action=url;
	obj_form.submit();
}
//####################################################
//changement d'image sur le survol d'une image
//####################################################
function change_img (id_img,src_img)
{
	imglien=capt_obj(id_img,'prop');
	imglien.src=src_img;
}

//-------------------------
//Teste validite e-mail
//-------------------------
function valMail(email)
{
  var posArobase;
  posArobase = email.indexOf("@");
  if (posArobase == -1) return false; //pas @ saisi
  var posPoint;
  posPoint = email.lastIndexOf(".");
  if ((posPoint == -1) || (posPoint < posArobase)) return false;
  return true;
}
function capt_obj(id_obj,flag_obj)
{
    if (document.getElementById)
    {
        //mozilla(linux),konqueror,opera(linux) 
        if (flag_obj=="style")
            return (document.getElementById(id_obj).style);
        else
            return (document.getElementById(id_obj));   
    }   
    else
    {
        if (document.all)
        {
            //ie
            if (flag_obj=="style")
                return (document.all[id_obj].style);
            else
                return (document.all[id_obj]);
        }
    }
}
function infos_plus (id_img,id_div,url_img,flag_div)
{
    //gestion de l'image
    if (id_img!='') 
	{
		var obj_img = capt_obj(id_img,'prop');
    	obj_img.src = url_img;
    }
    //gestion du div
	if(id_div!='')
	{
		var obj_div=capt_obj(id_div,'style');
		if (flag_div==1)
		{
			obj_div.display='inline';
		}
		else obj_div.display='none';
	}
}
