if(typeof thinHead=='undefined') var thinHead = true	//是否使用窄头(20像素高的头部边框);ture为是,false为否;

if(typeof autoPlayFlag=='undefined') var autoPlayFlag = true	//设定是否自动播放
 
if(typeof withFlashAd=='undefined') var withFlashAd = true	//是否有falsh广告;ture为有,false为无;

if(typeof iniText=='undefined') var iniText = ''	//放器初始画面图片文字链接，为空即无图片文字链接

if(typeof withAd=='undefined') var withAd = true	//是否有边框广告;ture为有,false为无;

if(withAd) thinHead = false;

withAd = false;

if(!withAd) thinHead = true;

if(!autoPlayFlag) withFlashAd = false;

if(typeof pics=='undefined') var pics = ''	//播放器FLASH焦点图图片，为空即无FLASH焦点图;

if(typeof links=='undefined') var links = ''	//播放器FLASH焦点图链接;

if(typeof texts=='undefined') var texts = ''	//播放器FLASH焦点图文本;

//copied from newTech Dept.
function  speedtest()
{
time = new Date();

starttime = time.getTime();


time = new Date();

endtime = time.getTime();

if (endtime == starttime)

 {downloadtime = 0

 }

else

 {downloadtime = (endtime - starttime)/500;

 }


if (downloadtime == 0)

 {downloadtime = .1;

  nextsize = 50;

 }

else if (downloadtime < .2)

 {nextsize = 500;

 }

else

 {

  nextsize = 50;

 }



kbytes_of_data = 50; // data file size

linespeed = kbytes_of_data/downloadtime;

kbps = (Math.round((linespeed*8)*10*1.02))/10;
}
var kbps_tmp;
kbps_tmp = getCookie("bn_stream_speed");
if (kbps_tmp == "")
{
		speedtest();
}
else
{
	var kbps=0;
	kbps=kbps_tmp;
}
if (kbps > 300)
{
		document.cookie = "bn_stream_speed=301; expires=Tuesday,07-February-2006 08:00:01 GMT; path=/; domain=sina.com.cn;";
		
}
else if(kbps > 90)
{
		document.cookie = "bn_stream_speed=91; expires=Tuesday,07-February-2006 08:00:01 GMT; path=/; domain=sina.com.cn;";
}
else
{
		document.cookie = "bn_stream_speed=1; expires=Tuesday,07-February-2006 08:00:01 GMT; path=/; domain=sina.com.cn;";
}



function getCookie(name) {

  var search;

  search = name + "="
  offset = document.cookie.indexOf(search) 
  if (offset != -1) {
    offset += search.length ;
    end = document.cookie.indexOf(";", offset) ;
    if (end == -1)
      end = document.cookie.length;
    return document.cookie.substring(offset, end);
  }
  else
    return "";
}




//scripted by guowei1 bellow, 2004
var isIE = navigator.appVersion.toLowerCase().indexOf("msie") >= 0;

if(typeof withAd=='undefined') var withAd = true;

var curBroad = broadFile;
var curNarrow = narrowFile;
var curFile;
vHeight += 24;

CheckBand();

var flag = true;

function OnloadFun(){
	startdrag();
	setInterval("FixPos()",1000);
	if(typeof setTailPosition == 'function') setTailPosition();

	//for flash media ad below
	if(withFlashAd){
		init_flash_media_ad();
		stream_check_state();
		flash_stream_ad_check();
	}
}
document.body.onload=OnloadFun;

function GetObj(objName){
	if(document.getElementById){
		return eval('document.getElementById("' + objName + '")');
	}else{
		return eval('document.all.' + objName);
	}
}


var objHTML1 = ("	<OBJECT ID='MediaPlayer' width='"+vWidth+"' height='"+vHeight+"' CLASSID='CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95' STANDBY='Loading Windows Media Player components...' TYPE='application/x-oleobject' VIEWASTEXT>");
objHTML1 += ("	<PARAM NAME='FileName' VALUE='");


var objHTML2 = ("'>");
objHTML2 += ("	<PARAM NAME='AutoStart' VALUE='"+(autoPlayFlag?"True":"False")+"'>");
objHTML2 += ("	<PARAM NAME='ShowStatusBar' VALUE='True'>");
objHTML2 += ("	<PARAM NAME='ShowControls' VALUE='False'>");
objHTML2 += ("	<PARAM NAME='ShowTracker' VALUE='False'>");
objHTML2 += ("	<PARAM NAME='EnableTracker' VALUE='False'>");
objHTML2 += ("	<PARAM NAME='ShowPositionControls' VALUE='False'>");
objHTML2 += ("	<PARAM NAME='EnablePositionControls' VALUE='False'>");
objHTML2 += ("	<param name='enableContextMenu' value='false'>");

