function insertswf(width, height, url){
	document.write("<object classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0 width='" + width + "' height='" + height + "'>");
	document.write("<param name='movie' value='" + url + "'>");
	document.write("<param name='quality' value='high'>");
	document.write("<param name='scale' value='noscale'>");
	document.write("<param name='wmode' value='transparent'>");
	document.write("<param name='allowScriptAccess' value='always'>");
	document.write("<param name='salign' value='t'>");
	document.write("<embed src='" + url + "' quality='high' allowScriptAccess='always' scale='noscale' salign='t' pluginspage=http://www.macromedia.com/go/getflashplayer type=application/x-shockwave-flash width='" + width + "' height='" + height + "'></embed>");
	document.write("</object>");
}

function insertwmv(width, height, url){
	document.write("<embed src='" + url + "' width='" + width + "' height='" + height + "'></embed>");
}

var flag=false;
function DrawImage(ImgD,iwidth,iheight){
    //参数(图片,允许的宽度,允许的高度)
    var image=new Image();
    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;
        }
    }
} 
