function print_TransFlash(flash_name,tW,tH)
{
	var flash_a='<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"   WIDTH='
	+tW
	+' HEIGHT='
	+tH
	+'>'
	+'<embed src="'
	+flash_name
	+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" '
	+'type="application/x-shockwave-flash" width="'
	+tW
	+'" height="'
	+tH
	+'" wmode="transparent" ></embed>'
	+'<param name=WMODE value=Transparent>'
	+'<PARAM NAME=movie VALUE="'
	+flash_name
	+'"></OBJECT>'
	document.write(flash_a);
}

function print_Flash(flash_name,tW,tH)
{
	var flash_a='<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"   WIDTH='
	+tW
	+' HEIGHT='
	+tH
	+'><PARAM NAME=movie VALUE="'
	+flash_name
	+'"><EMBED src="'
	+flash_name
	+'" WIDTH='
	+tW
	+' HEIGHT='
	+tH
	+' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED></OBJECT>'
	document.write(flash_a);
}




function switchPlay2(Url,P_Width,P_Height)
{
	var vodeoPlayer="/Common/xJs/vcastr2.swf";
	var videoWidth = P_Width-20;
	var videoHeight = P_Height-20;
	var returnValue = "";
    if(Url.indexOf(".")!=-1)
    {
		var swf_width=P_Width;
		var swf_height=P_Height;
        var exTypeArr=Url.split(".");
        var exType=exTypeArr[exTypeArr.length-1].toLowerCase();
        var sfwString=".swf";
		var flvString=".flv";
        var mpString=".mp3,.mp4,.wmv,.avi,.mpeg,.wma";
        var rmString=".rm3,.rmvb";
		var picString=".jpg,.gif,.bmp,.png";
        if(sfwString.indexOf(exType)!=-1){
	    swf_width = videoWidth;
	    swf_height = videoHeight;
            returnValue = "<embed src=\""+Url+"\" width=\""+swf_width+"\" height=\""+swf_height+"\" type=\"application\/x-shockwave-flash\" menu=\"true\" play=\"true\" wmode=\"transparent\" loop=\"true\"><\/embed>";
        }else if(flvString.indexOf(exType)!=-1){
	    swf_width = videoWidth;
	    swf_height = videoHeight;
			
			var texts = '';
			var files = Url;
			var config='0:自动播放|1:连续播放|100:默认音量|0:控制栏位置|2:控制栏显示|0x000033:主体颜色|60:主体透明度|0x66ff00:光晕颜色|0xffffff:图标颜色|0xffffff:文字颜色|:logo文字|:logo地址|:结束swf地址'
			returnValue = returnValue + "<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 +"'>";
			returnValue = returnValue + "<param name='movie' value='"+vodeoPlayer+"'><param name='quality' value='high'>";
			returnValue = returnValue + "<param name='menu' value='false'><param name='wmode' value='opaque'><param name='allowFullScreen' value='true' />";
			returnValue = returnValue + "<param name='FlashVars' value='vcastr_file="+files+"&vcastr_title="+texts+"&vcastr_config="+config+"'>";
			returnValue = returnValue + "<embed src='"+vodeoPlayer+"' wmode='opaque' FlashVars='vcastr_file="+files+"&vcastr_title="+texts+"&vcastr_config="+config+"' menu='false' quality='high' width='"+ swf_width +"' height='"+ swf_height +"' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />"; 
			returnValue = returnValue + "</object>";
		}else if(mpString.indexOf(exType)!=-1 || rmString.indexOf(exType)!=-1){
            returnValue = "<embed src=\""+Url+"\" width=\""+swf_width+"\" height=\""+swf_height+"\" type=\"application\/x-mplayer2\" autostart=\"true\" play=\"true\" loop=\"true\" menu=\"true\"><\/embed>";
        }else if(rmString.indexOf(exType)!=-1){
	    swf_width = videoWidth;
	    swf_height = videoHeight;
            returnValue = "<embed src=\""+Url+"\" width=\""+swf_width+"\" height=\""+swf_height+"\" type=\"audio\/x-pn-realaudio-plugin\" autostart=\"true\" play=\"true\" loop=\"true\" menu=\"true\"><\/embed>";
	}else if(picString.indexOf(exType)!=-1){
            returnValue = "<img src=\""+Url+"\" width=\""+swf_width+"\" height=\""+swf_height+"\" />";
        }else{
	    swf_width = videoWidth;
	    swf_height = videoHeight;
        	returnValue = "<embed src=\""+Url+"\" width=\""+swf_width+"\" height=\""+swf_height+"\" type=\"application\/x-mplayer2\" autostart=\"true\" play=\"true\" loop=\"true\" menu=\"true\"><\/embed>";    
			
        }
    }
	return returnValue;
}







