﻿// JScript 文件
function fyxx(focus_width,focus_height,pics705,links705,texts705)
{
  var focus_width705=focus_width;
  var focus_height705=focus_height;
  var text_height705=20;
  var swf_height705 = focus_height705+text_height705;
  document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="/swflash.cab#version=6,0,0,0" width="'+ focus_width705 +'" height="'+ swf_height705 +'">');
  document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="Flash.swf"><param name="quality" value="high"><param name="bgcolor" value="#f2f8fa">');
  document.write('<param name="menu" value="false"><param name="wmode" value="opaque"><param name="bgcolor" value="#f2f8fa">');
  document.write('<param name="FlashVars" value="pics='+pics705+'&links='+links705+'&texts='+texts705+'&borderwidth='+focus_width705+'&borderheight='+focus_height705+'&textheight='+text_height705+'">');
  document.write('<embed src="Flash.swf" wmode="opaque" FlashVars="pics='+pics705+'&links='+links705+'&texts='+texts705+'&borderwidth='+focus_width705+'&borderheight='+focus_height705+'&textheight='+text_height705+'&textcolor=#000000|0xff0000&&borderstyle=0|0|0|0" menu="false" bgcolor="#ffffff"  quality="high" width="'+ focus_width705 +'" height="'+ swf_height705 +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
  document.write('</object>');
}

function play(swf_width,swf_height,files,tiltle)
{
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ swf_width +'" height="'+ swf_height +'">');
	document.write('<param name="movie" value="Video.swf"><param name="quality" value="high">');
	document.write('<param name="menu" value="false"><param name="AutoStart" value="-1"><param name=wmode value="opaque">');
	document.write('<param name="FlashVars" value="vcastr_file='+files+'&vcastr_title='+tiltle+'">');
	document.write('<embed src="Video.swf" wmode="opaque" FlashVars="vcastr_file='+files+'&vcastr_title='+tiltle+'& menu="false" quality="high" width="'+ swf_width +'" height="'+ swf_height +'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'); 
	document.write('</object>'); 

}

function playindex(swf_pic,swf_width1,swf_height1)
{
    var pic1=swf_pic;
    var width1=swf_width1;
    var height1=swf_height1;
    document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id=scriptmain name=scriptmain codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+width1+'" height="'+height1+'">');
    document.write('<param name="movie" value="bcastr.swf?bcastr_flie='+pic1+'">');
    document.write('<param name="quality" value="high">');
    document.write('<param name=scale value=noscale>');
    document.write('<param name="LOOP" value="false">');
    document.write('<param name="menu" value="false">');
    document.write('<param name="wmode" value="transparent">');
    document.write('<embed src="bcastr.swf?bcastr_flie='+pic1+'" width="'+width1+'" height="'+height1+'" loop="false" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" salign="T" name="scriptmain" menu="false" wmode="transparent"></embed>');
    document.write('</object>');
}

        // JScript 文件

//图片对象,一般用this
//maxWidth设置图片宽度界限
//maxHeight设置图片高度界限
function SetImgAutoSize(myimg,mywidth,myheight)
{
      var tmp_img = new Image();
tmp_img.src=myimg.src;
image_x=tmp_img.width;
image_y=tmp_img.height;
	if(image_x > mywidth){
	tmp_img.height=image_y * mywidth / image_x;
	tmp_img.width=mywidth;
		if(tmp_img.height>myheight){
			tmp_img.width=tmp_img.width * myheight / tmp_img.height;
			tmp_img.height=myheight;
			}
	}else if(image_y > myheight)
	{
	tmp_img.width=image_x * myheight / image_y;
	tmp_img.height=myheight;
		if(tmp_img.width>mywidth){
			tmp_img.height=tmp_img.height * mywidth / tmp_img.width;
			tmp_img.width=mywidth;
			}
	}
	myimg.width=tmp_img.width;
	myimg.height=tmp_img.height;
}

