function attachFile() {
    var n = $('#addfiles>div').length + 1;
    $('#addfiles').append('<div class="changed padded5"><input size="50" type="file" id="file' + n + '" name="file' + n + '" /></div>');
    return false;
}

function removeFile(id) {
    if (!confirm(ServiceLevelResources.SureDeleteFile)) return false;

    $.getJSON('servicelevel.ivp/removefile/' + id, { date: new Date().toString() }, function(result) {
        if (result.hasOwnProperty('IsOK') && result.IsOK == true)
            $('#file' + result.Id).fadeOut('fast').remove();
        else
            alert(result.Description);
    });
    return false;
}