<link href="css.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="aol.js"></script>
<script language="javascript" src="js/errorcode.js"></script>
<script src="js/comm.js"></script>
<script>
_import("product");_import("function");
	
	
	
	_import("control");
	//alert("start");
</script>
<script language="javascript">
if(FarstoneProductFlag_md=="DCPER")
{
	document.write('<OBJECT tabindex="-1" id="fileBackupCom" style="WIDTH: 0px; HEIGHT: 0px" 		classid="clsid:E8F2A56C-BD3A-4369-AC28-2A6992A4FCBB" VIEWASTEXT></OBJECT>');
}
else if(FarstoneProductFlag_md=="DCPRO" || FarstoneProductFlag_md=="DCSER")
{
	document.write('<OBJECT tabindex="-1" id="fileBackupCom" style="WIDTH: 0px; HEIGHT: 0px" 		classid="clsid:E8F2A56C-BD3A-4369-AC28-2A6992A4FC84" VIEWASTEXT></OBJECT>');
}
</script>
<script language=vbscript>
sub fileBackupCom_BackupInfo(id, msg)  
    call EFBEventFunction(id,msg)
end sub
</script>
<style type="text/css">
<!--
#Layer1 {
	position:absolute;
	left:295px;
	top:7px;
	width:20px;
	height:22px;
	z-index:10;
}
-->
</style>
<body style="overflow:hidden;" onkeydown="return testCode(event.keyCode)">
<table width="315" border="0" cellspacing="0" cellpadding="0" id="boxwidth">
  <tr>
    <td background="images/alert_msg_r1_c5.jpg" onMouseDown="moveWindow();"><table width="181" height="29" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="181" background="images/alert_msg_r1_c1.jpg" style="background-repeat:no-repeat;">&nbsp;</td>
      </tr>
    </table></td>
    <td background="images/alert_msg_r1_c5.jpg" onMouseDown="moveWindow();">&nbsp;</td>
    <td valign="top" background="images/alert_msg_r1_c5.jpg" onMouseDown="moveWindow();"><table width="50" border="0" align="right" cellpadding="0" cellspacing="0" style="background-image:url(images/alert_msg_top_right.jpg); background-repeat:no-repeat; background-position:right;">
      <tr>
        <td height="7" colspan="3"><img name="" src="" width="1" height="1" alt="" /></td>
      </tr>
      <tr>
        <td width="35" align="right"><table width="17" height="16" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td class="arial11black"  >&nbsp;</td>
          </tr>
        </table></td>
        <td width="17" align="right"><table width="17" height="16" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td style="" background="images/alert_exit.gif" class="arial11black" onClick="window.external.OnClose();" onMouseOver="isMove=false;" onMouseOut="isMove=true;">&nbsp;</td>
          </tr>
        </table></td>
        <td width="10" align="right"><table width="10" height="16" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td class="arial11black" style="background-repeat:repeat-y; background-position:right;"><img name="" src="" width="1" height="1" alt="" /></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td colspan="3"><table width="62" height="6" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td><img name="" src="" width="1" height="1" alt="" /></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td colspan="3"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td valign="top"><img src="images/alert_msg_r4_c1.jpg" width="9" height="6" /></td>
        <td><img src="" width="1" height="1" alt="" /></td>
        <td align="right" valign="top"><img src="images/alert_msg_r4_c11.jpg" width="9" height="6" /></td>
      </tr>
    </table>
        <table width="100%" height="110" border="0" cellpadding="0" cellspacing="0" id="boxheight">
          <tr>
            <td width="10" align="left" valign="bottom" background="images/alert_msg_r5_c1.jpg" style="background-position:left; background-repeat:repeat-y;">&nbsp;</td>
            <td align="center" valign="top" class="Arial12blackbold" style="background-repeat:repeat-x; background-position:bottom; padding-top:18px;">Erasing your disc. Please wait. <br>
                <br>
              <table width="307" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td align="center" style="padding-right:4px;"><table width="260" border="0" cellspacing="0" cellpadding="0" style="margin-left:10px;">
                      <tr>
                        <td width="2" valign="top" class="arial11black" style="height: 14px"><img src="images/progressleft.jpg" width="2" height="15"></td>
                        <td width="256" valign="top" background="images/progresswaiting.jpg" class="arial11black" style="background-position:top; background-repeat:repeat-x; height: 14px;"><img id="progressBlue" src="images/progressfinished.jpg" width="5" height="15"></td>
                        <td width="2" valign="top" class="arial11black" style="height: 14px"><img id="progress_left" src="images/progressright.jpg" width="2" height="15"></td>
                      </tr>
                  </table>                    <a href="javascript:Cancelp();" ></a></td>
                </tr>
              </table>
            <br>
            <br></td>
            <td width="10" align="right" valign="bottom" background="images/alert_msg_r5_c10.jpg" style="background-position:right; background-repeat:repeat-y;">&nbsp;</td>
          </tr>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="5%" valign="top" background="images/alert_msg_bottom_center.jpg" style="background-position:top; background-repeat:repeat-x;"><img src="images/alert_msg_bottom_left.jpg" width="9" height="12" /></td>
            <td width="90%" background="images/alert_msg_bottom_center.jpg" style="background-position:top; background-repeat:repeat-x;">&nbsp;</td>
            <td width="5%" align="right" valign="top" background="images/alert_msg_bottom_center.jpg" style="background-position:top; background-repeat:repeat-x;"><img src="images/alert_msg_bottom_right.jpg" width="9" height="12" /></td>
          </tr>
      </table></td>
  </tr>
