var shareSection = null;
var shareUrl = null;
var sTitle = "Thompson Hotels - Blog";
var sSummary = "";
var bConcatenate = true;
var sImage = "images/th-logohome.gif";
function shareIt(type, title, summary)
{
 if(title == null) title = sTitle;
 if(summary == null) summary = sSummary;
 if (type != null)
 {
 var URL = "";
 var Bookmark = location.href;
var Title = escape(title);
 var Content = escape(summary);
 switch (type.toLowerCase())
 {
 case "linkedin":
 URL = "http://www.linkedin.com/shareArticle?mini=true&url="+Bookmark+"&title="+Title+"&summary="+Content+"&source="+BookmarkRoot;
 window.open(URL);
 break;

 case "digg":
 URL = "http://digg.com/remote-submit?phase=2&url="+Bookmark+"&title="+Title+"&bodytext="+Content; //"&topic=510"; <.food and drink??? 509 autos
 window.open(URL);
 break;

 case "delicious":
 URL = "http://del.icio.us/post?url="+Bookmark+"&title="+Title+"&description="+Content;
 window.open(URL);
 break;

 case "myspace":
 URL = "http://www.myspace.com/index.cfm?fuseaction=postto&u="+Bookmark+"&t="+Title+"&c=";
 URL += "<img src='"+sImage+"' /><br />";
 URL += Content;
 window.open(URL);
 break;

 case "twitter":
 if(bConcatenate)
 Content = Bookmark+" "+Title+"-"+Content;
/* Content = Content.substr(0,140);
 if(Content.length == 140)
 Content = Content.substr(0, 137)+"...";*/
 URL = "http://twitter.com/home?status="+Content;
 window.open(URL);
 break;

 case "facebook":
 URL = "http://www.facebook.com/sharer.php?u="+Bookmark+"&t="+Title;
 window.open(URL);
 break;

 case "blogger":
 URL = 'http://www.blogger.com/blog_this.pyra?t='+Content+'&u='+Bookmark+ '&n=' + Title;
 window.open(URL);
 break;
 }
 }
} 