<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<!DOCTYPE overlay SYSTEM "chrome://dustmeselectors/locale/dustmeselectors.dtd">

<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" 
	id="dms-spiderdialog" 
	style="padding:12px;" 
	title="&dms.spider.title;" 
	onload="document.getElementById('dms-spider-mapurl').focus();"
	onunload="
		opener.DustMeSelectors_tools.saveDialogProps(this, 'spider');
		DustMeSelectors_spider.stop();
		opener.DustMeSelectors_browser.spiderDialogClosed();
		">

	<script type="application/x-javascript" src="chrome://dustmeselectors/content/base2.js"/>
	<script type="application/x-javascript" src="chrome://dustmeselectors/content/tools.js"/>
	<script type="application/x-javascript" src="chrome://dustmeselectors/content/filesystem.js"/>
	<script type="application/x-javascript" src="chrome://dustmeselectors/content/preferences.js"/>
	<script type="application/x-javascript" src="chrome://dustmeselectors/content/dustmeselectors.js"/>
	<script type="application/x-javascript" src="chrome://dustmeselectors/content/spider.js"/>

	<vbox>
		<stringbundleset>
			<stringbundle id="dms-bundle" src="chrome://dustmeselectors/locale/dustmeselectors.properties"/>		
		</stringbundleset>
		
		<label control="dms-spider-mapurl" value="&dms.spider.enterurl;"/>
		<textbox id="dms-spider-mapurl" flex="1" type="autocomplete" 
			autocompletesearch="history" enablehistory="true" 
			completeselectedindex="true" tabscrolling="true" 
			onkeypress="if(event.keyCode == 13) 
				{ 
					if(!document.getElementById('dms-spider-gobutton').disabled)
						{ DustMeSelectors_spider.spiderSitemap();  }
				}"/>
	</vbox>
	
	<hbox>
		<button id="dms-spider-gobutton" label="&dms.spider.go;" accesskey="&dms.spider.accesskey.go;" 
			oncommand="DustMeSelectors_spider.spiderSitemap();"/>
		<button id="dms-spider-skipbutton" label="&dms.spider.skip;" 
			accesskey="&dms.spider.accesskey.skip;" disabled="true" 
			oncommand="DustMeSelectors_spider.skip();"/>
		<button id="dms-spider-stopbutton" label="&dms.spider.stop;" 
			accesskey="&dms.spider.accesskey.stop;" disabled="true" 
			oncommand="DustMeSelectors_spider.stop();"/>
		<spacer flex="1"/>
	</hbox>
	
	<vbox id="dms-spider-statusbar" hidden="true">
		<groupbox>
			<hbox>
				<hbox flex="1">
					<progressmeter id="dms-spider-progress" flex="1" mode="undetermined"/>
				</hbox>
				<hbox id="dms-spider-statusicons" hidden="true" style="min-width:7em;">
					<spacer flex="1"/>
					<label id="dms-spider-statuslabel"/>
					<image id="dms-spider-statusicon" width="16" height="16" 
						style="cursor:pointer;" flex="0"  
						src="chrome://dustmeselectors/content/statusicon_busy.gif" 
						tooltiptext="&dms.menu.stop;" 
						onclick="if(!event.button) { DustMeSelectors_spider.stop(); }"/>
				</hbox>
			</hbox>
		</groupbox>
	
		<label id="dms-spider-currenturl"/>
		<browser id="dms-spider-browser" collapsed="true"/>
	</vbox>
	
	<separator class="groove-thin" flex="1" style="margin:5px 0 0 0;"/>
	
	<hbox style="margin:5px 0 0 0;">
		<button id="dms-spider-view" label="&dms.spider.view;" 
			accesskey="&dms.spider.accesskey.view;" 
			oncommand="DustMeSelectors_spider.viewSavedSelectors(true);"/>
		<spacer flex="1"/>
		<button label="&dms.spider.okay;" 
			accesskey="&dms.spider.accesskey.okay;" oncommand="window.close();"/>
	</hbox>
	
</window>
