rem: var windowManager = Components.classes['component: 
add: var windowManager = Components.classes['@mozilla.org/rdf/datasource;1?name=window-mediator'].getService(); 
context: function TileWindow(){	var xShift = 25;	var yShift = 50;	var done = false;	var windowManager = Components.classes['component://netscape/rdf/datasource?name=window-mediator'].getService();	dump("got window Manager \n");	var	windowManagerInterface = windowManager.QueryInterface( Components.interfaces.nsIWindowMediator);		var enumerator = windowManagerInterface.getEnumerator( null );		var xOffset = screen.availLeft;	var yOffset = screen.availRight;	do	{		var thisWindow = windowManagerInterface.convertISupportsToDOMWindow ( enumerator.getNext() );		if ( (thisWindow.screenX == screenX) && (thisWindow.screenY == screenY) )		{			alreadyThere = true;			break;		}		} while ( enumerator.hasMoreElements() )		if ( alreadyThere )	{		enumerator = windowManagerInterface.getEnumerator( null );		do		{			var thatWindow = windowManagerInterface.convertISupportsToDOMWindow ( enumerator.getNext() );			if ( (thatWindow.screenX == screenX+xOffset*xShift+yOffset*xShift) &&			     (thatWindow.screenY == screenY+yShift*xOffset) &&			     (window != thatWindow) )			{				xOffset++;				if ( (screenY+outerHeight  < screen.availHeight) && (screenY+outerHeight+yShift*xOffset > screen.availHeight ) )				{					// dump(" increment yOffset");					yOffset++;					xOffset = 0;				}				enumerator = windowManagerInterface.getEnumerator( null );			}			} while ( enumerator.hasMoreElements() )	}		if ( xOffset > 0 || yOffset >0 )	{		// dump( "offsets:"+xOffset+" "+yOffset+"\n");		// dump("Move by ("+ xOffset*xShift + yOffset*xShift +","+ yShift*xOffset +")\n");		moveBy( xOffset*xShift + yOffset*xShift, yShift*xOffset );	}}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/0257791053c2b38e1dfaf2ee11afae973e82e394/navigator.js/buggy/xpfe/browser/resources/content/navigator.js