objHTML2 += ("	</OBJECT>");

document.writeln("<style type='text/css'>");
document.writeln(".aWhiteMP A:link,.aWhiteMP A:visited {text-decoration:none;color:#ffffff;}");
document.writeln(".aWhiteMP A:active,.aWhiteMP A:hover {text-decoration:underline;color:#ff0000;}");
document.writeln(".aWhiteMP{color:#ffffff;}");

document.writeln("A.vv01:link,A.vv01:visited {text-decoration:none;color:#fff;}");
document.writeln("A.vv01:active,A.vv01:hover {text-decoration:none;color:#ff0;}");

//document.writeln("table,td,img,div,span,form{border: none;margin: 0 0 0 0;padding: 0 0 0 0;}");
document.writeln("A img{border:none;}");
document.writeln("</style>");

document.writeln("");

document.writeln("<table border=0 cellpadding=0 cellspacing=0>");
document.writeln("<form name='myForm'>");
document.writeln("<tr>");
if(withAd){
	document.writeln("<td colspan=3><table width=100% border=0 cellpadding=0 cellspacing=0><tr><td width=150><a href='http://noshow.adsina.allyes.com/main/adfclick?db=sina&bid=9719,29950,29993&cid=0,0,0&sid=29956&advid=1932&camid=6106&show=ignore&url=http://www.chinamobile.com/hylz/easyown/image/index.html' target=_blank><img src='http://www.cec-ceda.org.cn/huodong/2006qyjhdr/images/mediaplay/szx01.gif' width=150 height=38 alt='神州行特约赞助' border=0/></a></td><td background=http://www.cec-ceda.org.cn/huodong/2006qyjhdr/images/mediaplay/szx02.gif>&nbsp;</td><td width=80><img src='http://www.cec-ceda.org.cn/huodong/2006qyjhdr/images/mediaplay/szx03.gif' width=80 height=38'/></td></tr></table></td>");
}else{
	if(thinHead) document.writeln("<td colspan=3><table width=100% border=0 cellpadding=0 cellspacing=0><tr><td width=10><img src='http://www.cec-ceda.org.cn/huodong/2006qyjhdr/images/mediaplay/gw_bn_player2_00.gif' width=10 height=20></td><td background=http://www.cec-ceda.org.cn/huodong/2006qyjhdr/images/mediaplay/gw_bn_player2_01.gif>&nbsp;</td><td width=10><img src='http://www.cec-ceda.org.cn/huodong/2006qyjhdr/images/mediaplay/gw_bn_player2_02.gif' width=10 height=20></td></tr></table></td>");
	else document.writeln("<td colspan=3><table width=100% border=0 cellpadding=0 cellspacing=0><tr><td width=84><img src='http://www.cec-ceda.org.cn/huodong/2006qyjhdr/images/mediaplay/gw_bn_player_00.gif' width=84 height=38 Alt=''></td><td background=http://www.cec-ceda.org.cn/huodong/2006qyjhdr/images/mediaplay/gw_bn_player_01.gif>&nbsp;</td><td width=123><img src='http://www.cec-ceda.org.cn/huodong/2006qyjhdr/images/mediaplay/gw_bn_player_02.gif' width=123 height=38 ></td></tr></table></td>");
}
document.writeln("</tr>");
document.writeln("<tr>");
if(withAd) document.writeln("<td background=http://www.cec-ceda.org.cn/huodong/2006qyjhdr/images/mediaplay/gw_bn_mp_03.gif valign=top><img src=http://www.cec-ceda.org.cn/huodong/2006qyjhdr/images/mediaplay/szx04.gif width=16 height=240/></td>");
else document.writeln("<td background=http://www.cec-ceda.org.cn/huodong/2006qyjhdr/images/mediaplay/gw_bn_mp_03.gif></td>");
document.writeln("<td bgcolor=#000000 width="+vWidth+" height="+vHeight+">");

