// flag_obj=="style" pour manipuler les styles de l objet: exp background-color, font-color
// sinon flag_obj=="" pour manipuler les proprietes de l objet: exp size, value, name

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]);
        }
    }
}
//navigation sur les pages precente, suivante, premiere, derniere
function page_html_table(id_form,id_elmt,start_aff,url)
{
	var obj_form = capt_obj(id_form,"");
	var obj_elmt = capt_obj(id_elmt,"");
	obj_elmt.value=start_aff;
	obj_form.method="post";
	obj_form.action=url;
	obj_form.submit();
}

//------------------------------------------------------------------------
//envoi de formulaire classique avec methode post 
//------------------------------------------------------------------------
function post_form (id_form,url)
{
    var obj_form=capt_obj(id_form,"");
    obj_form.method="post";
    obj_form.action=url;
    obj_form.submit();
}
//-->

// Permet d'ouvrir la photo en plus grande taille dans une window
function aff_photo(photo)
{

var fen = window.open("fenpopup.php?nomphoto="+photo, "", "menubar=0,tollbar=0,location=0,directories=0,status=0,scrollbars=0,screenX=500,screenY=500,top=500,left=500");
//largeur=document.images[0].width;
//hauteur=document.images[0].height;
//nomphoto='./img-mairie-rions/'+nomphoto;
//window.open(nomphoto,null,'scrollbars=no,toolbar=no,width='+ largeur +',height='+ 90 );

}