﻿function OnThumbnailHover(clickedThumbnail) {
    var img = new Image()
    img.src = clickedThumbnail

    var width = img.width
    var height = img.height

    if (width > height) {
        maxHeight = height * 380 / width;
        maxWidth = 380;
    }
    else {
        maxWidth = width * 300 / height;
        maxHeight = 300;
    }

    document.getElementById('displayImg').innerHTML = '<img alt="" src="' +
        clickedThumbnail + '" style="width:' + maxWidth + 'px; height:' + maxHeight + 'px"></img>';
}
