Namespace.Manager.Register('Portfolio.Bookmarks');
Portfolio.Bookmarks.PostUrl = null;
Portfolio.Bookmarks.GetUrl = function(t, u) { return String.format(this.PostUrl, this.encode(u), this.encode(t)); }
Portfolio.Bookmarks.encode = function(p) { return escape(p); } //encodeURIComponent ? encodeURIComponent(p) : escape(p); }
Portfolio.Bookmarks.Add = function(title, url, callback) {
    // todo: handle missing params
    // todo: handle missing refeences, WebWindow
    var options = { width: 780, height: 675, dragenabled: true, resize: true };
    var url = this.GetUrl(title, url);
    var addWin = MsgWindow.open('AddBookmark', 'iframe', url, "Add Bookmark", options);
    addWin.onclose = function() {
        if (callback && typeof (callback) == 'function')
            callback();
        return true;
    }
}
Portfolio.Bookmarks.PostUrl='http://www.pdesas.org/module/edfx/portfolio/post.ashx?bkurl={0}&title={1}';
