// Trim string if larger than maxlen. Appends '...' to the truncated string if size exceeds maxlen.
String.prototype.trimMax = function(maxlen) {
	return (this.length > maxlen ? this.substring(0,maxlen) + '...' : this); 
}

// Taken from espr.info
function CreateBookmarkLink()
{
            title = document.title;
            url = location.href;

            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;
            }
}



