<html>
<head>
<script language="javascript">
if(parent.isIBPInstall)
{
	document.write('<object id="RitForAsp" classid="CLSID:077257D1-BA60-4D34-8EA2-7737C3134F58" width="0" height="0"></object>');
}
</script>
<script language="javascript">
//var RitForAsp=parent.RitForAsp;
var Info_Object=parent.Info_Object;
var fileBackupCom=parent.fileBackupCom;
var ifPWDChk=4;
var oldPw=Info_Object.GetPassword();
var isPendIBPEnableSuccPrompt=false;
oldPw=oldPw.replace(/\//g,"[|L]");
oldPw=oldPw.replace(/\\/g,"[|R]");
if(parent.isEFBInstall)
{
document.write("<OBJECT tabindex=\"-1\" id=\"fileRestoreCom\" style=\"WIDTH: 0px; HEIGHT: 0px\" classid=\"clsid:25933F04-813C-48a9-A27B-330A7A11A62C\"></OBJECT>");
}

</script>


<script language="JavaScript" src="js/dhtmlXCommon.js"></script>
<script language="javascript" src="js/comm.js" type="text/javascript"></script>
<script language="javascript">
// import js document
	_import("product");_import("function");
	_import("main_only");
	
	
	_import("control");
	
</script>
<script language="javascript">
var XRA=new xmlResourceAgent("mainctl.xml",langType);

</script>

<title>Backup-Drives4-3_1</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<link href="css/ritstyle.css" type="text/css" rel="stylesheet" />
<link href="css.css" type="text/css" rel="stylesheet" />
<link href="css/main.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.STYLE1 {font-size: xx-small}
#mask_layer {
	position:absolute;
	left:0px;
	top:0px;
	width:565px;
	height:520px;
	z-index:1;
}
#Btn2 {
	position:relative;
	left:250px;
	top:-10px;
	width:100%;
	height:20px;
	z-index:1;
}
#change_pw_link {
	
	left:330px;
	top:114px;
	width:200px;
	height:20px;
	z-index:1;
}
#change_pw_link1 {
	
	left:330px;
	top:114px;
	width:200px;
	height:20px;
	z-index:1;
}
.Summary_Title {	background-image:url(images/summary_click_background.gif);
	width:98px; height:31px;
	position:absolute; left:10px; top:32px;
	padding-top:10px;
	font-family:Arial, Helvetica, sans-serif;
	font-size:13px;
	font-weight:bold;
	color:#2a5ca5;
	cursor:pointer;
}
-->
</style>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<div id="mask_layer" style="display:none;"><img src="images/spacer.gif" width="565" height="520" /></div>
<div style="display:none"></div>
<table width="538" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td height="27" colspan="3">
		<div id="Backup_Drivers_Step31_BackupDrives" class="arial22blue" style="line-height:30px;"></div>
		</td>
	</tr>
	<tr>
		<td width="10"><img src="images/UI/menuleft.jpg" width="10" height="32" /></td>
		<td width="518" background="images/UI/menumiddle.jpg">
		
			<div class="TopButton">
				<div id="PageTitle1" class="PageSubTitle" style="padding-top:9px;cursor:pointer; width:110px; white-space:nowrap;" onClick="parent.jumpPageTo('summary.htm');"></div>
			</div>
			<div class="TopButtonAct">
				<div id="PageTitle2" class="PageSubTitle" style="padding-top:9px; width:110px;"></div>
			</div>
			<div class="TopButton">
				<div id="PageTitle3" class="PageSubTitle" style="padding-top:9px;cursor:pointer;width:110px;" onClick="parent.jumpPageTo('jobs.htm');"></div>
			</div>
			<script language="javascript">
			if(UI_TYPE!=4)
			{
				document.write('<div class="TopButton">'+
				'<div id="PageTitle4" class="PageSubTitle" style="padding-top:9px;cursor:pointer;width:110px;" onClick="parent.jumpPageTo(\'Viewlogs.htm\')"></div>'+
				'</div>');
			}
			</script>
			</td>
		<td width="10"><img src="images/UI/menuright.jpg" width="10" height="32" /></td>
	</tr>
	<tr>
		<td colspan="3">
			<div class="PageTitlePadding"></div>
			<div class="PageTitlePadding"></div>
			<div id="Backup_Drivers_Step31_BackupSetting"></div>
		</td>
	</tr>
	<tr>
		<td colspan="3">
		<div id="tt_global_setting">
			<div style="background-image:url(fleximages/flex_top_left.jpg); width:5px; height:22px; float:left; font-size:1px;" class="tahoma11pxblack"><img src="images/main/spacer.gif" width="1" height="1" alt=""></div>
			<div onClick="scrollSub('settingPage1',300)" style="width:508px; height:22px; float:left; background-color:#E8F2FE; border-top:1px solid #6075A0; border-bottom:1px solid #6075A0; line-height:20px; font-size:11px; font-family:Tahoma, Arial; font-weight:bold; color:#3D5D8C; cursor:hand;">
				<script language="javascript">document.write(XRA.getString("Setting_globalsetting_txt"));</script>
			</div>
			<div  style="width:20px; height:22px; float:left; background-color:#E8F2FE; border-top:1px solid #6075A0; border-bottom:1px solid #6075A0; padding-top:4px; line-height:1px; font-size:1px; " class="tahoma11pxblack">
				<span onClick="scrollSub('settingPage1',300)" style="cursor:hand;">
					<img src="fleximages/array_down.jpg" name="Arrow_1" id="Arrow_1" />
				</span>
			</div>
			<div style="float:left; height:22px; width:5px;background-image:url(fleximages/flex_top_right.jpg); font-size:1px;"><img src="images/main/spacer.gif" width="1" height="1" alt=""></div>
			<div style="clear:both;"></div>
			
			<div id="settingPage1" style=" overflow:hidden;clear:left; width:538px; height:1px;border-left:1px solid #6075A0;border-right:1px solid #6075A0; padding-left:23px; padding-right:23px; padding-top:1px;">
				<div class="tahoma11pxblack"></div>
				<div class="tahoma11pxblack">
					<script language="javascript">
	  document.write(XRA.getString("Setting_ibpstatus_des"));
	  </script>
				</div>
				<div id="Turn_IBP" style="padding-top:18px;">
					<div style="width:350px; height:24px; background-image:url(ritpic/status_dis_en_background.jpg); background-repeat:no-repeat; position:relative;">
						<div style="width:13px; height:15px; position:absolute; top:5px; left:6px;"> <img id="ibp_enable_light" src="images/spacer.gif" width="13" height="15" /> </div>
						<div class="tahoma11pxblack" style="height:15px; position:absolute; top:5px; left:26px;">
							<script language="javascript">
	  				document.write(XRA.getString("Setting_ibp_txt"));
	  				</script>
						</div>
						
						<div id="ibp_enable_notification" class="tahoma11pxblack" style="height:15px; position:absolute; top:5px; left:260px; width: 75px; text-align:right;"></div>
						<div class="tahoma11pxblack" style="height:15px; position:absolute; top:2px; left:365px; width: 106px;"> 
						<a style="display:none;" href="javascript:switchIbp();" id="trunon_trunoff_link_ibp"></a> 
						<button cstyle="rit" onClick="switchIbp();" id="switchIbp_button" style="visibility:hidden;">Turn On</button>
						</div>
					</div>
				</div>
				<div id="File_Setup_Div" style="padding-top:10px;">
					<div style="width:350px; height:24px; background-image:url(ritpic/status_dis_en_background.jpg); background-repeat:no-repeat; position:relative;">
						<div style="width:13px; height:15px; position:absolute; top:5px; left:6px;"> <img id="flb_enable_light" src="images/spacer.gif" width="13" height="15" /> </div>
						<div class="tahoma11pxblack" style="height:15px; position:absolute; top:5px; left:26px;">
							<script language="javascript">document.write(XRA.getString("Setting_FileVersionRecovery"));</script>
						</div>
						
							<div id="flb_enable_notification" class="tahoma11pxblack" style="height:15px; position:absolute; top:5px; left:260px; width: 75px;text-align:right;"> 
							aaa	</div>
						
						<div class="tahoma11pxblack" style="height:15px; position:absolute; top:2px; left:365px; width: 106px;"> 
						<a style="display:none;" href="javascript:switchFlb();" id="trunon_trunoff_link_flb"></a> 
						<button cstyle="rit" onClick="switchFlb();" id="switchFlb_button" style="visibility:hidden;">Turn On</button>
						</div>
					</div>
				</div>
				
				<script language="javascript">
					var R_protect_system_partition;
					var R_protect_disk;
					if(false)//if(FarstoneProductFlag=="DCSNAPSHOT")
					{
						
						var R_protect_system_partition=new radioButton();
						var container1=new container("0");
						var backupDriverStyle = new UIStyle();
						backupDriverStyle.setStyle("buttonimages/radiobutton.jpg",12,12,12,0);//(picture,width,height,startX,startY)
						backupDriverStyle.setReversalPosition(0,0);
						backupDriverStyle.setDisablePosition(0,0);
						backupDriverStyle.setDisableSelectedPosition(0,0);
						var R_protect_system_partition = new radioButton();
						var R_protect_disk = new radioButton();
						
						R_protect_system_partition.applyStyle(backupDriverStyle);
						R_protect_system_partition.setValue("0");
						R_protect_system_partition.attachMeToContainer("container1");
						
						
						R_protect_disk.applyStyle(backupDriverStyle);
						R_protect_disk.attachMeToContainer("container1");
						R_protect_disk.setValue("1");
						
						//alert(RitForAsp.GetProtectMode().toString(16));//debug
						if(RitForAsp.GetProtectMode().toString(16)==0)// if protect hole disk
						{
							R_protect_disk.setDefault();
						}
						else
						{
							R_protect_system_partition.setDefault();
						}
					}
				</script>
				<div style="padding-top:18px;" class="PageText" id="div_save_protected_partition">
					<div style="float:left; padding-top:4px;">
						<script language="javascript">
							if(false)//if(FarstoneProductFlag=="DCSNAPSHOT")
							{
								R_protect_system_partition.displayButton();
							}
						</script>
					</div>
					<div style="float:left; padding-left:5px;line-height:20px;">
						<span onClick="R_protect_system_partition.Check();">Snapshot for system partition</span>
					</div>
					<div style="float:left; padding-left:20px;padding-top:4px;">
						<script language="javascript">
							if(false)//if(FarstoneProductFlag=="DCSNAPSHOT")
							{
								R_protect_disk.displayButton();
							}
						</script>
					</div>
					<div style="float:left; padding-left:5px; line-height:20px;">
						<span onClick="R_protect_disk.Check();">Snapshot for full disk</span>
					</div>
					<div style="float:left; padding-left:5px;">
						<button cstyle="rit" onClick="saveProtectedType();" id="saveptype" style="visibility:hidden;">Change</button>
					</div>
					<div style="clear:both;"></div>
				</div>

				
				
				<div style="padding-top:10px; display:none;" class="tahoma11pxblack">
					<div id="setting_checkBox_promote_new_version" style="float:left; display:none;"></div>
					<div id="setting_text_promote_new_version" class="tahoma11pxblack" style="float:left; padding-left:15px; display:none;"></div>
					<div style="clear:both; height:1px; overflow:hidden; width:1px;"></div>
				</div>
				<div class="tahoma11pxblack" style="padding-top:20px;">
					<script language="javascript">
	  				document.write(XRA.getString("Setting_changepw_des"));
	  				</script>
				</div>
				<div style="padding-top:2px; " class="tahoma11pxblack">
					<div id="setting_checkBox_set_password" style="float:left;display:block;"></div>
					<div id="setting_set_password" class="tahoma11pxblack" style=" float:left;padding-left:15px;" onClick="chkboxSetPassword.setChecked(!chkboxSetPassword.checked);">
						<script language="javascript">
	  				document.write(XRA.getString("Setting_changepw_check"));
	  				</script>
					</div>
					<div id="change_pw_link" class="tahoma11pxblack" style="display:none; float:right; text-align:left; width:155px;"><a href="javascript:changePwPopDlg1();">
						<script language="javascript">document.write(XRA.getString("Setting_changepw_bt"));</script>
					</a></div>
					<div id="change_pw_link1" class="DisableTxt" style=" float:right; text-align:left; width:155px;"></div>
				</div>
				
				<div style="height:1px; clear:both; font-size:1px"></div>
				<div id="IBPSeeting" style="visibility:hidden;">
					<div class="tahoma11pxblack" style="text-align:left;">
						<script language="javascript">
	  				document.write(XRA.getString("Setting_resize_des"));
	  				</script>
					</div>
					<div id="Btn2" class="tahoma11pxblack"><a href="javascript:try{popResizeDlg();}catch(e){}">
						<script language="javascript">
	  				document.write(XRA.getString("Setting_resize_bt"));
	  				</script>
					</a></div>
				</div>
				<div id="Button_Div" style="padding-top:1px; text-align:center;">
					<button cstyle="rit" onClick="saveGlobalSetting();" id="TestButtonA" style="visibility:hidden;"> </button>
				</div>
			</div>
			<div style=" clear:both; width:538px; height:1px; display:none;border-left:1px solid #6075A0;border-right:1px solid #6075A0; margin:0px;"><img src="images/spacer.gif" width="1" height="1" /></div>
			<!--end1-->
			<div id="tt_restorepoint_setting">
				<div style="background-image:url(fleximages/flex_middle_left.jpg); width:5px; height:22px; float:left;"></div>
				<div onClick="scrollSub('settingPage2',300)" style="width:508px; height:22px;cursor:pointer;float:left; background-color:#E8F2FE; border-top:1px solid #6075A0; border-bottom:1px solid #6075A0; line-height:20px; font-size:11px; font-family:Tahoma, Arial; font-weight:bold; color:#3D5D8C; padding-left:8px; cursor:hand;">
					<script language="javascript">
	  				document.write(XRA.getString("Setting_ibpsetting_txt"));
	  				</script>
				</div>
				<div onClick="scrollSub('settingPage2',300)" style="width:20px; height:22px; float:left; background-color:#E8F2FE; border-top:1px solid #6075A0; border-bottom:1px solid #6075A0; padding-top:4px; line-height:1px; font-size:1px;"> <span style="cursor:hand;"><img id="Arrow_2" src="fleximages/array_down.jpg" /></span> </div>
				<div style="float:left; clear:right; height:22px; width:5px;background-image:url(fleximages/flex_middle_right.jpg); clear:right;"></div>
				<div id="settingPage2" style="overflow:hidden;clear:left; background-color:#ffffff; width:538px; height:1px;border-left:1px solid #6075A0;border-right:1px solid #6075A0;padding-left:23px; padding-right:23px; padding-top:12px; display:none;">
					<div class="tahoma11pxblack">
						<script language="javascript">
	  				document.write(XRA.getString("Setting_ibpsetting_des"));
	  				</script>
					</div>
					<div style="padding-top:20px;">
						<div id="setting_checkBox_promote_diskSpace_ex" style="float:left; padding-top:8px;"> </div>
						<div class="tahoma11pxblack" style="float:left; line-height:27px;" onClick="select_prom_ibp_space()"> &nbsp;
									<script language="javascript">
	  				document.write(XRA.getString("Setting_select_pct_1"));
	  				</script>
						</div>
						<div id="dropdownlist_space_promote" style="float:left;"> </div>
						<div class="tahoma11pxblack" style="line-height:27px;" onClick="select_prom_ibp_space()">
							<script language="javascript">
	  				document.write(XRA.getString("Setting_select_pct_2"));
	  				</script>
						</div>
					</div>
					<div style="clear:both; font-size:2px; line-height:2px; height:2px;"></div>
					<div style="padding-top:20px; text-align:center;">
						<button cstyle="rit" onClick="savePromote();" id="save_restore_point_setting_button" style="visibility:hidden;"></button>
					</div>
				</div>
				<div style="overflow:hidden; clear:left; width:510px; height:1px;border-left:1px solid #6075A0;border-right:1px solid #6075A0;"><img src="images/spacer.gif" width="1" height="1" /></div>
			</div>
			<!--end1-->
			<div id="tt_filebackup_setting">
				<div style="background-image:url(fleximages/flex_middle_left.jpg); width:5px; height:22px; float:left;"></div>
				<div onClick="scrollSub('settingPage3',300)" style="width:508px;cursor:pointer; height:22px; float:left; background-color:#E8F2FE; border-top:1px solid #6075A0; border-bottom:1px solid #6075A0; line-height:20px; font-size:11px; font-family:Tahoma, Arial; font-weight:bold; color:#3D5D8C; padding-left:8px; cursor:hand;"><script language="javascript">
	  				document.write(XRA.getString("Setting_filebackup_txt"));
	  				</script></div>
				<div  style="width:20px; height:22px; float:left; background-color:#E8F2FE; border-top:1px solid #6075A0; border-bottom:1px solid #6075A0; padding-top:4px; line-height:1px; font-size:1px;"> <span onClick="scrollSub('settingPage3',300)" style="cursor:hand;"><img id="Arrow_3" src="fleximages/array_down.jpg" /></span> </div>
				<div style="float:left; clear:right; height:22px; width:5px;background-image:url(fleximages/flex_middle_right.jpg); clear:right;"></div>
				<div id="settingPage3" style=" overflow:hidden;clear:left; background-color:#ffffff; width:510px; height:1px;border-left:1px solid #6075A0;border-right:1px solid #6075A0;padding-left:13px; padding-right:23px; padding-top:12px;">
					<div id="openfile0" class="tahoma11pxblack" style="padding-left:5px; padding-bottom:10px;"></div>
					<div  id="systemdefaultlist" class="tahoma11pxblack">
						<div id="openfile1" style="padding-bottom:6px;"><span id="Txt_System_Default" class="Arial12blackbold" style="padding-left:5px;"></span> | <a id="Txt_AddFileBackup" href="javascript:addFilesToBackup_flb('System Default',1);"></a></div>
					</div>
					<div style=" width:480px; height:235px; overflow:auto; display:none;" id="projectListC" class="tahoma11pxblack"></div>
				</div>
				<div style=" display:none;overflow:hidden; clear:left; width:538px; height:1px;border-left:1px solid #6075A0;border-right:1px solid #6075A0;"><img src="images/spacer.gif" width="1" height="1" /></div>
			</div>
		</div>
				<div style="border-top:1px solid #6075A0;width:538px;">&nbsp;</div></td>
	</tr>