document.writeln("	<div id='hideScreen' style='position:relative;display:"+((((iniPic==""||iniPic==null) && (pics==""||pics==null)) || autoPlayFlag)?"none":"block")+";'>");
if(pics==""||pics==null){
	document.writeln("		<div class=aWhiteMP style='text-align:center;'><img src='"+iniPic+"' width="+vWidth+" height="+(iniText==""?vHeight:(vHeight-17))+" alt='点击播放该视频' border=0 onClick='toPlay()'"+((iniText=="")?" style='cursor:pointer;'":" style='margin-bottom:3px;cursor:pointer;'")+" />"+((iniText=='')?"":("<br>"+iniText))+"</div>");
}else{
	var focusPic = '';
	focusPic += "		<div class=aWhiteMP style='text-align:center;'>";
	//focusPic += '<div z-index:100>';
	focusPic += '<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="'+ focus_width +'" height="'+ swf_height +'">';
	focusPic += '<param name="movie" value="http://image2.sina.com.cn/dongman/BN/again/bn.swf"><param name="quality" value="high"><param name="bgcolor" value="#ffffff">';
	focusPic += '<param name="menu" value="false"><param name=wmode value="opaque">';
	focusPic += '<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">';
	focusPic += '<embed src="http://image2.sina.com.cn/dongman/BN/again/bn.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="'+ swf_height +'"  type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
	focusPic += '</object>';
	focusPic += '</div>';
	document.writeln(focusPic);
	//document.writeln("		</div>");
	
}
document.writeln("		<div id='picMsg' style='color:#fff;background-color:#000;position:absolute;text-align:right;top:"+((iniText=='')?(vHeight-20):(vHeight-17-20))+"px;left:"+(vWidth-70)+"px;width:70px;height:20px;overflow:hidden;padding:4px 4px 0 0;border-left:1px solid #fff;border-top:1px solid #fff;filter:alpha(opacity=70)'>初始化</div>");
document.writeln("	</div>");
document.writeln("	<div id='myScreen' style='border:1px solid #000;display:"+((((iniPic==""||iniPic==null) && (pics=="" || pics==null)) || autoPlayFlag)?"block":"none")+";'>");
document.writeln(objHTML1 + curFile + objHTML2);
document.writeln("	</div>");

//for LIU Jie begin
document.writeln("	<DIV id='div_begin_flash_ad' style='display:none;'>");
document.writeln("	</DIV>");

document.writeln("	<DIV id='div_half_flash_ad' style='display:none;'>");
document.writeln("	</DIV>");

document.writeln("	<DIV id='div_end_flash_ad' style='display:none;'>");
document.writeln("	</DIV>");
//for LIU Jie end


document.writeln("	<div id='tempDiv' style='display:none;'></div>");
document.writeln("</td>");
if(withAd) document.writeln("<td background=http://www.cec-ceda.org.cn/huodong/2006qyjhdr/images/mediaplay/gw_bn_mp_04.gif valign=top><img src=http://www.cec-ceda.org.cn/huodong/2006qyjhdr/images/mediaplay/szx05.gif width=16 height=240/></td>");
else document.writeln("<td background=http://www.cec-ceda.org.cn/huodong/2006qyjhdr/images/mediaplay/gw_bn_mp_04.gif></td>");
document.writeln("</tr>");
document.writeln("<tr>");
document.writeln("<td><img src=http://www.cec-ceda.org.cn/huodong/2006qyjhdr/images/mediaplay/gw_bn_mp_05.gif width=16 height=60 alt='图片关键字'/></td>");
document.writeln("<td>");
document.writeln("	<table width=100% cellspacing=0 border=0 cellpadding=0>");
document.writeln("	<tr>");
document.writeln("	<td width=48><img id=playControl src="+(autoPlayFlag?"http://www.cec-ceda.org.cn/huodong/2006qyjhdr/images/mediaplay/gw_bn_mp_08.gif":"http://www.cec-ceda.org.cn/huodong/2006qyjhdr/images/mediaplay/gw_bn_mp_07.gif")+" width=48 height=60 alt='播放/暂停' style='cursor:pointer;' onClick='toPlay()'/></td>");
document.writeln("	<td width=30><img id=stopControl src="+(autoPlayFlag?"http://www.cec-ceda.org.cn/huodong/2006qyjhdr/images/mediaplay/gw_bn_mp_09.gif":"http://www.cec-ceda.org.cn/huodong/2006qyjhdr/images/mediaplay/gw_bn_mp_10.gif")+" width=30 height=60 alt='停止' style='cursor:pointer;' onClick='toStop()'/></td>");
document.writeln("	<td width=17><img src=http://www.cec-ceda.org.cn/huodong/2006qyjhdr/images/mediaplay/gw_bn_mp_11.gif width=17 height=60/></td>");
document.writeln("	<td>");
document.writeln("		<table width=100% cellspacing=0 border=0 cellpadding=0>");
document.writeln("		<tr>");
document.writeln("		<td>");
document.writeln("			<table width=100% cellspacing=0 border=0 cellpadding=0>");
document.writeln("			<tr>");
document.writeln("			<td id='pZone' background=http://www.cec-ceda.org.cn/huodong/2006qyjhdr/images/mediaplay/gw_bn_mp_12.gif onmousedown='mouseDown(0)' style='POSITION: relative;left:0;'><div id='pBox' title='移动滑块控制影片进度' style='OVERFLOW: hidden;POSITION: relative;cursor:e-resize;left:-5px;top:10px;width:18px;height:9px;background-image:url(http://www.cec-ceda.org.cn/huodong/2006qyjhdr/images/mediaplay/gw_bn_mp_21.gif);'></div></td>");
document.writeln("			<td width=7><img src=http://www.cec-ceda.org.cn/huodong/2006qyjhdr/images/mediaplay/gw_bn_mp_19.gif width=7 height=24/></td>");
document.writeln("			</tr>");
document.writeln("			</table>");
			
