var oldThumbID = -1;
function changeThumbnail(id, width, height, title, size) {
    _el('hlpStr').style.visibility = 'hidden';

    /*
    if (oldThumbID!=-1) {
        _el('td'+oldThumbID).className = '';
    }
    */
    oldThumbID = id;
    _el('luckySmallTitle').innerHTML = title;
    /*
    _el('td'+id).className = 'thumbSelected';
    */
    if (width>=300 /*&& height>=500*/) {
        _el('luckySmall').innerHTML = '<div id="sc2" class="luckyZoomSmallImageCont"><img width="250" height="'+(250*height/width)+'" id="sim2" src="'+baseuri+'/img/image_'+id+'_250.jpg" alt=""/>'+
                '<div id="bc2" class="luckyZoomBigImageCont" style="width:300px; height:300px; left: 255px; top: 0px"><img onload="initZoom('+width+');" id="bim2" alt="" width="'+width+'" height="'+height+'" src="'+baseuri+'/img/image_'+id+'.jpg" /></div></div>';
	zoom = new luckyZoom('sc2', 'sim2', 'bc2', 'bim2');
	zoom.initZoom();
    } else {
        _el('luckySmall').innerHTML = '<img width="'+width+'" height="'+height+'" id="sim2" src="'+baseuri+'/img/image_'+id+'.jpg" alt=""/>';
    }
    //_el('downloadLink').href = baseuri+'/attachment/'+id;
    return false;
}
