﻿function setErrorMessage(id, message) {
    $('#' + id + 'ErrMsg').html(message);
}

function resetAllErrorMessage() {
    $("div[id$='ErrMsg']").html('');
}

function switchFullImage(newImgUrl, imgBigId, loadImage) {
    /* Change the variable below to the appropriate location for the directory in
    which your images reside if you are not keeping this HTML file in the same directory. */
    /* Uncomment the two lines below and adjust the loadImg variable to the
    actual location of your loading image if you want to use an image to
    indicate the real picture is loading. */
    document.getElementById(imgBigId).src = loadImage;
    /* Adjust the variables below to specify the width and height of the full-sized images */
    //var h = 250;
    //var w = 250;
    /* Adjust the variable below to match the location of the full-sized images */
    var newImg = new Image(); // The two numbers in the Image function are optional. They specify the width and height
    newImg.src = "";
    newImg.onload = function () {
        document.getElementById(imgBigId).src = newImg.src;
    }
    newImg.src = newImgUrl;
    return false;
}
