if(!com) var com = {};
if(!com.inote)
	com.inote = {
		version: '1.1',
		init: function(){
			var action_url = "javascript:(function(){if(document.body&&!document.xmlVersion){var s=document.createElement('script');s.setAttribute('type','text/javascript');s.setAttribute('src','http://note-static.sdo.com/static/js/plugin/plugin.main.js');document.body.appendChild(s)}})();";
			gBrowser.loadURI(action_url);
		},
        
        addToolButton: function(){
            var myId    = "inote-toolbarbutton"; // ID of button to add
            var afterId = "urlbar-container";    // ID of element to insert after
            var navBar  = document.getElementById("nav-bar");
            var curSet  = navBar.currentSet.split(",");

            if (curSet.indexOf(myId) == -1) {
                var pos = curSet.indexOf(afterId) + 1 || curSet.length;
                var set = curSet.slice(0, pos).concat(myId).concat(curSet.slice(pos));

                navBar.setAttribute("currentset", set.join(","));
                navBar.currentSet = set.join(",");
                document.persist(navBar.id, "currentset");
                try {
                    BrowserToolboxCustomizeDone(true);
                }
                catch (e) {}
            }
        }
	};
com.inote.addToolButton();