</table>
				<script language="javascript">
					if(true)//if(FarstoneProductFlag!="DCSNAPSHOT")//For DC Snapshot
					{
						document.getElementById("div_save_protected_partition").style.display="none";
					}
					else
					{
						document.getElementById("Button_Div").style.display="none";
					}
				</script>
				
				
				
<script language="javascript" type="text/javascript">
var currentOpenedId="settingPage1";
if(parent.isIBPInstall)
{
	switch(parent.settingTabLayoutFlag)
	{
		case 0:currentOpenedId="settingPage1";break;
		case 1:currentOpenedId="settingPage2";break;
		case 2:currentOpenedId="settingPage3";break;
	}
}
switch(currentOpenedId)
{
	case "settingPage1":$("Arrow_1").src="fleximages/array_right_dis.jpg";$("Arrow_2").src="fleximages/array_down.jpg";$("Arrow_3").src="fleximages/array_down.jpg";break;
	case "settingPage2":$("Arrow_1").src="fleximages/array_down.jpg";$("Arrow_2").src="fleximages/array_right_dis.jpg";$("Arrow_3").src="fleximages/array_down.jpg";break;
	case "settingPage3":$("Arrow_1").src="fleximages/array_down.jpg";$("Arrow_2").src="fleximages/array_down.jpg";$("Arrow_3").src="fleximages/array_right_dis.jpg";break;
}