document.writeln("		</td>");
document.writeln("		</tr>");
document.writeln("		<tr>");
document.writeln("		<td bgcolor=#000000>");
document.writeln("			<table width=100% cellspacing=0 border=0 cellpadding=0 background=http://www.cec-ceda.org.cn/huodong/2006qyjhdr/images/mediaplay/gw_bn_mp_13.gif>");
document.writeln("			<tr>");
document.writeln("			<td><div style='width:0px;height:0px;position:relative;'><div id='msgBox' style='color:#f00;left:22px;top:22px;width:138px;padding:5px 5px 5px 5px;line-height:19px;border:1px solid #aaa;display:none;background-color:#fff;z-index:99;position:absolute;filter:alpha(opacity=90);'></div></div><img src='http://www.cec-ceda.org.cn/huodong/2006qyjhdr/images/mediaplay/gw_bn_player_03.gif' width=22 height=22 onMouseOver=ShowMsg('在播放中进行全屏播放&lt;br&gt;全屏后可双击屏幕还原') onMouseOut=HideMsg() onClick=FullScreen() style='cursor:pointer;'/></td>");
//document.writeln("			<td width=48><img src=http://www.cec-ceda.org.cn/huodong/2006qyjhdr/images/mediaplay/gw_bn_mp_14.gif width=48 height=27 alt='宽频' style='cursor:pointer;' onCLick='ChgVideo(curBroad)'></td>");
//document.writeln("			<td width=49><img src=http://www.cec-ceda.org.cn/huodong/2006qyjhdr/images/mediaplay/gw_bn_mp_15.gif width=49 height=27 alt='窄频' style='cursor:pointer;' onCLick='ChgVideo(curNarrow)'></td>");
document.writeln("			<td width=48 style='padding-bottom:5px;color:#666;'><div id='broad'><input name=band type=radio value='broad'" + ((curFile==curBroad)?" checked":"") + " onClick='SetBand()'/>宽频</div></td>");
document.writeln("			<td width=49 style='padding-bottom:5px;color:#666;'><div id='narrow'><input name=band type=radio value='narrow'" + ((curFile==curNarrow)?" checked":"") + " onClick='SetBand()'/>窄频</div></td>");
document.writeln("			<td width=8><img src=http://www.cec-ceda.org.cn/huodong/2006qyjhdr/images/mediaplay/gw_bn_mp_16.gif width=8 height=36/></td>");
document.writeln("			<td width=24><img id=muteControl src=http://www.cec-ceda.org.cn/huodong/2006qyjhdr/images/mediaplay/gw_bn_mp_18.gif width=24 height=36 alt='关闭声音' onClick='Mute()' style='cursor:pointer;'/></td>");
document.writeln("			<!--volume-->");
document.writeln("			<td width=41 background=http://www.cec-ceda.org.cn/huodong/2006qyjhdr/images/mediaplay/bn_zhengwen_mp_001.gif id='vZone' onmousedown='mouseDown(1)' style='POSITION: relative;left:0;'><div id='vBox' title='移动滑块控制音量' style='OVERFLOW: hidden;POSITION: relative;cursor: pointer;left:0px;top:7px;width:9px;height:18px;background-image:url(http://image2.sina.com.cn/dongman/bofangqiimages/gw_bn_vol_21.gif)'></div></td>");
document.writeln("			</tr>");
document.writeln("			</table>");
document.writeln("		</td>");
document.writeln("		</tr>");
document.writeln("		</table>");
document.writeln("	</td>");
document.writeln("	</tr>");
document.writeln("	</table>");
	
document.writeln("</td>");
document.writeln("<td><img src=http://www.cec-ceda.org.cn/huodong/2006qyjhdr/images/mediaplay/gw_bn_mp_06.gif width=16 height=60/></td>");
document.writeln("</tr>");
document.writeln("</form>");
document.writeln("</table>");

function RadioBand(){
	if(curFile == curBroad) document.myForm.band[0].checked = true;
	else document.myForm.band[1].checked = true;
	if(curBroad=="" || curBroad==null) GetObj("broad").style.display = "none";
	else GetObj("broad").style.display = "block";
	if(curNarrow=="" || curNarrow==null) GetObj("narrow").style.display = "none";
	else GetObj("narrow").style.display = "block";
}
RadioBand();


