﻿function formatPSFMainImage(mainImgID, smallImage, smallImageSRC){
    // Get the image handles
    var theMainImage = $("#" +  mainImgID);
    var theSmallImage = $(smallImage);
    
    // Get the current and new image sources
    var curImgSRC = theMainImage.attr("src");
    var newImgSRC = "/thumbnail.aspx?filename=" + smallImageSRC + "&canshrink=1&imageformat=jpg&height=143&width=143&keepaspectratio=true";
    theMainImage.attr({ src: newImgSRC });  
      
    // On mouse out return to original
    theSmallImage.mouseout(function(){theMainImage.attr({ 'src': curImgSRC });})
}