ConfirmIt Duplicate answers in the open text fields

Check for duplicate answers in several open-text fields.

//surveyscripting.com

//making all of the values lower case so we can compare the case-sensitive
var a = f('q1')['1'].get().toLowerCase();
var b = f('q1')['2'].get().toLowerCase();
var c = f('q1')['3'].get().toLowerCase();
var d = f('q1')['4'].get().toLowerCase();

if (a == b || a == c || a == d || b == c || b == d || c == d)
{
  RaiseError();
  SetQuestionErrorMessage(CurrentLang(), "Plaese select different answers.");
}