To check if two values are equal in JavaScript, you need to use "==" instead of "=".
You can keep your alert if you want, but you'll also need to set the error message so that the page does not submit.
if (FLY1 == FLY2)
{
alert("You cannot select the same statement.");
strErrorMessage = "You cannot select the same statement.";
}