﻿// JScript File

function OnRowDblClick(index)
{
    var row = this.Rows[index];
    
    document.location.href = 
        "GetMimeObject.axd?mediaId=" + row.KeyValues["MediaId"] + 
        "&mimeType=" + encodeURIComponent(row.KeyValues["MimeType"]) + 
        "&filename=" + encodeURIComponent(row.KeyValues["Name"]);
        
    return false;
}

function OnRowSelected(row)
{
}

function CheckUploadFileExists(uploadId)
{
    var uploadButton;
    var path;
    var continuePostback;    
    
    uploadButton = document.getElementById(uploadId);

    if (uploadButton == null) {
        throw 'Cannot find upload button';
    }

    path = uploadButton.value;
    
    if (path == "") {
        continuePostback = false;
    } else {
        continuePostback = true;
    }
    
    return continuePostback; 
}
