// JScript source code
function openPlayer(contentID, parentCategoryID, categoryID) {
	var height = 597;
	var width = 700;
	
	var top = parseInt((screen.height - height) / 2, 10);
	var left = parseInt((screen.width - width) / 2, 10);

	// Get the subdirectory name.
	var subdirectory = location.pathname;
	subdirectory = "UofCTV";
	
	// Get the server name.
	var server = location.hostname;
	
	if (server != "ksuh" && server != "localhost" && server != "127.0.0.1" && server != "jetdev") server = "www.jetstreammedia.com";
	
	var path = "http://" + server + "/" + subdirectory + "/Viewer/";
	
	var mainPage = "Frames.aspx";
	var urlParams = "?";
	var windowParams = "top=" + top + ",left=" + left + ",toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=" + width + ",height=" + height;
	
	if (contentID != null) {
		urlParams += "&contentID=" + contentID;
	}

	if (parentCategoryID != null) {
		urlParams += "&parentCategoryID=" + parentCategoryID;
	}

	if (categoryID != null) {
		urlParams += "&categoryID=" + categoryID;
	}

	// Open the window.
	window.open(path + mainPage + urlParams, subdirectory, windowParams);
}
