﻿// JScript 文件

 function MoveImage(ImgD,IW,IH)
        {	
        var H;
        var W;
        var width=IW;
        var height=IH;

        var  image=new  Image();  
        image.src=ImgD.src;
        if(image.width>0  &&  image.height>0)
        {  
        if (image.width>IW || image.height>IH)
        {

	        if(IW/image.width*image.height>IH)
	        {
		        ImgD.height=IH;
		        ImgD.width=IH/image.height*image.width;
            } 
            else 
            {
                ImgD.width=IW;
                ImgD.height=IW/image.width*image.height;
            }  
            
        }	
        } 
        }
        
    function Open(url)
    {
    window.open(url,"open","toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,location=no,resizable=no,width=590,height=365");
    return;
    }
    function imgchange1(filename)
    {
        
        document.getElementById("pic1").filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src =filename.value;
        document.getElementById("Img1").src=filename.value;
        var img= new Image();
        img.src=document.getElementById("Img1").src;
            if(img.width>300 || img.height>300)
            {
            //document.getElementById("H1").value="1";
            alert('图片像素不能超过300*300,您现在的图片大小为'+img.width+'*'+img.height+',为了不影响图片显示效果建议您请重新选择图片上传！');
            }
            else
            {
            //document.getElementById("H1").value="0";
            }
    }
    
