rem:   var pref = Components.classes['component: if (pref) { pref = pref.getService();   pref = pref.QueryInterface(Components.interfaces.nsIPref); if ( pref ) { var homebutton = document.getElementById("home-button") if ( homebutton ) { var defaultURL = homebutton.getAttribute("defaultURL" );  pref.SetDefaultCharPref( "browser.startup.homepage",defaultURL); } } }  
context:   function Startup()  {    // Position window.    var win = document.getElementById( "main-window" );    if (win) {      var x = win.getAttribute( "x" );      var y = win.getAttribute( "y" );      // dump(" move to "+x+" "+y+"\n");      window.moveTo( x, y );    }    //  TileWindow();    // Make sure window fits on screen initially   // FitToScreen();		// Set default home page	 var pref = Components.classes['component://netscape/preferences'];     if (pref)     {     	pref = pref.getService();     	// dump("QIing for pref interface\n");     	     	pref = pref.QueryInterface(Components.interfaces.nsIPref);      	if ( pref )      	{         	var homebutton = document.getElementById("home-button")      		if ( homebutton )      		{      			var defaultURL = homebutton.getAttribute("defaultURL" );      		//	dump("Set default homepage to +"+defaultURL+" \n");      			pref.SetDefaultCharPref( "browser.startup.homepage",defaultURL);      		}      	}      }	    // Create the browser instance component.    createBrowserInstance();    if (appCore == null) {        // Give up.        window.close();    }    // Initialize browser instance..    appCore.setWebShellWindow(window);        tryToSetContentWindow();	    // Add a capturing event listener to the content window so we'll    // be notified when onloads complete.    window.addEventListener("load", UpdateHistory, true);    window.addEventListener("load", UpdateBookmarksLastVisitedDate, true);	 // Check for window.arguments[0].  If present, go to that url.    if ( window.arguments && window.arguments[0] ) {        // Load it using yet another psuedo-onload handler.        onLoadViaOpenDialog();    }  }
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/54e1c3075b2211ab508f8f16140d6938ff3b322c/navigator.js/clean/xpfe/browser/resources/content/navigator.js