

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)
{
	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/play.aspx?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);
	}
}

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.aspx?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);
	}
}
