I'm not sure that you can do this with javascript. I've never heard about anyone using javascript to do this. More likely with php and .NET.
Read the first post from 'Bryce' here: http://forums.digitalpoint.com/showthread.php?t=859983 How does he do? This is a copy/paste:
As far as I know this isn't possible; Javascript doesn't allow you to make a connection to another server (unless you bypass security measures, thus finding a very dangerous leak).
You're correct: I also believe this is not possible. javascript can only connect to the originating domain which is useless in the idea to get the PR