Odd, Even, or Prime

Pardon me if this posts twice!

I am building a site, very simple, which tells a user whether a number is odd or even. Problem is that inputting is via a textField, and Flash needs to convert the String into a Number, then perform an operation such as "if ‘userinput’/2 is an integer, trace “even”, else trace “odd.” Also, is there a utility that would check prime numbers too?

Thanks all,
Rosey500