document.body.onload=function()
{
	if(currentOpenedId!="settingPage1")
	{
		document.getElementById("settingPage1").style.display="none";
		document.getElementById("settingPage1").style.height="0px";
		document.getElementById("settingPage1").nextSibling.style.display="";
	}
	document.getElementById(currentOpenedId).style.display="block";
	document.getElementById(currentOpenedId).style.height="300px";
	IntSetting();
	if(!parent.isIBPInstall)
	{
	//document.getElementById("Button_Div").style.display="none";
	document.getElementById("IBPSeeting").style.display="none";
	}
	$("PageTitle1").innerHTML = GS("Summary");
	if (parent.isIBPInstall)
	{
		$("PageTitle2").innerHTML = GS("Settings");
	}
	$("PageTitle3").innerHTML = GS("Jobs");
	if(UI_TYPE!=4)
	{
		$("PageTitle4").innerHTML = GS("Logviewer");
	}
	$("Txt_System_Default").innerHTML = GS("Txt_System_Default");
	$("Txt_AddFileBackup").innerHTML = GS("Txt_AddFileBackup");
	$("setting_text_promote_new_version").innerHTML = GS("setting_text_promote_new_version");
	
	$("openfile0").innerHTML = XRA.getString("Setting_open_File_0");
	if (parent.isIBPInstall)
	{
	 	document.getElementById("IBPSeeting").style.visibility="visible";
	}
	document.getElementById("TestButtonA").innerHTML=XRA.getString("Setting_saveGlobalSetting_bt");
	document.getElementById("save_restore_point_setting_button").innerHTML=XRA.getString("Setting_saveibpsetting_bt");
	arrangeLayout();
	document.getElementById("Backup_Drivers_Step31_BackupDrives").innerHTML = XRA.getString("Main_left_1");
	if (parent.isEFBInstall==true)
	{
		iniEfbList();
	}
	else
	{

	}
	var oldPassword=Info_Object.GetPassword();
	if(oldPassword.length>0)
	{
	chkboxSetPassword.setChecked(true);
	
	}
	else
	{
	chkboxSetPassword.setChecked(false);
	}
	//	document.getElementById("Backup_Drivers_Step31_BackupDestination").innerHTML = GS("Backup_Drivers_Step31_BackupDestination");
	//	document.getElementById("Backup_Drivers_Step31_ChoosePlaceStore").innerHTML = GS("Backup_Drivers_Step31_ChoosePlaceStore");
	//	document.getElementById("Backup_Drivers_Step31_BackupSetting").innerHTML = GS("Backup_Drivers_Step31_BackupSetting");
	$("change_pw_link1").innerHTML = GS("Button_SetPassword");
	applyButton();
	document.getElementById("mask_layer").style.display="none";
	
	
	
	if(parent.isIBPInstall)
	{
		var statusXml=(RitForAsp.RitReadTactic(0));
		if (statusXml=="fs++")
		{
			alert(RitForAsp.GetErrorCode());
			return;
		}
	
		var xmlDoc = new ActiveXObject("Microsoft.xmldom");
		xmlDoc.loadXML(statusXml);
		var isIBPEnabled = xmlDoc.selectSingleNode("/General/EnableRit").text;
		var isFLBEnabled = xmlDoc.selectSingleNode("/General/EnableFlb").text;
		var RitUsedSpace = xmlDoc.selectSingleNode("/General/RitUsedSpace").text;
		var RitFreeSpace = xmlDoc.selectSingleNode("/General/RitFreeSpace").text;
		var FlbUsedSpace = xmlDoc.selectSingleNode("/General/FlbUsedSpace").text;
		var FlbFreeSpace = xmlDoc.selectSingleNode("/General/FlbFreeSpace").text;
	}


	//var root;
	//root = xmlDoc.getElementsByTagName("items");
	
	
	
	if(isIBPEnabled==1)   //////// change ibp light to green or red
	{
		document.getElementById("ibp_enable_light").src="ritpic/green_light_status.jpg";
		//document.getElementById("trunon_trunoff_link_ibp").innerHTML=XRA.getString("Setting_turnoff_txt");
		document.getElementById("switchIbp_button").setValue(XRA.getString("Setting_turnoff_txt")+"&nbsp;");
		document.getElementById("ibp_enable_notification").innerHTML=XRA.getString("setting_txt_on");
	}
	else
	{
		document.getElementById("ibp_enable_light").src="ritpic/red_light_status.jpg";
		//document.getElementById("trunon_trunoff_link_ibp").innerHTML=XRA.getString("Setting_turnon_txt");
		document.getElementById("switchIbp_button").setValue(" "+XRA.getString("Setting_turnon_txt")+"&nbsp;");
		document.getElementById("ibp_enable_notification").innerHTML="<span style='color:red'>"+XRA.getString("setting_txt_off")+"</span>";
	}
	
	if(isFLBEnabled==1)   //////// change flb light to green or red
	{
		document.getElementById("flb_enable_light").src="ritpic/green_light_status.jpg";
		//document.getElementById("trunon_trunoff_link_flb").innerHTML=XRA.getString("Setting_turnoff_txt");
		document.getElementById("switchFlb_button").setValue(XRA.getString("Setting_turnoff_txt")+"&nbsp;");
		document.getElementById("flb_enable_notification").innerHTML=XRA.getString("setting_txt_on");
		parent.isFLBEnabled=true;$("openfile1").style.display="";
	}
	else
	{
		document.getElementById("flb_enable_light").src="ritpic/red_light_status.jpg";
		document.getElementById("trunon_trunoff_link_flb").innerHTML=XRA.getString("Setting_turnon_txt");
		document.getElementById("switchFlb_button").setValue(" "+XRA.getString("Setting_turnon_txt")+"&nbsp;");
		document.getElementById("flb_enable_notification").innerHTML="<span style='color:red'>"+XRA.getString("setting_txt_off")+"</span>";
		parent.isFLBEnabled=false;
		$("openfile1").style.display="none";
	}
	//document.getElementById("settingPage1").style.display="block";
	//document.getElementById("settingPage1").style.height="300px";
	parent.iframepageLoadedFinished();
}