function ShowMsg(Msg){
	GetObj("msgBox").innerHTML = Msg;
	GetObj("msgBox").style.display = "block";
}


function HideMsg(){GetObj("msgBox").style.display = "none";}

function FullScreen(){
	if(document.MediaPlayer.Duration>0){
		document.MediaPlayer.DisplaySize = 3;
	}
}
function SetBand(){

  if(((document.myForm.band[0].checked)?curBroad:curNarrow)!=document.MediaPlayer.FileName){
	GetObj('myScreen').innerHTML=objHTML1+((document.myForm.band[0].checked)?curBroad:curNarrow)+objHTML2;
	ChgVideo((document.myForm.band[0].checked)?curBroad:curNarrow);
  }
}


var mutePic = new Image(29,29);
mutePic.src = "http://www.cec-ceda.org.cn/huodong/2006qyjhdr/images/mediaplay/gw_bn_mp_17.gif";
function Mute()
{
	//alert(MediaPlayer.Mute);
	if(document.MediaPlayer.Mute.toString().toLowerCase()=='true')
	{
		document.MediaPlayer.Mute='False';
		document.images("muteControl").src = "http://www.cec-ceda.org.cn/huodong/2006qyjhdr/images/mediaplay/gw_bn_mp_18.gif";
		document.images("muteControl").alt = "关闭声音";
	}else{
		document.MediaPlayer.Mute='True';
		document.images("muteControl").src = mutePic.src;
		document.images("muteControl").alt = "打开声音";
	}
}

			var isPlayO = autoPlayFlag?true:false;
			var isStopO = autoPlayFlag?false:true;
			var isPauseO = autoPlayFlag?false:true;
			var playPic = new Image(48,77);
			playPic.src = "http://www.cec-ceda.org.cn/huodong/2006qyjhdr/images/mediaplay/gw_bn_mp_07.gif";
			var stopPic = new Image(24,35);
			stopPic.src = "http://www.cec-ceda.org.cn/huodong/2006qyjhdr/images/mediaplay/gw_bn_mp_10.gif";
			//var pausePic = new Image(28,77);
			//pausePic.src = "http://www.cec-ceda.org.cn/huodong/2006qyjhdr/images/mediaplay/gw_bn_mp_18.gif";


function toPlay()
{
	if(!isIE){
		alert("请使用IE浏览器欣赏视频!谢谢!")
		return false;
	}
	//document.MediaPlayer.AutoStart="True";
	if(document.MediaPlayer.Duration>0){
		if(isPlayO){
			toPause();
		}else{
			if(isStopO||isPauseO)
			{
				/* 050829 新增 part1 begin */
				if(!(pics==""||pics==null)){
					GetObj("hideScreen").innerHTML = "";
				}
				/* 050829 新增 part1 end */
				//alert(isStopO||isPauseO);
				document.MediaPlayer.Play();
				document.images("playControl").src = "http://www.cec-ceda.org.cn/huodong/2006qyjhdr/images/mediaplay/gw_bn_mp_08.gif";
				document.images("stopControl").src = "http://www.cec-ceda.org.cn/huodong/2006qyjhdr/images/mediaplay/gw_bn_mp_09.gif";
				//document.images("pauseControl").src = "http://image2.sina.com.cn/dongman/BN/http://www.cec-ceda.org.cn/huodong/2006qyjhdr/images/mediaplay/vod009.gif";
				isPlayO = true;
				isStopO = false;
				isPauseO = false;
				//alert(isPlayO +"=="+ isStopO+"=="+ isPauseO);
			}
				if(flag){
					GetObj('hideScreen').style.display = 'none';
					GetObj('myScreen').style.display = 'block';
					flag = false;
				}
		}
	}
	if(document.getElementById("div_end_flash_ad")) document.getElementById("div_end_flash_ad").style.display='none';
}

