﻿// JScript 文件
function makevisible(cur,which){
if (which==0)
cur.filters.alpha.opacity=100
else
cur.filters.alpha.opacity=70
}
//显示缩略图
function DrawImage(ImgD,width_s,height_s){
/*var width_s=139;
var height_s=104;
*/
var image=new Image();
image.src=ImgD.src;
if(image.width>0 && image.height>0){
flag=true;
if(image.width/image.height>=width_s/height_s){
if(image.width>width_s){
ImgD.width=width_s;
ImgD.height=(image.height*width_s)/image.width;
}else{
ImgD.width=image.width;
ImgD.height=image.height;
}
}
else{
if(image.height>height_s){
ImgD.height=height_s;
ImgD.width=(image.width*height_s)/image.height;
}else{
ImgD.width=image.width;
ImgD.height=image.height;
}
}
}
/*else{
ImgD.src="";
ImgD.alt=""
}*/
}

function cutimg(ImgD,width_s,heigth_s)
{
var image=new Image();
image.src=ImgD.src;
W=image.width;
H=image.height;
if(W>width_s)
{
A=W/H;
W=width_s;
H=W/A;
}
if(H>heigth_s)
{
A=W/H;
H=heigth_s;
W=A*H;
}
if(W=0)
{
W=width_s;
H=heigth_s;
}
ImgD.width=W;
ImgD.height=H;
}