function arrangeLayout()
{
	if(parent.isIBPInstall!=true)
	{
		document.getElementById("tt_restorepoint_setting").style.display="none";
		document.getElementById("Turn_IBP").style.display="none";
		document.getElementById("change_pw_link").style.top="73px";
		document.getElementById("change_pw_link1").style.top="73px";
		//document.getElementById("Btn2").style.top="165px";
	}
	if(parent.isCBPInstall!=true)
	{
		document.getElementById("tt_restorepoint_setting").style.display="none";
	}

	if(!parent.isFLBInstall)
	{
		document.getElementById("tt_filebackup_setting").style.display="none";	
		document.getElementById("File_Setup_Div").style.display="none";
	}
	if(parent.isFLBInstall)
	{
		document.getElementById("File_Setup_Div").style.display="";
		document.getElementById("change_pw_link").style.top="148px";
		document.getElementById("change_pw_link1").style.top="148px";
		//document.getElementById("Btn2").style.top="241px";
	}
	else
	{
		//document.getElementById("Btn2").style.top="201px";
	}
}
function IntSetting()
{
parent.Seti();
parent.LastCursor=1;
parent.document.getElementById("LeftUI1").style.backgroundImage= "url(images/main/mailLeft011.gif)";
}

//////////////////Set disable/(enable) function //////////////////////
function switchIbp()
{

	
	var statusXml=(RitForAsp.RitReadTactic(0));
	var xmlDoc = new ActiveXObject("Microsoft.xmldom");
	
	xmlDoc.loadXML(statusXml);
	//var root;
	//root = xmlDoc.getElementsByTagName("items");
	var isIBPEnabled = xmlDoc.selectSingleNode("/General/EnableRit").text;
	if(isIBPEnabled==1)
	{
		var isDoDisableIbp=RIT_popMsg('',394,165,'ok',XRA.getString("Setting_DisableIBP_promote1"),'okcancel');
		if(isDoDisableIbp!="yes")
		{
			return;
		}
		xmlDoc.selectSingleNode("/General/EnableRit").text=0;
		parent.isIBPDisable=true;
	}
	else
	{
		xmlDoc.selectSingleNode("/General/EnableRit").text=1;
		parent.isIBPDisable=false;
	}
	//var rst1=RitForAsp.RitSaveTactic(0,xmlDoc.xml);
	var rst1=RitForAsp.PutRitState(isIBPEnabled==1?0:1);
	if (rst1==0)
	{
		if(isIBPEnabled!=1)
		{
			parent.MaskLayer();
		}
		else
		{
			document.getElementById("ibp_enable_light").src="ritpic/red_light_status.jpg";
			//document.getElementById("trunon_trunoff_link_ibp").innerHTML=XRA.getString("Setting_turnon_txt");
			document.getElementById("switchIbp_button").setValue(" "+XRA.getString("Setting_turnon_txt")+"&nbsp;");
			document.getElementById("ibp_enable_notification").innerHTML="<span style='color:red'>"+XRA.getString("setting_txt_off")+"</span>";
			RIT_popMsg('',264,135,'ok',XRA.getString("Setting_DisableIBP_success_promote"),'info');
			//parent.DisableIBP();
		}
		 parent.Marktest.UpdateItemState(32703,0,1);
	}
	else
	{
		if(isIBPEnabled!=1)
		{
			RIT_popMsg('',264,135,'ok',XRA.getString("Setting_EnableIBP_failed_promote"),'info');
		}
		else
		{
			RIT_popMsg('',264,135,'ok',XRA.getString("Setting_DisableIBP_failed_promote"),'info');
		}
	}
}

