var BASE_PATH = "/oms"; if (typeof(POPUP_BLOCK_STRING) != "string") POPUP_BLOCK_STRING = "To use Player, your web browser must allow pop-up windows. For information about allowing pop-up windows, see the instructions for your pop-up blocking software. "; if (typeof(PARAMETER_ERROR) != "string") PARAMETER_ERROR = "Invalid parameter!" function play(partid, nid,fee) { if(fee>0) { //节目费用为"+fee+"元, if(!window.confirm("当前节目非包月/包年用户只能免费体验5分钟,确定继续点播?")){ return false; } } var nPartId = 0; var nNodeId = 0; if (typeof(partid) == "undefined" || typeof(nid) == "undefined") { alert(PARAMETER_ERROR); return; } nPartId = partid; nNodeId = nid; var nPlayerWidth = 340; var nPlayerHeight = 340; strUrl = BASE_PATH + "/play.act?partId=" + nPartId + "&nodeId=" + nNodeId; /** strFeatures = "";//"left=100,top=50,status=yes,toolbar=no,menubar=no,location=no,resizable=yes,scrollbars=no,width=" + //(nPlayerWidth) + ",height=" + (nPlayerHeight); **/ //var strFeatures="dialogHeight:600;dialogWidth:800; status:yes;toolbar:no;menubar:no;location:no;resizable:yes"; //var hPWnd = window.showModalDialog(strUrl,"",strFeatures); var strFeatures="left=100,top=50,status=yes,toolbar=no,menubar=no,location=no,resizable=yes"; try { var hPlayerWnd = top.open(strUrl, "OMS_PLAYER", strFeatures); hPlayerWnd.focus(); //window.location.href = strUrl; }catch (e) { alert(POPUP_BLOCK_STRING); } } function download(partid, nid) { var nPartId = 0; var nNodeId = 0; if (typeof(partid) == "undefined" || typeof(nid) == "undefined") { alert(PARAMETER_ERROR); return; } nPartId = partid; nNodeId = nid; var nPlayerWidth = 340; var nPlayerHeight = 340; strUrl = BASE_PATH + "/member/download.jsp?partid=" + nPartId + "&nodeid=" + nNodeId; strFeatures = "left=100,top=50,status=yes,toolbar=no,menubar=no,location=no,resizable=yes,scrollbars=no,width=" + (nPlayerWidth) + ",height=" + (nPlayerHeight); try { var hPlayerWnd = top.open(strUrl, "OMS_PLAYER", strFeatures); hPlayerWnd.focus(); } catch (e) { alert(POPUP_BLOCK_STRING); } }