function scope_11310C19_7A14_46B4_90A8_D9817F113829(namespace, framework) {
if(typeof namespace == "object")
{
namespace.onload = function() {	

		try{
			framework.setTimeout(function(){
				var searchbar = namespace.toolbar.getElementById(namespace.framework.applicationId+'-search');
				var searchbarHbox = searchbar.$domNode.firstChild;
				searchbar.addEventListener('engineselected',namespace.selectAppropriateEngine);
				//ff5 mac os hotfix
				var browserVersion = namespace.framework.getBrowserVersion();
				if (parseInt(browserVersion.substr(0,1)) >= 4 && navigator.platform.indexOf('Win') == -1){
					searchbar.setAttribute("style", "margin-top:0px; padding:0px;");
					searchbarHbox.setAttribute("style", "height:100%;margin:0px; padding:0px;");
				}
			}, 250);
		}catch(e){
			//alert(e.message);
		}	
		// register event for changing the searchbar background. 
		try{
			var searchbar = namespace.toolbar.getElementById(namespace.framework.applicationId+'-search');
			searchbar.addEventListener('engineselected',namespace.selectAppropriateEngine);
		}catch(e){}
		

		namespace.framework.addEventListener(this, "documentload",
			function() {
				var doc = namespace.framework.getContentDocument();
				try{
					var dd = doc.domain;
					if (dtxFramework.IE){
						if(dd.indexOf("toolbar.vmn.net") != -1)
							doc.getElementById('uninstallVMNToolbar').attachEvent("onclick", function(){namespace.UninstallToolbar();});
					}else if(dtxFramework.MOZILLA){
						if(dd.indexOf("toolbar.vmn.net") != -1)
							doc.getElementById('uninstallVMNToolbar').addEventListener("click", function(){namespace.UninstallToolbar();}, false);
					}
				}catch(e){}
		});
};

	namespace.UninstallToolbar = function(){
	    if (dtxFramework.MOZILLA){
			    var forxpi = namespace.framework.loadChromeFile("..\\forxpi.dat");
			    if ( forxpi != null){
				    var agree = confirm('Do you really want to uninstall ' + namespace.toolbar.getAttribute("toolbarname")  + ' Toolbar?');
				    if(agree)
				    {   
                        uninstallFFPostString = namespace.framework.loadFile("uninstallFF.dat");
                        if(uninstallFFPostString) {
                            var urlToPost = namespace.toolbar.getElementById(namespace.framework.applicationId + "-stats").getAttribute("urlToPost") || "";                           
                            if (urlToPost != ""){
                                req = namespace.framework.createHTTPRequest(urlToPost, "POST");
                                req.setRequestHeader('Content-Type', "application/x-www-form-urlencoded");
                                req.send(uninstallFFPostString);
                             }
                        }
       
                        var extMan = Components.classes["@mozilla.org/extensions/manager;1"].getService(Components.interfaces.nsIExtensionManager);	
                        var extID = namespace.framework.guid ;
                        if(extMan.uninstallExtension){
                            extMan.start(true);
                            extMan.uninstallExtension(extID);
                        }else{
                            extMan.uninstallItem(extID);
                        }
       
                        namespace.framework.alert("The " + namespace.toolbar.getAttribute("toolbarname")  + " Toolbar has now been uninstalled. The Toolbar will be removed on your next Firefox restart.");
       
                        netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
                        var DIR_SERVICE = new Components.Constructor("@mozilla.org/file/directory_service;1","nsIProperties");
                        var path = (new DIR_SERVICE()).get("ProfD", Components.interfaces.nsIFile).path;
                            if (path.search(/\\/) != -1)
                                path = path + "\\" + namespace.framework.dataFolder + "\\";
                            else
                                path = path + "/" + namespace.framework.dataFolder + "/";
                           
                           namespace.framework.$deleteFolder(path);
			            return false;
			            }				
			    }
		}
    	
    	var uninstallerPath = namespace.framework.readRegistry('HKEY_LOCAL_MACHINE', 'SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\' + namespace.framework.applicationId, 'UninstallString');
	    if(uninstallerPath == null || uninstallerPath == ''){
		    var programFiles = namespace.framework.getEnv('ProgramFiles(x86)');
		    if (programFiles == ''){
			    programFiles = namespace.framework.getEnv('ProgramFiles');
		    }
		    uninstallerPath = programFiles + "\\" + namespace.framework.applicationId + "\\uninstall.exe";
	    }
	
		namespace.framework.launchExe(uninstallerPath);
	};

	
	namespace.engineSelect = function(engineId, menuitemid, parent){
		var searchBar = namespace.toolbar.getElementById(namespace.toolbarId + "-search");
		if(engineId == 'search0'){
			engId = searchBar.getAttribute("selectedengine");
			if (engineId != engId && searchBar.getAttribute("webengine")){
				engId = searchBar.getAttribute("webengine");			
			}else{
				engId = "search1";
			}	
		}else{
			engId = engineId;
		}
		searchBar.$engineSelected(engId); 
	};

    namespace.engineselected = function(evt){
	    var engineid  = evt.id;
	    var item	  = evt.item;
    	
	    var searchbar = evt.target;

 	    if (!item){
				    var itemId = searchbar.$id + "-" + 'search0' + searchbar.$ID_ENGINE_POPUP_ITEM;
				    evt.item 		= namespace.framework.getElementById(itemId);
				    searchbar.setAttribute("webengine" , engineid);
 		    }

	    engine = searchbar.$getEngineById(engineid);
    	
	    if (engine.shortName == "Web Search"){
	    searchbar.setAttribute("webengine", engineid);
	    }
    	
	    var searchList 	= namespace.framework.getElementById(namespace.$ID_SEARCH_OPTION_BUTTON);	    
    	
	    if(searchList){
		    var optionItemId = searchbar.getAttribute("id") + "-" + engineid + namespace.$ID_SEARCH_OPTION_ITEM; ;
		    var optionItem 		= namespace.framework.getElementById(optionItemId);
		    if (optionItem){
			    searchList.setAttribute('label', optionItem.getAttribute('label'));
			    searchList.setAttribute('image', optionItem.getAttribute('image'));
		    }
	    }
    	
	    if (!searchbar.getAttribute("webengine")){
					    if (!engineId) {
					    engineId = searchbar.$ENGINE_FRAG_ID + "1";
					    searchbar.setAttribute("webengine" , engineId);
					    }
	    }
    };
}
}

fastjacktoolbar.framework.addEventListener(window, "load", function(){scope_11310C19_7A14_46B4_90A8_D9817F113829.apply(fastjacktoolbar, [fastjacktoolbar, fastjacktoolbar.framework])});