//  switchImg
//-----------------------------------------------------------------------------
/// <summary>
/// remplace l'image contenue dans <paramref name="img_id" /> par l'image <paramref name="obj" />
/// </summary>
/// <param name="obj">objet appelant (vignette <img)</param>
/// <param name="obj">id de l'image</param>
/// <param name="array_imgdetails">tableau des caractéristiques sur les images</param>
function switchImg(obj, img_id, array_imgdetails)
{
    if (obj.src == null)
    { return; }
    var File_Name;
    if (obj.src.lastIndexOf("/") == -1)
    { File_Name = obj.src; }
    else
    { File_Name = obj.src.substring(obj.src.lastIndexOf("/") + 1, obj.src.length); }
    if (array_imgdetails[File_Name] == null)
    { return; }
    document.getElementById(img_id).src = obj.src;
    document.getElementById(img_id).height = array_imgdetails[File_Name]['height'];
    document.getElementById(img_id).width = array_imgdetails[File_Name]['width'];
}

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

