How to unlock/lock cursor

What the title says

The Scripting API is your very best friend. Please use it. If you have a specific question relating to it I can try to get back and assist you. But please use the tools given to us by Unity, people will get at you all crazy for not doing your homework before writing a question. Also searching for the same issue already on the boards will help you immensely as well. Not ranting just letting you know quicker ways to get your answers.

Good Luck