var controlIdPrefix = "";

function processFile(contentId)
{
	var stream = getId("radVideoType_0");
	var download = getId("radVideoType_1");
	var contentIdHidden = getId("contentId");
	var url = getId("contentURL" + contentId);
	var downloadFilename = getId("downloadFilename" + contentId);
	var submitForm = false;
	
	if(stream.checked)
        window.open(url.value,'vtsStream',config='width=260,height=265,resizable=yes,scrollbars=no,toolbar=no,menubar=no,location=no,statusbar=no');
	else if(download.checked)
	{
		if(downloadFilename.value == "")
			alert("This content is not currently available for download.");
		else
			submitForm = true;
	}
	else
		alert("Please select whether you want to stream or download this content.");
	
	if(submitForm)
	{
		contentIdHidden.value = contentId;
		document.forms[0].submit();
	}
}

function getId(id, useControlPrefix)
{
    if((useControlPrefix == undefined) || (useControlPrefix == true))
        id = controlIdPrefix + id;
 
    return document.getElementById(id);
}
