<?xml version="1.0" encoding="utf-8"?>
<window screenLeft="3" screenTop="27" width="384" height="128" titleBar="false" resizeMargins="0,0,0,0" onload="shutdownInit();">
	<script src="common.js" />
	<script>
	<![CDATA[
	// 返回 1，表示确认关机；其他值取消关机
		function shutdownInit()
		{
			window.timing = 30; // 倒计时 30 秒
			setHintValue();
			window.timginInterval = window.setInterval("shutdownTiming();", 1000);
		}
		function shutdownTiming()
		{
			window.timing = window.timing - 1;
			if (window.timing == 0)
			{
				window.clearInterval(window.timginInterval);
				window.timginInterval = 0;
				window.returnValue = 1;
				window.close();
				return;
			}
			setHintValue();
		}
		function setHintValue()
		{
			var hintStr = "";
			hintStr += window.timing;
			hintStr += "秒后执行定时关机";
			$("timingHint").value = hintStr;
		}

		function OnCancel()
		{
			window.returnValue = 0;
			window.close();
		}
	]]>
	</script>
	<subwindow left="0" top="0" width="384" height="145">
		<!-- top left -->
		<subwindow left="0" top="0" width="80" height="27" backgroundImage="bg_left_top.bmp" clippingColor="#FF00FF" />
		<!-- top -->
		<subwindow left="80" top="0" width="296" height="27" backgroundImage="bg_top.bmp" clippingColor="#FF00FF" horizontalAlignment="stretch" backgroundImageStretchMode="stretch" backgroundColor="#000000"/>
		<!-- top right -->
		<subwindow left="376" top="0" width="8" height="27" backgroundImage="bg_right_top.bmp" clippingColor="#FF00FF" horizontalAlignment="right"/>
		<!-- right -->
		<subwindow left="382" top="27" width="2" height="116" backgroundImage="bg_right.bmp" clippingColor="#FF00FF" horizontalAlignment="right" verticalAlignment="stretch" backgroundImageStretchMode="stretch" backgroundColor="#000000" />
		<!-- bottom right -->
		<subwindow left="382" top="143" width="2" height="2" backgroundImage="set_bg_right_bot.bmp" clippingColor="#FF00FF" horizontalAlignment="right" verticalAlignment="bottom" />
		<!-- bottom -->
		<subwindow left="2" top="143" width="380" height="2" backgroundImage="set_bg_bot.bmp" clippingColor="#FF00FF" horizontalAlignment="stretch" verticalAlignment="bottom"  backgroundImageStretchMode="stretch" backgroundColor="#000000"/>
		<!-- bottom left -->
		<subwindow left="0" top="143" width="2" height="2" backgroundImage="set_bg_left_bot.bmp" clippingColor="#FF00FF" horizontalAlignment="left" verticalAlignment="bottom" />
		<!-- left -->
		<subwindow left="0" top="27" width="2" height="116" backgroundImage="bg_left.bmp" clippingColor="#FF00FF" horizontalAlignment="left" verticalAlignment="stretch" backgroundImageStretchMode="stretch" backgroundColor="#000000"/>
		<!-- center -->
		<subwindow left="2" top="27" width="380" height="116" horizontalAlignment="stretch" verticalAlignment="stretch" backgroundColor="#efefef">
		</subwindow>
		<!-- close button -->
		<button left="352" top="0" width="26" height="23" image="close.bmp" hoverImage="close_hover.bmp" downImage="close_down.bmp" onclick="window.close();" tooltip="关闭"/>

		<label id="timingHint" left="24" top="58" width="300" height="18" value="" fontFace="Arial" fontStyle="bold" fontSize="14"  backgroundColor="#efefef" textAlignment="left vcenter" passThrough="true"/>
	
		<button left="294" top="90" width="70" height="27" image="button.bmp" hoverImage="button_hover.bmp" downImage="button_down.bmp" onclick="OnCancel();">
			<label left="0" top="0" width="70" height="27" value="取消关机" passThrough="true" textAlignment="center vcenter"/>
			<label id="windowTitle" left="74" top="4" width="380" height="18" value="定时关机" fontFace="Arial"  fontSize="13"  foregroundColor="#efefef" passThrough="true" textAlignment="left vcenter" fontStyle="bold"/>
		</button>
	</subwindow>
</window>