function switchFlb()
{
	if(parent.isIBPInstall==true)
	{var statusXml=(RitForAsp.RitReadTactic(0));
	var xmlDoc = new ActiveXObject("Microsoft.xmldom");
	
	xmlDoc.loadXML(statusXml);
	//var root;
	//root = xmlDoc.getElementsByTagName("items");
	var isFLBEnabled = xmlDoc.selectSingleNode("/General/EnableFlb").text;
	if(isFLBEnabled==1)
	{
		var isDoDisableIbp=RIT_popMsg('',314,145,'ok',XRA.getString("Setting_Are_You_Sure_promote"),'okcancel');
		if(isDoDisableIbp!="yes")
		{
			return;
		}
		xmlDoc.selectSingleNode("/General/EnableFlb").text=0;
			}
	else
	{
		xmlDoc.selectSingleNode("/General/EnableFlb").text=1;
		
	}
	var flbRst=RitForAsp.RitSaveTactic(0,xmlDoc.xml);
	if (flbRst==0)
	{
		if(isFLBEnabled!=1)   //////// change flb light to green or red
		{
			document.getElementById("flb_enable_light").src="ritpic/green_light_status.jpg";
			//document.getElementById("trunon_trunoff_link_flb").innerHTML=XRA.getString("Setting_turnoff_txt");
			document.getElementById("switchFlb_button").setValue(XRA.getString("Setting_turnoff_txt")+"&nbsp;");
			document.getElementById("flb_enable_notification").innerHTML=XRA.getString("setting_txt_on");
			RIT_popMsg('',264,135,'ok',XRA.getString("Setting_TurnOnSuc"),'info');
			parent.isFLBEnabled=true;$("openfile1").style.display="";
		}
		else
		{
			document.getElementById("flb_enable_light").src="ritpic/red_light_status.jpg";
			//document.getElementById("trunon_trunoff_link_flb").innerHTML=XRA.getString("Setting_turnon_txt");
			document.getElementById("switchFlb_button").setValue(" "+XRA.getString("Setting_turnon_txt")+"&nbsp;");
			document.getElementById("flb_enable_notification").innerHTML="<span style='color:red'>"+XRA.getString("setting_txt_off")+"</span>";
			RIT_popMsg('',264,135,'ok',XRA.getString("Setting_TurnOffSuc"),'info');
			parent.isFLBEnabled=false;$("openfile1").style.display="none";
		}
		
	}
	else
	{
		if(isFLBEnabled!=1)   //////// change flb light to green or red
		{
			RIT_popMsg('',264,135,'ok',XRA.getString("Setting_FailedTurnOn"),'info');
		}
		else
		{
			RIT_popMsg('',264,135,'ok',XRA.getString("Setting_FailedTurnOff"),'info');
		}
	}}
}
///////////////////////////////////////

