// 弹出窗口
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

/*全选中*/
function CheckAll(form){
  for (var i=0;i<form.elements.length;i++){
    var e = form.elements[i];
    if (e.name != 'chkall') e.checked = form.chkall.checked; 
   }
  }
  

// JavaScript Document
function fla(ur,w,h){
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+w+'" height="'+h+'"> ');
document.write('<param name="movie" value="' + ur + '">');
document.write('<param name="quality" value="high"> ');
document.write('<param name="menu" value="false"> ');
document.write('<param name="wmode" value="transparent"> ')
document.write('<param name="SCALE" value="exactfit"> ')
document.write('<embed wmode="transparent" src="' + ur + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'"></embed> ');
document.write('</object> ');
}


var flag=false;
function DrawImage(ImgD,imgW,imgH){
var image=new Image();
var iwidth = imgW; //定义允许图片宽度
var iheight = imgH; //定义允许图片高度
image.src=ImgD.src;
if(image.width>0 && image.height>0){
flag=true;
if(image.width/image.height>= iwidth/iheight){
if(image.width>iwidth){
ImgD.width=iwidth;
ImgD.height=(image.height*iwidth)/image.width;
}else{
ImgD.width=image.width;
ImgD.height=image.height;
}
//ImgD.alt=image.width+"×"+image.height;
}
else{
if(image.height>iheight){
ImgD.height=iheight;
ImgD.width=(image.width*iheight)/image.height;
}else{
ImgD.width=image.width;
ImgD.height=image.height;
}
//ImgD.alt=image.width+"×"+image.height;
}
}
}
//调用：<img src="图片" onload="javascript: DrawImage(this,200,200)">
