 function LoadFlash(url,wmode,width,height)
{  
 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="'+width+'" height="'+height+'">');
          document.write('<param name="movie" value="'+url+'">');
		  document.write('<param name="wmode" value="transparent">');
          document.write('<param name="quality" value="high">');
          document.write('<embed src="'+url+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'"></embed>');
 document.write('</object>');
}

function newgdcode(obj,url) {
obj.src = url+ '?nowtime=' + new Date().getTime(); //后面传递一个随机参数，否则在IE7和火狐下，不刷新图片
}
setTimeout( function nocopy() {
var text = clipboardData.getData("text");
if (text) {
text = text + "\r\n本文来自: 卫视在线 "+location.href; clipboardData.setData("text", text); 
}
}, 100 )



var flag=false;
//图片等比例缩小:

function DrawImage(ImgD){
 var image=new Image();
 var iwidth = 450;
 var iheight = 300; //定义允许高度，当宽度大于这个值时等比例缩小
 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;
   }
  }else{
   if(image.height>iheight){ 
    ImgD.height=iheight;
    ImgD.width=(image.width*iheight)/image.height; 
   }else{
    ImgD.width=image.width; 
    ImgD.height=image.height;
   }
  }
 }
} 


var flag2=false;
//图片等比例缩小:

function DrawBody(ImgD){
 var image=new Image();
 var iwidth = 700;
 var iheight = 1000; //定义允许高度，当宽度大于这个值时等比例缩小
 image.src=ImgD.src;
 if(image.width>0 && image.height>0){
  flag2=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;
   }
  }else{
   if(image.height>iheight){ 
    ImgD.height=iheight;
    ImgD.width=(image.width*iheight)/image.height; 
   }else{
    ImgD.width=image.width; 
    ImgD.height=image.height;
   }
  }
 }
} 