日期:2014-05-16 浏览次数:20348 次
function show_video(video_url){
$("#dis_video").empty();
$("#gray_div").css({ display: "none"});
$("#dis_video").css({ display: "none"});
$("#gray_div").css({ display: "block", height: $(document).height() }).toggle(500, function(){
$("#gray_div").slideDown(500);
$('#dis_video').fadeIn(500); });
document.documentElement.scrollTop = 0;
var objs = "";
objs += "<OBJECT id=player WIDTH=500 HEIGHT=400 CLASSID=CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95";
objs += " CODEBASE=http://activex.microsoft.com/activex/controls/mplayer/en/ nsmp2inf.cab#Version=6,4,5,715 STANDBY=Loading Microsoft? Windows Media? Player components... TYPE=audio/mpeg>";
objs += "<PARAM NAME=FileName id=ourl VALUE='../videos/"+video_url+"'>";
objs += "<PARAM NAME=ShowControls VALUE=true>";
objs += "<PARAM NAME=AutoRewind VALUE=true>";
objs += "<PARAM NAME=ShowStatusBar VALUE=true>";
objs += "<PARAM NAME=AutoStart VALUE=true>";
objs += "<param name=AutoSize value=false />";
objs += "<embed src='../videos/"+video_url+"' WIDTH=500 HEIGHT=400 AutoSize=false></embed>";
objs += "</OBJECT>";
objs += "<p>关闭</p>";
$("#dis_video").append(objs);
$("#dis_video").css({
"display": "block",
"position": "absolute",
"width": 500,
"height": 440,
"top": (document.documentElement.clientHeight-440)/2+$(document).scrollTop(),
"left": (document.documentElement.clientWidth-500)/2
});
$("#dis_video p").click(function(){
var player = document.getElementById("player");
player.stop();
$("#dis_video").hide(500);
$("#gray_div").hide(500);
});
}