I would go ahead and grab this small utility and in it you will find functions to this for you. Here's a short example: