Well, this is the code they have here, I just changed it to use a button instead of an image.
<script type="text/javascript">
function addBookmark(url,title) {
if (window.sidebar) { // Mozilla Firefox Bookmark
window.sidebar.addPanel(title, url,"");
} else if( window.external ) { // IE Favorite
window.external.AddFavorite( url, title); }
else if(window.opera && window.print) { // Opera Hotlist
return true; }
}
</script>
<input type="button" value="favorite!" onclick="addBookmark('http://www.scriptingok.com/','Scripting Ok!...');" />
Since the favorites belongs to the browser, each browser has a different method to add their favorites.