﻿var MAX_FIELDS_FOR_VIEWS = 50;      //for PDV view
var MAX_ALL_FIELDS_FOR_VIEWS = 75;      //for global view

var ENTITY_SERIES = "Series";
var ENTITY_POOL = "Pool";
var ENTITY_CLASS = "Tranche";
var ENTITY_CREDITSUPPORT = "CreditSupport";

function SetViewFieldsValidationMessage(selector, fieldLength, whichEntity) {
    $(selector).show().find('span').html('You have selected ' 
                                            + fieldLength 
                                            + ' ' 
                                            + whichEntity 
                                            + ' fields. The number of fields per entity can not be more than '
                                            + MAX_FIELDS_FOR_VIEWS 
                                            + '.');
}

//You have selected <number of selected fields> fields. The number of fields across all entities cannot exceed 75.
function SetTotalViewFieldsValidationMessage(selector, fieldTotalLength) {
    $(selector).show().find('span').html('You have selected '
                                            + fieldTotalLength
                                            + ' '
                                            + ' fields. The number of fields across all entities cannot exceed '
                                            + MAX_ALL_FIELDS_FOR_VIEWS
                                            + '.');
}



