/**
 * Creates a link to submit the current page to a social bookmarking site.
 * Typical use (inside script tags): socialBookmarkLink("http://del.icio.us/post?url=", "del.icio.us", "/images/delicious.gif", 20);
 *
 * @param submitURL the bookmarking site's URL for submissions, including any query string parameters up to this page's URL
 * @param siteName the bookmarking site's name, used for the link text and the title attribute on the link
 * @param image optional path to an image
 * @param imageHeight optional force the image's height (generates height attribute)
 */
function socialBookmarkLink(submitURL, siteName, image, imageHeight)
{
  link = '';
  if(image != '')
  {
    link += '<img src="' + image + '" ';
    if(imageHeight != '')
    {
      link += 'height="' + imageHeight + '" ';
    }
    link += '/><br />';
  }
  link += '<a href="' + submitURL + location.href + '" title="Submit to ' + siteName + '" target="_blank" >'
	 + siteName + '</a>';

  document.write(link);
}