﻿// Orquestra Metropolitana de Lisboa

// Múltiplos Votos
function CheckMultipleVotes(VoteID) {
  MaxVotes = 3;
  activatedCheckBox = '#PollVote' + VoteID;
  
  var t = 0;
  var ListOfCheckBoxes = $('#Poll_OML input');
  $.each(ListOfCheckBoxes, function(i, val) {
    if ($(this).attr('checked')) {
      t++;
    }
  });
  
  if (t>MaxVotes) {
    $(activatedCheckBox).attr('checked', false);
    alert("Só pode escolher até " + MaxVotes + " temas no máximo.");
  }
}