Gilligan Goes Gung-Ho

"Gilligan Goes Gung-Ho" is the 83rd episode of Gilligan's Island and the 15th episode of the third season.

Synopsis
Gilligan sees the Professor; Mary Ann and Ginger rehurses a play....Gillgian thinks its real! This results in Skipper becoming a Sherriff and Gilligan is his deputy. Unfortunetly Gilligan takes his job too seriously and locks eveyone up...including HIMSELF! Meanwhile a Coast Guard plane flies over the Island....

Trivia
This is similar to an epsiode of the Andy Griffith Show where Deputy Barney Fife is left in charge for one day..and locks up eveyone in town!