﻿// JScript 文件

function showtable(tableid)
{
 var whichtable=document.getElementById("table"+tableid);
if(whichtable.style.display=="none")
{
    whichtable.style.display="";
//eval("table"+tableid+".style.display=\"\";");
}
else
{
    whichtable.style.display="none";
//eval("table"+tableid+".style.display=\"none\";");
}
}

function clip(text){ 
   str=eval("document." + text) 
   str.select() 
   str = document.selection.createRange(); 
   clipboardData.setData('text',(str.text)); 
   } 
   
function DrawImage(ImgD,FitWidth,FitHeight){
var image=new Image();
image.src=ImgD.src;
if(image.width>0 && image.height>0){
if(image.width/image.height>= FitWidth/FitHeight){
if(image.width>FitWidth){
ImgD.width=FitWidth;
ImgD.height=(image.height*FitWidth)/image.width;
}else{
ImgD.width=image.width;
ImgD.height=image.height;
}
} else{
if(image.height>FitHeight){
 ImgD.height=FitHeight;
 ImgD.width=(image.width*FitHeight)/image.height;
 }else{
 ImgD.width=image.width;
 ImgD.height=image.height;
 }
 }
 }
 } 
 
 