function btn_next()
{
	/*void SetImgFilePars(int iBackupType // 0 full backup  1 full backup and monitor 2 different 3 incremnt
 , int bCompress 
, int bCheckImg , 
, int iFileSize //自动 , 650MB , 700MB , 2000MB
            0       1      2       3 
, char * strPwd ) //img密码,没有密码时为NULL*/

	dc3.SetImgFilePars();
	//dc3.AddTask();
}

function select_prom_ibp_space()
{
	chkboxPromoteDiskSpace.setChecked(!chkboxPromoteDiskSpace.checked);
}

</script>


<script language="javascript">
//////////////////////////////////////////////////script for flex box
//var currentOpenedId="settingPage1";
var isAppending=false;
var paddingBar

function scrollSub(subId,height)
{
	if (subId==currentOpenedId)
	{
		return;
	}
	if (isAppending==true)
	{
		return;
	}
	isAppending=true;
	var subNode=document.getElementById(subId);
	
	switch(subId)
	{
		case "settingPage1":parent.settingTabLayoutFlag=0;$("Arrow_1").src="fleximages/array_right_dis.jpg";$("Arrow_2").src="fleximages/array_down.jpg";$("Arrow_3").src="fleximages/array_down.jpg";break;
		case "settingPage2":parent.settingTabLayoutFlag=1;$("Arrow_1").src="fleximages/array_down.jpg";$("Arrow_2").src="fleximages/array_right_dis.jpg";$("Arrow_3").src="fleximages/array_down.jpg";break;
		case "settingPage3":parent.settingTabLayoutFlag=2;$("Arrow_1").src="fleximages/array_down.jpg";$("Arrow_2").src="fleximages/array_down.jpg";$("Arrow_3").src="fleximages/array_right_dis.jpg";break;
	}
	setTimeout(scUpAndDown(document.getElementById(currentOpenedId),subNode,height,true,true),30);
	
	currentOpenedId=subId;
}

function scUpAndDown(upNode,downNode,height,bool_a,bool_b)
{
	return function()
	{
		var isexit=false;
		if (bool_a)
		{
			var a=scUPfunction(upNode);
			var isend_a=a();
			isexit=isexit || isend_a;
		}
		if (bool_b)
		{
			var b=scDOWNfunction(downNode,height);
			var isend_b=b();
			isexit=isexit || isend_b;
		}
		if (isexit==false)
		{
			return;
		}
		setTimeout(scUpAndDown(upNode,downNode,height,isend_a,isend_b),25);
	}	
}

function scUPfunction(subObj)
{
	return function()
	{
		
		var intHeight=parseInt(subObj.style.height,10)-33;
		if (intHeight<=0)
		{
			//subObj.style.display="none";
			subObj.style.height="1px";
			
			subObj.style.display="none";
			
			subObj.nextSibling.style.display="";
			//alert(subObj.nextSibling.outerHTML)
			subObj.scrollDirection=0;
			isAppending=false;
			return false;
		}
		else
		{
			subObj.style.height=intHeight+"px";
		}
		return true;
		//setTimeout(scUPfunction(subObj),50);
	}
}
function scDOWNfunction(subObj,height)
{
	return function()
	{
		if (subObj.style.display=="none")
		{
			subObj.style.display="block";
			subObj.nextSibling.style.display="none";
		}
		
		var intHeight=parseInt(subObj.style.height,10)+33;
		if (intHeight>=height)
		{
			subObj.style.height=height+"px";
			isAppending=false;
			return false;
		}
		else
		{
			subObj.style.height=intHeight+"px";
		}
		return true;
		//setTimeout(scDOWNfunction(subObj,height),50);
	}
}

//////////////////////////////////////////////////////////////////////
/////  Save setting
//////////////////////////////////////////////////////////////////////
function saveGlobalSetting()
{
	if(chkboxSetPassword.checked==false)
	{
		Info_Object.SetPassWord("");
	}
	if(parent.isIBPInstall)
	{var ritStatusXML_saveGlobalSetting=RitForAsp.RitReadTactic(0);
	var xmlDoc_saveGlobalSetting = new ActiveXObject("Microsoft.xmldom");
	xmlDoc_saveGlobalSetting.loadXML(ritStatusXML_saveGlobalSetting);
	//alert(chkboxSetPassword.checked);
	
	xmlDoc_saveGlobalSetting.selectSingleNode("/General/PasswordProtect").text=chkboxSetPassword.checked==true?1:0;		///////if password protect checkbox is cheecked
	
	
	var save_globalSetting_rst=RitForAsp.RitSaveTactic(0,xmlDoc_saveGlobalSetting.xml);
	if(save_globalSetting_rst==0)
	{
		RIT_popMsg('',264,135,'ok',XRA.getString("Setting_SaveGlobalSetting_success_promote"),'info');
	}
	else
	{
		RIT_popMsg('',264,135,'ok',XRA.getString("Setting_SaveGlobalSetting_failed_promote")+save_globalSetting_rst,'alert');
	}
	}
	else
	{
	RIT_popMsg('',264,135,'ok',XRA.getString("Setting_SaveGlobalSetting_success_promote"),'info');
	}
}

