Mentally Ill or Insane

"Mentally Ill or Insane"
If you ask the average person on the street, you will find that many people see the terms mentally ill and insane as interchangeable.
However, you will find out this week that being declared mentally ill and declared insane are often very different.
How does a decree of insanity differ from a diagnosis of mentally ill?
How is insanity defined in the legal system?
What criteria must be met for a judge or jury to find an offender "not guilty because of insanity"?
In recent years an additional plea has come into play - "guilty but mentally ill." How does this differ from a plea of "not guilty because of insanity"?
What is your personal view of these two pleas?