[eluser]CroNiX[/eluser]
Yeah, I just typed it off the top of my head in like 30 seconds. Wasn't meant to be cut/paste, but as an idea to use. Glad it's working.
As an afterthought you might want to return NULL instead of FALSE if it isn't set/found so you can actually have a FALSE value if you wanted.