function popResizeDlg()
{
if(parent.isIBPInstall==true)
{	try
	{
		if(RitForAsp.IfCanBeResize()==0)
		{
				RIT_popMsg('',314,165,'ok',XRA.getString("Setting_can_not_resize"),'alert');
				return;
		}
	}
	catch(e)
	{
		alert(e);
	}

	var isPopReszWin=RIT_popMsg('',314,165,'ok',XRA.getString("Setting_Resize_promote_befor"),'confirm');
	if(isPopReszWin=="yes")
	{
		window.external.Navigate("mainui/resize.htm", 620, 304);
	}
	}
}

function savePromote()
{
if(parent.isIBPInstall==true){	var ritStatusXML_saveGlobalSetting=RitForAsp.RitReadTactic(0);
	var xmlDoc_savePromoteSetting = new ActiveXObject("Microsoft.xmldom");
	xmlDoc_savePromoteSetting.loadXML(ritStatusXML_saveGlobalSetting);
	//alert(chkboxSetPassword.checked);
	xmlDoc_savePromoteSetting.selectSingleNode("/General/Alert").text=chkboxPromoteDiskSpace.checked==true?1:0;	
	xmlDoc_savePromoteSetting.selectSingleNode("/General/AlertValue").text=promoteSpaceDropDownList.value;
	
	var save_PromoteSetting_rst=RitForAsp.RitSaveTactic(0,xmlDoc_savePromoteSetting.xml);
	
	if(save_PromoteSetting_rst==0)
	{
		RIT_popMsg('',264,135,'ok',XRA.getString("Setting_SaveRestorePointSetting_success_promote"),'info');
	}
	else
	{
		RIT_popMsg('',264,135,'ok',XRA.getString("Setting_SaveRestorePointSetting_failed_promote")+save_globalSetting_rst,'alert');
	}
	}
}
</script>
<script language="javascript">
  //--------------------Promote new version checkbox---------------------------
  	var chkboxPromoteNewVersion=new checkBox("setting_checkBox_promote_new_version",false);
	chkboxPromoteNewVersion.apply();
	/////////////////////////////////////////////
	
	

	//---------------------Set password check box-------------------------------
  	var chkboxSetPassword=new checkBox("setting_checkBox_set_password",false);
	chkboxSetPassword.apply();
	chkboxSetPassword.onCheck=function()
	{
		document.getElementById("change_pw_link").style.display="";
		document.getElementById("change_pw_link1").style.display="none";
		ifPWDChk++;
	changePwPopDlg();
	}
	
	chkboxSetPassword.onUncheck=function()
	{
		document.getElementById("change_pw_link").style.display="none";
		document.getElementById("change_pw_link1").style.display="";
		ifPWDChk++;
	}
	////////////////////////////////////////////////
	
	//-----------------promote disk space checkbxo----------------------------
	var chkboxPromoteDiskSpace=new checkBox("setting_checkBox_promote_diskSpace_ex",false);
	chkboxPromoteDiskSpace.apply();
	chkboxPromoteDiskSpace.setChecked(true);
	///////////////////////////////////////////////////////
	if(parent.isIBPInstall)
{
var ritStatusXML=RitForAsp.RitReadTactic(0);

	var isPromoteSpace
	var promoteSpaceValue
	
	if (ritStatusXML=="fs++")
	{
		alert("Sorry, there is an error,\nError Code:"+RitForAsp.GetErrorCode());
	}
	else
	{
		var xmlDoc = new ActiveXObject("Microsoft.xmldom");
		xmlDoc.loadXML(ritStatusXML);
	//var root;
	//root = xmlDoc.getElementsByTagName("items");
		var isPasswordProtect = xmlDoc.selectSingleNode("/General/PasswordProtect").text;
		if(isPasswordProtect==1)
		{
			chkboxSetPassword.setChecked(true);
		}
		////////
		isPromoteSpace = xmlDoc.selectSingleNode("/General/Alert").text;
		promoteSpaceValue = xmlDoc.selectSingleNode("/General/AlertValue").text;

	}
}

	
	var AOL_dayDown=new downListCreator();
	var percentList=new Array();
	
	var ii=5;
	while (ii<=50)
	{
		percentList.push(ii+"%|"+ii);
		ii+=5;
	}
	//---------------------------
	promoteSpaceDropDownList=AOL_dayDown.getCtrl(percentList,"percent_ddl",'dropdownlist_space_promote',promoteSpaceValue+"%",1);
	promoteSpaceDropDownList.onChange=function()
	{
		//alert(this.value);
	}
	
	///////////////////////////Set event for checkbox
	chkboxPromoteDiskSpace.onCheck=function()
	{
		promoteSpaceDropDownList.Enable();
	}
	chkboxPromoteDiskSpace.onUncheck=function()
	{
		promoteSpaceDropDownList.Disable();
	}
	
	if (isPromoteSpace!="0")
	{
		chkboxPromoteDiskSpace.setChecked(true);
	}
	else
	{
		chkboxPromoteDiskSpace.setChecked(false);
	}
	///////////////////////////End set
	
	function changePwPopDlg()
	{
		if(Info_Object.GetPassword()!=""&&ifPWDChk==6)
		{
			ifPWDChk=5;
		}
		if(ifPWDChk>5)
		{
			window.external.Navigate("mainui/changepassword.htm?pw="+oldPw, 370, 232);
			
			if(window.external.GetStaticData()=="BlankPWD"&&Info_Object.GetPassword()=="")
			{
				chkboxSetPassword.setChecked(false);
			}
			window.external.SetStaticData("");
		}
	}
	

