//-----------Top Path-----------
  //路徑鈕 註冊的function
function main_PathRemoteBroker_click(that)
{
	var Class = new Path();
	Class.ClearTheDivOfTheTail(that, "#Main_Top-Path");
	$("#Main_Left-List").css("display", "block");
	Class = new RemoteBrokerSecondPage();
	Class.NoConfirmButton();
	Class = null;
}
//-----------Left List-----------
function main_RemoteBroker_click(that)
{
	var LeftDivId="#Main_Left-List";
	var Class = new ListCommon();
	Class.ChangeDivCss(that, LeftDivId);
	Class = new Path();
	Class.LoadPathHtml($(that).text(), 1, "main_PathRemoteBroker_click(this)");
	Class = new LoadHtml();
	var Html = Class.ReadTranslateAfterOfHtml("./Plugin/RemoteBroker/html/Css.html");
	Html = Html + Class.ReadTranslateAfterOfHtml("./Plugin/RemoteBroker/html/FirstPage.html");
	Html = Html + Class.ReadTranslateAfterOfHtml("./Plugin/RemoteBroker/html/SecondPage.html");
	$("#Main_Center-Content").empty();
	$("#Main_Center-Content").append(Html);
	Class = new RemoteBrokerFirstPage();
	Class.Initialization();
	Class = null;
}
//-----------Center-----------
//-----------遠端Broker-----------
  //第1頁
function main_RemoteBrokerAddNewRow_click(that)
{
	var Class = new RemoteBrokerFirstPage();
	Class.AddNewRow(that);
	Class = null;
}
function main_RemoteBrokerDeleteBroker_click(that)
{
	var Class = new RemoteBrokerFirstPage();
	
	if(Class.IsTickedBroker() == false)
	{
		$(that).closest(".Column").find(".Message").eq(0).show();
		return 0;
	}
	$(that).closest(".Column").find(".Message").eq(0).hide();
	
	Class.DeleteBroker(that);
	Class = null;
}
function main_RemoteBrokerEditButton_click(that)
{
	var Class = new RemoteBrokerFirstPage();
	Class.EditButton(that);
	Class = null;
}
function main_RemoteBrokerChangeAllCheckbox_click(that)
{
	var DataModelId = $(that).closest(".Table").attr("id");
	var Bool = $(that).closest(".Row").find(":checkbox").prop("checked");
	$("#"+DataModelId).find(".DynamicRow").find(":checkbox").prop("checked",Bool);
}
function main_RemoteBrokerShowPreviousPage_click()
{
	var Class = new RemoteBrokerFirstPage();
	Class.ShowPreviousPage();
	Class = null;
}
function main_RemoteBrokerShowNextPage_click()
{
	var Class = new RemoteBrokerFirstPage();
	Class.ShowNextPage();
	Class = null;
}
function main_RemoteBrokerSaveButton_click(that)
{
	var Class = new RemoteBrokerFirstPage();
	Class.SaveButton(that);
	Class = null;
}
  //第2頁
function main_RemoteBrokerChangeAnonymousLogin_click()
{
	var Class = new RemoteBrokerSecondPage();
	Class.ChangeAnonymousLogin();
	Class = null;
}
function main_RemoteBrokerChangeSslTls_click()
{
	var Class = new RemoteBrokerSecondPage();
	Class.ChangeSslTls();
	Class = null;
}
function main_RemoteBrokerConfirmButton_click(that)
{
	var Class = new RemoteBrokerSecondPage();
	Class.ConfirmButton(that);
	Class = null;
}
function main_RemoteBrokerNoConfirmButton_click()
{
	var Class = new RemoteBrokerSecondPage();
	Class.NoConfirmButton();
	Class = null;
}


// 遠端Broker 一般設定
function main_RemoteBrokerGeneralSetting_click(that)
{
	var Class = new RemoteBrokerSecondPage();
	Class.RemoteBrokerGeneralSetting();
	Class = null;
}
// 遠端Broker 憑證設定
function main_RemoteBrokerCertificateSetting_click(that)
{
	var Class = new RemoteBrokerSecondPage();
	Class.RemoteBrokerCertificateSetting();
	Class = null;
}