function Move(val) {
    if (val.length != 0) {
        var x = event.x;
        var y = event.y;
        var y1 = document.body.clientHeight;
        document.getElementById("DivShowPic").style.display = "";
        document.getElementById("DivShowPic").style.left = x + "px";

        if (y-230 > 0) {
            document.getElementById("DivShowPic").style.top = (document.body.scrollTop + event.y - 230) + "px";
        }
        else {
            document.getElementById("DivShowPic").style.top = (document.body.scrollTop + event.y) + "px";
        }

        document.getElementById("HiddenImg").src = val;
    }
}


//参数(图片,允许的宽度,允许的高度)
function DrawImage(ImgD, iwidth, iheight) {
    var image = new Image();
    image.src = ImgD.src;

    var w = document.getElementById("HiddenImg").width;
    var h = document.getElementById("HiddenImg").height;

    if (w > 0 && h > 0) {
        if (w / h >= iwidth / iheight) {
            if (w > iwidth) {
                document.getElementById("HiddenImg").width = iwidth;
                document.getElementById("HiddenImg").height = (h * iwidth) / w;
            }
            else {
                document.getElementById("HiddenImg").width = w;
                document.getElementById("HiddenImg").height = h;
            }
        }
        else {
            if (h > iheight) {
                document.getElementById("HiddenImg").height = iheight;
                document.getElementById("HiddenImg").width = (w * iheight) / h;
            }
            else {
                document.getElementById("HiddenImg").width = w;
                document.getElementById("HiddenImg").height = h;
            }
        }
    }
}