<?xml version="1.0" encoding="utf-8"?>
<window screenLeft="0" screenTop="0" width="305" height="160" titleBar="false" resizeMargins="0,0,0,0" maximizable="false" onload="WindowOnLoad();" >
	<script src="common.js" />
	<script>
	<![CDATA[
		function WindowOnLoad()
		{
			var argument = window.dialogArguments;
			var argArray = argument.split(";");
			var arraySize = argArray.length;

			EwaUnFullScreen();	//退出全屏

			$("lblFirst").value = argArray[0];

			//处理lblSecond
			var delFileIndex = 0;
			if (3 == arraySize)
			{
				$("lblSecond").value = argArray[1];
				$("lblSecond").visible = true;
				delFileIndex = 2;
			}
			else
			{
				$("lblSecond").visible = false;
				delFileIndex = 1;
			}
			
			//处理delFile
			var array = argArray[delFileIndex].split("=");
			if (0 == array[1])
			{
				$("delFile").visible = false;
			}
			else if (1 == array[1])
			{
				$("delFile").visible = true;
			}
			else if (2 == array[1])
			{
				$("delFile").visible = false;
				$("btnOK").moveTo(25, 85);
				$("btnCover").moveTo(115, 85);
				$("btnCover").visible = true;
				$("btnCancel").moveTo(205, 85);
			}

			//调整x位置
			var bSecondVisible = $("lblSecond").visible;
			var bDelFileVisible = $("delFile").visible;
			var iLeftFirst = $("lblFirst").left;
			var iLeftDelFile = $("delFile").left;
			if (bSecondVisible && bDelFileVisible)
			{
				$("lblFirst").moveto(iLeftFirst, 15);
				$("lblSecond").moveto(iLeftFirst, 38);
				$("delFile").moveto(iLeftDelFile, 55);
			}
			else if (bSecondVisible && !bDelFileVisible)
			{
				$("lblFirst").moveto(iLeftFirst, 25);
				$("lblSecond").moveto(iLeftFirst, 53);
			}
			else if (!bSecondVisible && bDelFileVisible)
			{
				$("lblFirst").moveto(iLeftFirst, 25);
				$("delFile").moveto(iLeftDelFile, 50);
			}
			else
				$("lblFirst").moveto(iLeftFirst, 40);
		}

		function CloseWindow()
		{
			window.returnValue = 0;
			window.close();
		}

		function OnCover()
		{
			if ($("btnCover").visible)
			{
				window.returnValue = 3;
			}

			window.close();
		}

		function OnOK()
		{
			if ($("delFile").visible && $("delFile").checked)
			{
				window.returnValue = 2;
			}
			else
				window.returnValue = 1;

			window.close();
		}
	]]>
	</script>
	<subwindow left="0" top="0" width="305" height="160">
		<!-- top left -->
		<subwindow left="0" top="0" width="190" height="32" backgroundImage="small_title_l.png" clippingColor="#FF00FF">
			<label left="30" top="0" width="190" height="32" value="提示" textAlignment="left vcenter" fontSize="14" fontStyle="bold" passThrough="true" foregroundColor="#FFFFFF"/>
		</subwindow>
		<!-- top -->
		<subwindow left="190" top="0" width="20" height="32" backgroundImage="small_title_m.png" clippingColor="#FF00FF" horizontalAlignment="stretch" backgroundImageStretchMode="stretch" backgroundColor="#000000"/>
		<!-- top right -->
		<subwindow left="190" top="0" width="115" height="32" backgroundImage="small_title_r.png" clippingColor="#FF00FF">
			<button id="btnClose" left="83" top="4" width="24" height="24" image="close.png" hoverImage="close_hover.png" downImage="close_down.png" tooltip="关闭" onclick="CloseWindow();"/>
		</subwindow>
		<!-- left frame border-->
		<subwindow left="0" top="32" width="2" height="128" backgroundImage="small_frame_l.png" horizontalAlignment="left" verticalAlignment="stretch" backgroundImageStretchMode="stretch" backgroundColor="#000000"/>
		<!-- right frame border-->
		<subwindow left="303" top="32" width="2" height="128" backgroundImage="small_frame_r.png" horizontalAlignment="right" verticalAlignment="stretch" backgroundImageStretchMode="stretch" backgroundColor="#000000"/>
		<!-- bottom frame border-->
		<subwindow left="2" top="158" width="301" height="2" backgroundImage="small_frame_bottom.png" horizontalAlignment="stretch" backgroundImageStretchMode="stretch" backgroundColor="#000000"/>
		<!-- main subwindow-->
		<subwindow left="2" top="32" width="301" height="126" backgroundColor="#FFFFFF">
			<label id="lblFirst" left="5" top="30" width="295" height="15" value="" passThrough="true" textAlignment="center" fontSize="12" fontFace="宋体" />
			<label id="lblSecond" left="5" top="60" width="295" height="15" value="" passThrough="true" textAlignment="center" fontSize="12" fontFace="宋体" textOverflow="ellipsis"  />
			<checkbox id="delFile" left="64" top="60" width="120" height="25" label="同时删除本地文件" checked="true" />
			<button id="btnOK" left="64" top="85" width="70" height="26" label="确定" image="button.png" hoverImage="button_hover.png" downImage="button_down.png" disabledImage="button_disable.png" onclick="OnOK();" />
			<button id="btnCover" left="64" top="85" width="70" height="26" label="覆盖" image="button.png" hoverImage="button_hover.png" downImage="button_down.png" disabledImage="button_disable.png" onclick="OnCover();" visible="false" />
			<button id="btnCancel" left="164" top="85" width="70" height="26" label="取消" image="button.png" hoverImage="button_hover.png" downImage="button_down.png" disabledImage="button_disable.png" onclick="CloseWindow();" />
		</subwindow>
	</subwindow>
</window>