Special rules pertain when you invent something while working for a company, and depending upon the patent trademark law of the state you live in, it may be difficult for you to make a cent off such an invention. Even if you invent something in your spare time your company may have a claim on it, so be sure to consult a patent attorney before you patent anything.