
function play_video(div_name,file_name,width,height){

    iBoard=document.getElementById(div_name);
    iBoard.innerText = "视频缓冲中...";
    
//    url = location.protocol+"//" + location.hostname + html_name;
//    return_code = openUrl(url);

//    switch(return_code)
//    {
//        case "1":
			var s1 = new SWFObject("/js/mediaplayer.swf","mediaplayer",width,height,"8");
			s1.addParam("allowfullscreen","true");
			s1.addVariable("width",width);
			s1.addVariable("height",height);
			s1.addVariable("file",file_name);
			s1.addVariable("autostart","false");
			s1.addVariable("repeat","false");
			//s1.addVariable("displaywidth",width);
			//s1.addVariable("displayheight",height);
			//s1.addParam("thumbsinplaylist","true");
			//s1.addParam("autoscroll","true");
			//s1.addVariable("searchbar","true");
			s1.write(div_name);
//            break;
//        case "0":
//            infoBoard.innerHTML = "<center>没有视频文件！</center>";
//            break;
//    }
}

function openUrl(url){
    var obj_xml=new ActiveXObject("Microsoft.XMLHttp")
    obj_xml.open("GET",url,false);
    obj_xml.send();
    return_info = obj_xml.responseText;

    if (obj_xml.status == "200")
    {
        return "1";
    }
    else
    {
        return "0";
    }
}