<%@ page language="C#" autoeventwireup="true" inherits="common_picinfo, DianCMS" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<style type="text/css">
    body
    {
        font-family: Arial, Helvetica, sans-serif;
        font-size: 12px;
        color: #666666;
        background: #fff;
        text-align: center;
        margin: 0px 0px 0px 0px;
        vertical-align: middle;
    }
    #newPreview
    {
        filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale);
    }
</style>

<script language="javascript">
    var flag = false;
    function DrawImage(ImgD) {
        var image = new Image();
        image.src = ImgD.src;

        var width = 260;
        var height = 224;
        ImgD.title = "" + image.width + "*" + image.height + "";
        //old var is :width:180;height:110
        if (image.width > 0 && image.height > 0) {
            flag = true;
            if (image.width / image.height >= width / height) {
                if (image.width > width) {
                    ImgD.width = width;
                    ImgD.height = (image.height * height) / image.width;
                } else {
                    ImgD.width = image.width;
                    ImgD.height = image.height;
                }
                /*ImgD.alt="bigpic" */
            }
            else {
                if (image.height > height) {
                    ImgD.height = height;
                    ImgD.width = (image.width * height) / image.height;
                } else {
                    ImgD.width = image.width;
                    ImgD.height = image.height;
                }
                /*ImgD.alt="bigpic" */
            }
        }
    }

    function PreviewImg(val, width, height) {
        var newPreview = document.getElementById("newPreview");
        newPreview.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = val;
        newPreview.title = "" + width + "*" + height + "";
        var width1 = 260;
        var height1 = 224;

        if (width > 0 && height > 0) {
            flag1 = true;
            if (width / height >= width1 / height1) {
                if (width > width1) {
                    newPreview.style.width = width1;
                    newPreview.style.height = (height * height1) / width;
                } else {
                    newPreview.style.width = width;
                    newPreview.style.height = height;
                }
                /*ImgD.alt="bigpic" */
            }
            else {
                if (height > height1) {
                    newPreview.style.height = height1;
                    newPreview.style.width = (width * height1) / height;
                } else {
                    newPreview.style.width = width;
                    newPreview.style.height = height;
                }
                /*ImgD.alt="bigpic" */
            }
        }
    }
    //-->
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<table width="260" height="224" cellpadding="0" cellspacing="0" border="0">
    <tr>
        <td align="center" valign="middle">
    <div id="newPreview">
    </div>
    <asp:Literal ID="Literal1" runat="server"></asp:Literal></td>
    </tr>
</table>
</body>
</html>
