<html>

<head>

<script type="text/javascript">


    function resize(image)

    {

        var differenceHeight = document.body.clientHeight - image.clientHeight;

        var differenceWidth  = document.body.clientWidth  - image.clientWidth;

        if (differenceHeight < 0) differenceHeight = differenceHeight * -1;

        if (differenceWidth  < 0) differenceWidth  = differenceWidth * -1;


        if (differenceHeight > differenceWidth)

        {

            image.style['height'] = document.body.clientHeight + 'px';

        }

        else

        {

            image.style['width'] = document.body.clientWidth + 'px';

        }


        // Optional: remove margins or compensate for offset.

        image.style['margin'] = 0;

        document.body.style['margin'] = 0;

    }


</script>


</head>

<body>


<img src="http://extremecnc.co.kr/board_data/z_product/1297766177_98262_8.jpg" onload="resize(this);" />


</body>

</html>

+ Recent posts