I was hired as an employee to integrate data which initially no projects existed that required programming. It became clear that the method needed to complete one project was going to require some programming. I work from home as an EMPLOYEE and made the decision to contract and pay a programmer to write the code needed.
I rightly suspected the resulting program would be something that could be marketed and am hopeful that my having contracted the work as an employee, using my own money, the intellectual property is protected and not owned by my employer. I did none of the marketable programming myself and no contracts whatsoever have ever been signed.
Can anyone shed light on the legalities involved in this scenario?
Depending on your employment contract, you may not own the IP. Some employment contracts cover IP produced at and outside of work (Google being one of the most cited examples).
When you said that you made a decision to "contract and pay a programmer" to write the code you needed, did you do that through a third party website (e.g., elance, vworker)? If so, those platforms may provide some form of IP transfer from the programmer to yourself (assuming the account is registered only to you).
If you did not use a third party website, did you use some other written contract agreement with the programmer to establish terms of IP ownership? If not, then all you have have is a license to use the programmer's work. The IP belongs to him/her. Payment does not confer automatic IP ownership. IP ownership can only be transferred in full via a written agreement.
Can anyone shed light on the legalities involved in this scenario?A lot of litigation and legal expenses.
Generally, IP created by an employee is owned by the employer. How was the IP created, is rarely an issue. The problem here is not that you may own the IP - you may not. The problem is that your contractor may own the IP. You just put your employer in a dangerous spot, you don't have much to gain from it, only get fired.