//*************************************************
//函数名：DrawImage
//作  用：重定义图片大小，并按原来的比例显示
//参  数：ImgD   ----图片名，w—重定义后图片最大宽度，h：重定义后图片最大高度
//返回值：返回新的图片大小
//*************************************************
  function   getImage(ImgD,w,h){   
        var   image=new   Image();   
        var   iwidth   =   w;     //定义允许图片宽度   
        var   iheight   =  h;     //定义允许图片高度   
        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;   
            }   
          
            }   
          }   
  } 
  
  
 function getFlash(url, w, h)//<SCRIPT type=text/javascript>getFlash("../images/flash.swf",940,230);</ SCRIPT>
{
	var str;
	 
	 str='<object width="'+ w +'" height="'+ h +'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0">'; 
	 str=str+'<param name="movie" value="'+ url +'">';
	 str=str+'<param name="wmode" value="transparent">';
	 str=str+'<param name="menu" value="false">';
	 str=str+'<param name="quality" value="high">';
	 str=str+'<embed width="'+ w +'" height="'+ h +'" src="'+ url +'" quality="high" wmode="transparent" type="application/x-shockwave-flash" plugspace="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" wmode="transparent"></embed>';
	str=str+'</object>';
	return str;
	
}

function insertQuickMov(url, w, h)
{
	var str;
	 str='<embed width="'+ w +'" height="'+ h +'" src="'+ url +'">'; 
	 str=str+'</embed>';
	 return str;
}

function imgflash(swf,pics,links,texts,w,h,th){

	var focus_width=w
	var focus_height=h
	var text_height=th
	var swf_height = focus_height+text_height
    var str;
	 str='<embed src="'+swf+'" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#FFFFFF" quality="high" width="'+focus_width+'" height="'+focus_height+'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" extendspage="http://get.adobe.com/flashplayer/"></embed>'
return str;
  }
  

function show(title,div){
	document.getElementById("newstd").className="change2";
	document.getElementById("newshy").className="change2";
	document.getElementById("newsc").style.display="none";
	document.getElementById("newsh").style.display="none";
	document.getElementById(title).className="change1";
	document.getElementById(div).style.display="block";
	}