function toPlay2()
{
	document.MediaPlayer.AutoStart="True";
	if(document.MediaPlayer.Duration>0){
		if(isStopO||isPauseO)
		{
				/* 050829 新增 part2 begin */
				if(!(pics==""||pics==null)){
					GetObj("hideScreen").innerHTML = "";
				}
				/* 050829 新增 part2 end */
			//alert(isStopO||isPauseO);
			document.MediaPlayer.Play();
			document.images("playControl").src = "http://www.cec-ceda.org.cn/huodong/2006qyjhdr/images/mediaplay/gw_bn_mp_08.gif";
			document.images("stopControl").src = "http://www.cec-ceda.org.cn/huodong/2006qyjhdr/images/mediaplay/gw_bn_mp_09.gif";
			//document.images("pauseControl").src = "http://image2.sina.com.cn/dongman/BN/http://www.cec-ceda.org.cn/huodong/2006qyjhdr/images/mediaplay/vod009.gif";
			isPlayO = true;
			isStopO = false;
			isPauseO = false;
			//alert(isPlayO +"=="+ isStopO+"=="+ isPauseO);
		}

		if(flag){
			GetObj('hideScreen').style.display = 'none';
			GetObj('myScreen').style.display = 'block';
			flag = false;
		}
	}
	if(document.getElementById("div_end_flash_ad")) document.getElementById("div_end_flash_ad").style.display='none';
}

			/*
			//stop on current video
			function toStop()
			{
			//alert(MediaPlayer.Mute);
				if(isPlayO||isPauseO)
				{
					document.MediaPlayer.Stop();
					document.images("playControl").src = playPic.src;
					document.images("stopControl").src = stopPic.src;
					isPlayO = false;
					isStopO = true;
				}
				if((!flag)&&(document.MediaPlayer.FileName==broadFile||document.MediaPlayer.FileName==narrowFile)){
					GetObj('hideScreen').style.display = 'block';
					GetObj('myScreen').style.display = 'none';
					flag = true;
				}
			}
			*/

//back to ini video
function toStop()
{
if(document.MediaPlayer.Duration>0){
	//alert(MediaPlayer.Mute);
			
	if(isPlayO||isPauseO)
	{
		document.MediaPlayer.AutoStart="False";
		document.MediaPlayer.Stop();
		document.images("playControl").src = playPic.src;
		document.images("stopControl").src = stopPic.src;
		isPlayO = false;
		isStopO = true;
		//clearInterval(idTmr);

		if(!flag){
		  if((iniPic!=""&&iniPic!=null) || (pics!=""&&pics!=null)){
			GetObj('hideScreen').style.display = 'block';
			//GetObj('hideScreen').innerHTML = focusPic;
			GetObj('myScreen').style.display = 'none';
			
				/* 050829 新增 part3 begin */
				if(!(pics==""||pics==null)){
					GetObj("hideScreen").innerHTML = focusPic;
				}
				/* 050829 新增 part3 end */
			
		  }
			curBroad = broadFile;
			curNarrow = narrowFile;
			CheckBand();
			document.MediaPlayer.FileName = curFile;
			flag = true;
		}
	}
}
}
			
			function toPause()
			{
			//alert(MediaPlayer.Mute);
				if(document.MediaPlayer.Duration>0){
					if(isPlayO&&document.MediaPlayer.PlayState!=3)
					{
						document.MediaPlayer.Pause();
						document.images("playControl").src = playPic.src;
						//document.images("pauseControl").src = pausePic.src;
						isPlayO = false;
						isPauseO = true;
					}
				}
			}
			//--->


	
	var fFlag= false;
	//mpControl func

	//drag func
	var pFlag = false;

	var pZoneWidth = vWidth - 110;//GetObj('pZone').offsetWidth;

	function startdrag()
	{
		//alert(document.MediaPlayer.Duration||(!isNaN(document.MediaPlayer.Duration)));
		if(document.MediaPlayer.Duration||(!isNaN(document.MediaPlayer.Duration))){
			window.document.onmousemove = mouseMove;
			window.document.ondragstart = mouseEnd;
			window.document.onmouseup = mouseUp;
			/*window.document.onmousedown = mouseDown;*/
		}else{
			GetObj('myScreen').innerHTML='<img width=320 height=264 src=http://image2.sina.com.cn/dongman/BN/images/gw_bn_278.jpg alt="请使用IE浏览器观看视频"/>';
		}
	}
	var isPorV = 0;
	function mouseDown(objSign){
		//alert(window.event.srcElement.id);
		isPorV = objSign;
		if(isPorV==0){
			if(document.MediaPlayer.Duration>0){
				pFlag = true;
				//GetObj('pBox').style.left = (window.event.x-9);
				if(window.event.srcElement.id!='pZone') GetObj('pBox').style.left = GetObj('pBox').offsetLeft;
				else GetObj('pBox').style.left = (window.event.x-9);
			}
		}else if(isPorV==1){
			vFlag = true;
			if(window.event.srcElement.id!='vZone') GetObj('vBox').style.left = GetObj('vBox').offsetLeft;
			else GetObj('vBox').style.left = (window.event.x-4);
		}
	}