function changePwPopDlg1()
	{
		if(chkboxSetPassword.setChecked)
		{
window.external.Navigate("mainui/changepassword.htm?pw="+oldPw, 370, 232);
		if(Info_Object.GetPassword()=="")
		{
		chkboxSetPassword.setChecked(false);
		}	
		}
	}
  </script>
  <!--/////////////////////////////////////////////////////////////////////////////////////////////////-->
  <script language="javascript">
  	////////-----------------------------SCRIPT For EFB-----------------------------
	var projectNameArray=new Array();
  	function addFilesToBackup(name,id)
	{
		fileBackupCom.CreateConditionFile(name);
		window.external.SetStaticData(name);
		window.external.Navigate("mainui/fileselectpop.htm",554,571);
		var popResult=window.external.GetStaticData();
		//popAddMsgResultAction(popResult);
	}
	
	
	function addFilesToBackup_flb(name,id)
	{
		fileBackupCom.CreateConditionFile(name);
		window.external.Navigate("mainui/fileselectpopflb.htm?name="+name+"&id="+id,554,571);
		var popResult=window.external.GetStaticData();
		//popAddMsgResultAction(popResult);
	}
	
	function changeDayFormat(inStr)
	{
		var dayTmpArr=new Array();
		dayTmpArr=inStr.split("-");
		if (dayTmpArr[1].length<2)
		{
			dayTmpArr[1]="0"+dayTmpArr[1]
		}
		if (dayTmpArr[2].length<2)
		{
			dayTmpArr[2]="0"+dayTmpArr[2]
		}
		return dayTmpArr[1].toString()+"/"+dayTmpArr[2].toString()+"/"+dayTmpArr[0].substr(dayTmpArr[0].length-4,4).toString()
	}

	function backupNow(name)
	{
		window.external.Navigate("mainui/filebackupprogresspop.htm?name="+name,554,571);
		var popResult=window.external.GetStaticData();
		//popAddMsgResultAction(popResult);
	}

	function getOneRecHTML(name,createTime,lastModifyTime)
	{
		var rtString="";
		rtString+='<div style="padding-top:8px; padding-left:5px;">'
		rtString+="<div><span class=\"Arial12blackbold\">"+name+"</span></div><div>Created on "+createTime+"; Last Modified "+lastModifyTime+"&nbsp; | <a href=\"javascript:addFilesToBackup('"+name.replace(/\'/g,"\\'")+"',1);\">Add Files</a>";
		rtString+=" | <a href=\"javascript:backupNow('"+name.replace(/\'/g,"\\'")+"',1);\">Backup now</a></div>"
		rtString+="</div>"
		return rtString;
	}

	function iniEfbList()
	{
		var tmpStr1;
		var tmpBackupTimeStr;
		var tmpArrayOneRecord=new Array();
		var tmpArrayOnerecord_time=new Array();
		tmpStr1=fileRestoreCom.FindProject(true);
	
		var projectListHTML=""
		var xxx
		var i;
		if (tmpStr1=="")
		{
			//document.getElementById("projectListC").innerHTML="No File Backup project to edit.<br><a href='#' onclick='parent.clickNavButton(3);'>Backup my files.</a>"
			return;
		}
		tmpBackupTimeStr=fileRestoreCom.GetProjectTime(tmpStr1); 
		projectNameArray.push(tmpStr1+"||"+tmpBackupTimeStr);
		while (true)
		{
			tmpStr1=fileRestoreCom.FindProject(false);
			if (tmpStr1=="")
			{
				break;
			}
			else
			{
				tmpBackupTimeStr=fileRestoreCom.GetProjectTime(tmpStr1);
				projectNameArray.push(tmpStr1+"||"+tmpBackupTimeStr);
			}
		}
		
		for (i=0;i<projectNameArray.length;i++)
		{
			tmpArrayOneRecord=projectNameArray[i].split("||");
			
			tmpArrayOnerecord_time=tmpArrayOneRecord[1].split("//");
			if (tmpArrayOnerecord_time.length<2)
			{
				projectListHTML+=getOneRecHTML(tmpArrayOneRecord[0],"","")
			}
			else
			{
				tmpArrayOnerecord_time[0]=changeDayFormat(tmpArrayOnerecord_time[0]);
				tmpArrayOnerecord_time[1]=changeDayFormat(tmpArrayOnerecord_time[1]);
				projectListHTML+=getOneRecHTML(tmpArrayOneRecord[0],tmpArrayOnerecord_time[0],tmpArrayOnerecord_time[1])
			}
			
		}
		
		if(parent.isFLBInstall)
		{$("openfile0").style.display="";		
		document.getElementById("projectListC").innerHTML=projectListHTML;}
	}
	if(!parent.isFLBEnabled){$("openfile1").style.display="none";}
	
	
	function Reload()
	{
		parent.DeMaskLayer();
		document.getElementById("ibp_enable_light").src="ritpic/green_light_status.jpg";
		//document.getElementById("trunon_trunoff_link_ibp").innerHTML=XRA.getString("Setting_turnoff_txt");
		document.getElementById("switchIbp_button").setValue(XRA.getString("Setting_turnoff_txt")+"&nbsp;");
		document.getElementById("ibp_enable_notification").innerHTML=XRA.getString("setting_txt_on");
		if(!isPendIBPEnableSuccPrompt)
		{
			RIT_popMsg('',264,135,'ok',XRA.getString("Setting_EnableIBP_success_promote"),'info');
		}
		//parent.EnableIBP();
	}
	
	
	function saveProtectedType()
	{

		var rst=container1.value==0?1:0;
		isPendIBPEnableSuccPrompt=true;
		window.external.Navigate("mainui/change_protect_type.htm?type="+rst, 370, 232);
		isPendIBPEnableSuccPrompt=false;
		return;
		var savRst=RitForAsp.SetProtectMode(rst);
		if(savRst==0)
		{
			RIT_popMsg('',264,135,'ok',"Chang setting successfully.",'info');
		}
		else
		{
			RIT_popMsg('',264,135,'ok',"Failed to chang setting.<br>Error Code: 0x"+savRst.toString(16),'alert');
		}
	}
	
</script>
  
 <SCRIPT LANGUAGE="vbs">
sub RitForAsp_CreateProgress(dwProgress, dwErr)  
    if clng(dwProgress)=100 and dwerr = 0 then
       Reload()
    end if
end sub
</script>


</body>
</html>