</table>
<script language="jscript">
	var isMove=true;
	var canceled=false;
	function moveWindow()
	{
		if (isMove)
		{
			window.external.OnMoveWindow();
		}
	}
	
	document.body.onload=function()
	{
		window.external.PendClose(true);
		var did=Request("dvcId");
		//alert("did:"+did);
		did=parseInt(did);
		var fRst=fileBackupCom.StartEraseDisc(did);
		//alert("the start of Erase :"+fRst)
		go90();
	}
	function testCode(id)
	{
		if(id==13)
		{
			//window.external.OnClose();
			return false;
			
		}
	}
	
	function setSD(str)
	{
		window.external.SetStaticData(str);
		window.external.PendClose(false);
		window.external.OnClose();
	}

function go90()
{
	if (canceled)
	{
		return;
	}
	var obj1;
	ipro=fileBackupCom.GetErasePoint();
	//leftTimeStr=fileBackupCom.GetBackupLeftTime();
	//ipro+=2;
	obj1=document.getElementById("progressBlue");
	obj1.style.width=256*(ipro/100)+"px";
	//if(leftTimeStr>60)
	//{
	    //var minit=Math.floor((leftTimeStr+30)/60)
	    //document.getElementById("backupfilelefttime").innerHTML="About "+minit+" minute(s) remaining";
	//}
	//else
	//{
	    //document.getElementById("backupfilelefttime").innerHTML="About "+leftTimeStr+" seconds remaining";
	//}
	//document.getElementById("progressinfo").innerHTML="Less than 1 minute remaining."
	if (ipro<100)
	{
		timeOut1=setTimeout("go90()",1000);
	}
	else
	{
		//alert("finish")
		window.external.PendClose(false);
		window.external.OnClose();
		//parent.demaskLeftMenu();
		//window.location="FileBackupDone.htm?dstLocation="+escape(pDst);
	}
}


function EFBEventFunction(id, msg)
{
  //alert("id"+id);
  //alert("msg"+msg);
	if (id==4)
	{
	
	
		var len = msg.length;
		var tmpMsgRight4=msg.substring(len-4);
		if (tmpMsgRight4.toLowerCase()=="7135")
		{
			//var rst1=DC3RIT_popMsg('',264,135,'ok',"No new added or modified file in the backup.",'info');
			//window.external.OnClose();
			//parent.clickNavButton(3);
			return;
		}
	
		if (parseInt(msg)!=1)
		{
			getEfbMsg(msg);
		}
		window.external.PendClose(false);
		window.external.OnClose();
	}
}

document.attachEvent("onkeydown",getEDiskKeyfun());
function getEDiskKeyfun()
{
	return function()
	{
		if (event.altKey)
		{
			return false;
		}
	}
}
</script>
</body>