$(document).ready(function()
{
    var oldOrders = [];
    $('.select-order').each(function()
    {
        if($(this).val()) oldOrders.push($(this).val());
    });

    $('#ajaxForm').attr('id', 'contractForm');
    $.setAjaxForm('#contractForm', '', function()
    {
        var newOrders = [];
        $('.select-order').each(function()
        {
            if($(this).val()) newOrders.push($(this).val());
        });

        for(var i = 0; i < oldOrders.length; i ++)
        {
            if(newOrders.indexOf(oldOrders[i]) < 0)
            {
                var confirmResult = confirm(v.removeQuotation);
                if(confirmResult) $('#remove').val('yes');
            }
        }
    });
});
