By All means bill share it.
About the CMS, its really hard to get something like that to work in a CMS if:
A) the CMS is in a different Database
B) the CMS doesnt allow php scripting to take place
C) the CMS has its own cookie system therefore the script might conflict with the CMS
There has been some luck in programs like PHPnuke that allows for Custom User "blocks" some CMS's also feature custom blocks as well. Those are the easiest to be able to make work. Otherwise if you use a CMS and are unable to integrate the code directly into your CMS by modifying your core files the best course of action would have to be an iframe.
You would have better luck incorporating the two if they were on the same database name and the CMS allowed full php scripting. Most CMS's dont allow it cause its too much of a risk. Coding it for a CMS would be different every time cause every CMS is different. I personally wouldnt know about Mambo I am using a early build of a brand new CMS called IONcms and this hack will work perfectly with that CMS as i built it alongside the cms development.
You would need someone who knows Mambo well to integrate it.