

function ShowImage(Id, Src, ClassOld, ClassNew) {
    var img = document.getElementById(Id);
    if (ClassOld) Src = Src.replace(ClassOld, ClassNew);
    img.src = Src;
}
function ShowGallery(Img) {
    var t = $('galleryTitle');
    var d = $('galleryDescription');
    var v = $('view');

    t.innerText = Img.title;
    t.style.display = t.innerText ? 'block': 'none';
    d.innerText = Img.description;
    d.style.display = d.innerText ? 'block': 'none';
    v.src = Img.src.replace('.tiny.', '.view.');
}