function GetOLeft(myObj){
	curObj = myObj;
	//alert(curObj.tagName+":"+curObj.offsetLeft)
	var objLT = curObj.offsetLeft;
	while(curObj!=curObj.offsetParent && curObj.offsetParent){
		curObj=curObj.offsetParent;
		if(curObj.tagName=="DIV" || curObj.tagName=="TABLE" || curObj.tagName=="TR" || curObj.tagName=="TD"){
			//alert(curObj.tagName+":"+curObj.offsetLeft)
			objLT += curObj.offsetLeft;
		}

	}
	return objLT;
}
	function mouseMove(){
			//window.status = (window.event.clientX +"-"+ GetOLeft(document.getElementById('pZone'))+"\n"+document.getElementById('pZone').offsetLeft)
		if(isPorV==0){
			if(document.MediaPlayer.Duration>0){
				//alert(window.event.x-25);
				//if(pFlag) alert(parseInt(document.getElementById('pBox').style.left));
				//if(pFlag) document.getElementById('pBox').style.left = window.event.clientX-10;// - clickleft;
				//if(pFlag) document.getElementById('PlayState').innerText = (document.getElementById('pZone').offsetLeft+':'+document.getElementById('pBox').style.left+":"+window.event.clientX);
				if(pFlag) document.getElementById('pBox').style.left = window.event.clientX - GetOLeft(document.getElementById('pZone')) - 9 +"px"; //window.event.x-9;
				if (parseInt(document.getElementById('pBox').style.left.replace("px","")) > pZoneWidth) document.getElementById('pBox').style.left=pZoneWidth +"px";
				if (parseInt(document.getElementById('pBox').style.left.replace("px","")) < -5) document.getElementById('pBox').style.left=-5 +"px";
			}

		}else if(isPorV==1){
			//window.status = (window.event.clientX +"-"+ GetOLeft(document.getElementById('vZone'))+"\n"+document.getElementById('vZone').offsetLeft);
			if(vFlag) document.getElementById('vBox').style.left = window.event.clientX - GetOLeft(document.getElementById('vZone')) - 4 +"px"; //window.event.x-9;
				if (parseInt(document.getElementById('vBox').style.left.replace("px","")) > 35) document.getElementById('vBox').style.left=35 +"px";
				if (parseInt(document.getElementById('vBox').style.left.replace("px","")) < 0) document.getElementById('vBox').style.left=0 +"px";
		}
	}

	function mouseUp()
	{
		if(isPorV==0){
			if(document.MediaPlayer.Duration>0){
				if (pFlag){
					var duration = document.MediaPlayer.Duration;
					document.MediaPlayer.CurrentPosition=duration * (parseInt(document.getElementById('pBox').style.left)/pZoneWidth);
					//alert(window.event.x +"-"+document.getElementById('pZone').style.left+"="+parseInt(document.getElementById('pBox').style.left)+"("+duration * (parseInt(document.getElementById('pBox').style.left)/139)+")");
				}
				pFlag = false;
			}
		}else if(isPorV==1){
			if (vFlag){
				//var volume = document.MediaPlayer.Volume;
				tempVol = (10 - (parseInt(GetObj('vBox').style.left)/3.7))*(-100);
				//alert(tempVol)
				if(tempVol<=-1000){
					if(document.MediaPlayer.Mute.toString().toLowerCase()=='false' && document.images("muteControl").src != mutePic.src){
						document.MediaPlayer.Mute='True';
						document.images("muteControl").src = mutePic.src;
						document.images("muteControl").alt = "打开声音";
					}
				}else{
					if(document.MediaPlayer.Mute.toString().toLowerCase()=='true')
					{
						document.MediaPlayer.Mute='False';
						document.images("muteControl").src = "http://www.cec-ceda.org.cn/huodong/2006qyjhdr/images/mediaplay/gw_bn_mp_18.gif";
						document.images("muteControl").alt = "关闭声音";
					}
				}
				document.MediaPlayer.Volume=Math.round(tempVol);//duration * (parseInt(GetObj('vBox').style.left)/139);
				//alert(window.event.x +"-"+GetObj('pZone').style.left+"="+parseInt(GetObj('pBox').style.left)+"("+duration * (parseInt(GetObj('pBox').style.left)/139)+")");
			}
			vFlag = false;
		}
	}

	function mouseEnd()
	{
		if(document.MediaPlayer.Duration>0){
			window.event.returnValue = false;
		}
	}

	function FixPos(){
		if(document.MediaPlayer.Duration>0){
			var duration = document.MediaPlayer.Duration;
			var pos = document.MediaPlayer.CurrentPosition;
			if (pos == 0)
			{
				var pBoxPos = Math.round(pos/duration*pZoneWidth)-5;
			}
			else{
				var pBoxPos = Math.round(pos/duration*pZoneWidth);
			}
			if (!isNaN(pBoxPos)) document.getElementById('pBox').style.left = pBoxPos;
			//alert(Math.round(pos/duration*200));
			if(document.MediaPlayer.PlayState==0) toStop();
			//if(document.MediaPlayer.Duration==document.MediaPlayer.CurrentPosition) toStop();
		}
		if(GetObj('hideScreen').style.display.toLowerCase()=='block') ShowState();//图片上的VIDEO播放状态
	}
	
	function ShowState(){
		var msgObj = document.getElementById('picMsg');
		if(msgObj == null) return false;
		switch (document.MediaPlayer.PlayState){
			case 0:
				msgObj.innerText = '已就绪';
				break;
			case 1:
				msgObj.innerText = '已暂停';
				break;
			case 2:
				msgObj.innerText = '播放中';
				break;
			case 3:
				msgObj.innerText = '连接服务器';
				fFlag= true;
				break;
			case 4:
				msgObj.innerText = 'Stream is scanning forward';
				break;
			case 5:
				msgObj.innerText = 'Stream is scanning in reverse';
				break;
			case 6:
				msgObj.innerText = 'Skipping to next';
				break;
			case 7:
				msgObj.innerText = 'Skipping to previous';
				break;
			case 8:
				msgObj.innerText = '未打开任何影音文件';
				break;
			default:
				msgObj.innerText = '...';
		}
	
	//0 mpStopped Playback is stopped. 
	//1 mpPaused Playback is paused. 
	//2 mpPlaying Stream is playing. 
	//3 mpWaiting Waiting for stream to begin. 
	//4 mpScanForward . 
	//5 mpScanReverse Stream is scanning in reverse. 
	//6 mpSkipForward Skipping to next. 
	//7 mpSkipReverse Skipping to previous. 
	//8 mpClosed Stream is not open. 
	
	}

	

	function VolumeUp(vol){
		/*050206-guowei1
		tempVol = (9 - vol)*(-100);
		if(tempVol < (-500)) tempVol-=200;
		//alert(tempVol);
		document.MediaPlayer.Volume= tempVol;
		for(var i=1;i<=vol;i++){
			document.images['vol'+i].src = 'http://image2.sina.com.cn/dongman/BN/images/vod023_'+i+'o.gif';
		}
		for(var i=vol+1;i<=9;i++){
			document.images['vol'+i].src = 'http://image2.sina.com.cn/dongman/BN/images/vod023_'+i+'.gif';
		}*/
		tempVol = (10 - vol)*(-100);
		document.MediaPlayer.Volume= tempVol;
		document.getElementById('vBox').style.left = vol/10*35;
	}


	function checkstat()
			{
				//alert('out'+document.MediaPlayer.PlayState)
				if (document.MediaPlayer.PlayState==0||document.MediaPlayer.PlayState==8){
					//alert(document.MediaPlayer.PlayState)
					toPlay2();
					clearInterval(idTmr);
					GetObj('hideScreen').innerHTML=(pics==""||pics==null)?tempHTML:focusPic;
					broadFile = tempFile;
				}else{}
			}
	var tempHTML;
	var tempFile;
	function ChgVideo(filename){
		if(!isIE){
			alert("请使用IE浏览器欣赏视频!谢谢!")
			return false;
		}

			var tempCurB = curBroad;
			var tempCurN = curNarrow;

			toStop();
			if(autoPlayFlag) document.MediaPlayer.AutoStart="True";
			curBroad = tempCurB;
			curNarrow = tempCurN;

			tempHTML = GetObj('hideScreen').innerHTML;
			tempFile = broadFile;
			GetObj('hideScreen').innerHTML='<div align=center><font color=white>视频加载中</font></div>';
			broadFile = filename;
			document.MediaPlayer.FileName=filename;
			if(autoPlayFlag){
			//for the issue AutoPlay=True;
				document.images("playControl").src = "http://www.cec-ceda.org.cn/huodong/2006qyjhdr/images/mediaplay/gw_bn_mp_08.gif";
				document.images("stopControl").src = "http://www.cec-ceda.org.cn/huodong/2006qyjhdr/images/mediaplay/gw_bn_mp_09.gif";
				isPlayO = true;
				isStopO = false;
				isPauseO = false;
			//end
			}else{
				idTmr = setInterval("checkstat()",300);//No need to SetInterval when AutoPlay==True;
			}
	}

	function ChgBN(bFile,nFile){
		curBroad = bFile;
		curNarrow = nFile;
		curFile = curBroad;
		CheckBand();

		RadioBand();

		ChgVideo((document.myForm.band[0].checked)?curBroad:curNarrow);
	}
	function SetBN(bFile,nFile){
		curBroad = bFile;
		curNarrow = nFile;
		curFile = curBroad;
	}

	function CheckBand(){
			if (kbps > 300)
			{
					if (curBroad == "" || curBroad==null)
					{
						curFile=curNarrow;
					}
					else
					{
						curFile=curBroad;
					}
			}
			else if(kbps > 90)
			{
					curFile=curNarrow;
			}
			else
			{
					curFile=curNarrow;
			}
			//alert(curFile+"\n"+curBroad+"<B:N>"+curNarrow)
	}
