// JavaScript Document
//把如下代码放到Video调用处
/*
<script language=JavaScript>
	<!--
		Video('Videos_URL','938','697');
	//-->
</script>
*/
// onload='javascript:widthD=166;heightD=127;DrawImage(this);'
/*在head里写入如下js*/
	var flag=false; 
	function DrawImage(ImgD){ 
		var image=new Image(); 
		image.src=ImgD.src; 
			if(image.width>0 && image.height>0){ 
				flag=true
				if(image.width/image.height>= widthD/heightD){ 
					if(image.width>widthD){ 
						ImgD.width=widthD; 
						ImgD.height=(image.height*widthD)/image.width; 
					}else{ 
						ImgD.width=image.width; 
						ImgD.height=image.height; 
						} 
					} 
					else{ 
					if(image.height>heightD){ 
						ImgD.height=heightD; 
						ImgD.width=(image.width*heightD)/image.height; 
					}else{ 
						ImgD.width=image.width; 
						ImgD.height=image.height; 
					} 
				} 
			} 
	} 
	

function flash(flash_name,flash_width,flash_height,wmode){
		document.write(" \
			<Object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' WIDTH='"+flash_width+"' HEIGHT='"+flash_height+"' id='"+flash_name+"' ALIGN=''> \
			<PARAM NAME=movie VALUE='"+flash_name+"'> \
			<PARAM NAME=quality VALUE=high> \
		");
		if(wmode == "1"){
			document.write("<PARAM NAME=wmode VALUE=transparent>");
		}
		document.write(" \
			<EMBED src='"+flash_name+"' quality=high  WIDTH='"+flash_width+"' HEIGHT='"+flash_height+"' NAME='"+flash_name+"' ALIGN='' TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/go/getflashplayer'> \
			</EMBED> \
			</OBJECT> \
		");
	}
	
	document.oncontextmenu=new Function("event.returnValue=false;");
	document.onselectstart=new Function("event.returnValue=false;");
	
	function Video(Videos_URL,Videos_width,Videos_height,AutoStart){
	document.write(" \
		 <object classid='CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6' width='"+Videos_width+"' height='"+Videos_height+"' id='mPlayer1'>\
			<param name='AutoStart' value='"+AutoStart+"' />\
			<param name='UIMode' value='full' />\
			<param name='enableContextMenu' value='0' />\
			<param name='stretchToFit' value='true' />\
			<param name='URL' value='"+Videos_URL+"' />\
			<embed width='"+Videos_width+"' height='"+Videos_height+"' autostart='1' uimode='full' enablecontextmenu='0' stretchtofit='true' url='"+Videos_URL+"' src='1'> </embed>\
		</object>\
	");
	}
