Retweet script

I have been trying to find a script for retweeting. I have used this method

<script language=JavaScript>

document.write (‘<a href="’);
document.write(‘ Out-Add’+document.title.replace(/ /g,‘+’)+’ To =‘+document.URL+’&title=‘+document.title.replace(/ /g,’+‘)+’">‘);
document.write (’<img border=0 src=twitter1.png></a>');

I really don’t know how to do this though… I want a catch all script that detects the url and title…

Take a look at John Resig - Easy Retweet Button