
var TrayIcon;
var EWA;
var channelWebWidth=0;
var channelWndWidth=0;

//记录进入mini模式前的最小长宽
var minWidth=0;
var minHeight=0;
function ManualUpdate()
{
	var ppFrame=Components.GetObject("@pplive.com/PPFrame;1");
	if(ppFrame)
	{
		ppFrame.ManualUpdate();
	}

}
function windowOnSizemode()
{
	var maxRestoreBtn = document.getElementById('maxRestoreBtn');
	if (window.sizemode == IDOMWindow.SizeMode_Maximized)
		maxRestoreBtn.checked = true;
	else 
		maxRestoreBtn.checked=false;
}

// 迷你模式是设置元素的位置
function windowOnSize()
{
	var tidyMode = window.tidyMode;

	if (tidyMode)
	{
		var mainWindow = document.getElementById('mainWindow');
		var tidyModeRegion = document.getElementById('tidyModeRegion');
		tidyModeRegion.sizeTo(mainWindow.width, mainWindow.height);

		var mainSubWindow = document.getElementById('mainSubWindow');
		mainSubWindow.moveSizeTo(3, 3, window.innerWidth-6, window.innerHeight-6);
	}

	return !tidyMode;
}

// 进入迷你模式
function enterTidyMode()
{
	if (window.tidyMode || EwaIsFullScreen())
	{
		return ;
	}
	//禁止左右互换,在switchChannelDir()中处理？
	/*
	$("menu_switchDir2").disabled=true;
	$("menu_switchDir").disabled=true;
	$("key_switchDir").disabled=true;	
	*/
	minWidth=window.minWidth;
	minHeight=window.minHeight;
	window.lock(7);
	window.tidyMode = true;

	var fullModeRegion = $("fullModeRegion");
	var tidyModeRegion = $("tidyModeRegion");
	var titleBar = $("titleBar");

	titleBar.visible = false;
	fullModeRegion.visible = false;
	tidyModeRegion.visible = true;

	var mainSplitter = $("mainSplitter");
	$("channelWnd").visible = false;
	
	window.tidyModeSplitterSinglePaneMode = mainSplitter.singlePaneMode;

	mainSplitter.singlePaneMode = 0;
	$("statusPanel").visible = false; // 隐藏走马灯

	window.unlock(7);

	try
	{
		$("playerWnd").wrappedObject.ResizerCommand(4 , 1);
	}
	catch (e)
	{
	}
	window.setMinWidthAndHeight(const_minWidth_Player_mini,const_minHeight_Player_mini,true);
}

// 退出迷你模式
function exitTidyMode()
{
	if (!window.tidyMode || EwaIsFullScreen())
	{
		return ;
	}
	//打开左右互换,在switchChannelDir()中处理？
	/*
	$("menu_switchDir2").disabled=false;
	$("menu_switchDir").disabled=false;
	$("key_switchDir").disabled=false;	
	*/
	
	window.lock(7);
	window.tidyMode = false;

	var fullModeRegion = $("fullModeRegion");
	var tidyModeRegion = $("tidyModeRegion");
	var titleBar = $("titleBar");

	titleBar.visible = true;
	fullModeRegion.visible = true;
	tidyModeRegion.visible = false;

	$("mainSubWindow").moveTo(2, 27);

	var mainSplitter = $("mainSplitter");
	
	mainSplitter.singlePaneMode = window.tidyModeSplitterSinglePaneMode;
	if (mainSplitter.singlePaneMode == -1)
	{
		$("channelWnd").visible = true;
	}

	$("statusPanel").visible = true;
	window.unlock(7);

	try
	{
		$("playerWnd").wrappedObject.ResizerCommand(4 , 0);
	}
	catch (e)
	{
	}
	window.setMinWidthAndHeight(minWidth,minHeight,true);	
}

function windowOpenUrl()
{
	var url = window.showModalDialog("openurl.xml");
//	if (url.Length > 0)
	{
		EwaPlayString(url);
	}
}

// 从注册表中加载(经典|扩展)模式
function windowInit()
{
	var type = 0;
	var leftright = 0; // 1 频道列表在左边
	try
	{
		var registry = Components.CreateObject("@pplive.com/registry;1");
		if (registry.open(registry.HKCU, "Software\\PPLive\\Config\\Layout",IRegistry.KEY_READ))
		{
			type = registry.readDWORD("type");
			leftright = registry.readDWORD("leftright");
		}
	}
	catch (e)
	{
		type = 0;
		leftright = 0;
	}

	type=0;
	if (type == 0)
	{
		channelWndWidth=$("channelContainer").width;
		channelWebWidth=0;
		switchToClassicMode();
		//$("channelWnd").setContractId("@pplive.com/chwnd;1", true);
	}
	else
	{
		channelWndWidth=0;
		channelWebWidth=$("channelContainer").width;
		switchToModernMode();
		//$("channelWnd").setContractId("@pplive.com/WebBrowser;1", true);
		//$("channelWnd").wrappedObject.Url = "http://res1.pplive.com/v201/main.html";
	}

	if (leftright != 0)
	{
		$("mainSplitter").panePlace = false;
	}
}

function isClassicMode()
{
	if ($("channelWnd").contractId == "@pplive.com/chwnd;1")
	{
		return true;
	}

	return false;
}

function isModernMode()
{
	if ($("channelWnd").contractId == "@pplive.com/WebBrowser;1")
	{
		return true;
	}

	return false;
}

function cmdlineHandler(aCmdLine)
{
	if (aCmdLine.state == 0)
	{
		if (aCmdLine.findFlag("autorun") != -1)
		{
			return;
		}
		if (isClassicMode())
		{
			window.visible = true;
			try
			{Components.GetObject("Loading").Destroy();}
			catch (e){}
		}
		else
		{
			window.showWindowTimeout = window.setTimeout("window.showWindowTimeout=0;window.visible=true; Components.GetObject('Loading').Destroy();", 30000);
		}
	}
	else if (aCmdLine.state == 1)
	{
		window.activated = true;
		window.visible = true;
	}

	var url = aCmdLine.handleFlagWithParam("play");
	if (url.length > 0)
	{
		EwaPlayString(url);
	}

	if (aCmdLine.length > 1)
	{
		url = aCmdLine.getArgument(1);
		if (url.length > 0)
		{
			EwaPlayString(url);
		}
	}
}

function checkUnFullscreen()
{
	if (EwaIsFullScreen())
	{
		EwaUnFullScreen();
	}
}

function windowOnload()
{
	window.tidyMode = false;
	window.enterTidyMode = enterTidyMode;
	window.exitTidyMode = exitTidyMode;
	window.showPreferences = function()
	{ 
		if (window.isShowPreferences) { return; }
		checkUnFullscreen();
		window.isShowPreferences = true;
		window.showModalDialog('Options.xml');
		window.isShowPreferences = false;
	};
	window.showAbout = function()
	{
		if (window.isShowAbout) { return; }
		checkUnFullscreen();
		window.isShowAbout = true;
		window.showModalDialog("about.xml","","notdisableparent=1");
		window.isShowAbout = false;
	};

	window.openUrl = function()
	{
		checkUnFullscreen();
		return windowOpenUrl();
	}
	window.openFile = function()
	{
		checkUnFullscreen();
		return OpenFile();
	}
	window.directClose = function()
	{ 
		window.showAttemptCloseDialog = false;
		window.close();
	}
// 显示隐藏频道列表
	window.showChannel = function(aShow)
	{
		if(aShow==$("channelWnd").visible) return;
		var mainSplitter = $("mainSplitter");
		window.lock(7);
		mainSplitter.lock(7);

		var newScreenLeft = window.screenLeft;
		var newScreenTop = window.screenTop;
		var newOuterWidth = window.outerWidth;
		var newOuterHeight = window.outerHeight;

		var newMinWidth = 0;
		var newMinHeight = window.minHeight;

		var splitterMode = 0;
		if (aShow)
		{
			newOuterWidth += $("channelContainer").width+4;
			if (!mainSplitter.panePlace)
			{
				newScreenLeft -= ($("channelContainer").width + 4);
			}
			
			newMinWidth += 2+$("mainSplitter").getPaneMinSize(0)+4+$("mainSplitter").getPaneMinSize(1)+2;
				splitterMode = -1;
		}
		else
		{
			newOuterWidth -= ($("channelContainer").width + 4);
			if (!mainSplitter.panePlace)
			{
				newScreenLeft += $("channelContainer").width + 4;
			}
			newMinWidth += 2+$("mainSplitter").getPaneMinSize(0)+2;
			splitterMode = 0;
			$("channelWnd").visible = false;
			$("statusPanel").visible = false; // 隐藏走马灯
		}

		window.unlock(7);
		
		mainSplitter.singlePaneMode = splitterMode;
		window.setMinWidthAndHeight(newMinWidth, newMinHeight, false);
		window.moveSizeTo(newScreenLeft, newScreenTop, newOuterWidth, newOuterHeight);
		mainSplitter.unlock(7);

		if (aShow)
		{
			$("channelWnd").visible = true;
			$("statusPanel").visible = true; // 显示走马灯

		}
		try
		{
			$("playerWnd").wrappedObject.NotifyChannelPane(aShow ? 0 : 1);
		}
		catch (e)
		{
		}
	}

	window.channelIsVisible = function()
	{
		return $("mainSplitter").singlePaneMode == -1;
	}
	window.channelIsLeft = function()
	{
		return !$("mainSplitter").panePlace;
	}
	window.setTaskBarTitle = function (aTitle)
	{
		window.title = aTitle;
	}

	window.getTaskBarTitle = function()
	{
		return window.title;
	}
	window.setWindowTitle = function (aTitle)
	{
		$("windowTitle").value = aTitle;
	}

	window.getWindowTitle = function()
	{
		return $("windowTitle").value;
	}	
	
	window.SetDisplayPos=function(aPos)	//0 right,!0 left
	{
		if(window.tidyMode || $("channelWnd").visible == false || EwaIsFullScreen()) return;
		$("mainSplitter").panePlace = !aPos;
	}
	window.SetDisplayType=function(aType)  //0 classic,!0 modern
	{
		if(!aType) switchToClassicMode();
		else switchToModernMode();
	}	

	window.showAttemptCloseDialog = true;  // 是否显示关闭对话框

	window.setTopMost=function(aTopMost)
	{
		if(aTopMost)$("menu_topmost").checked=true;
		else $("menu_topmost").checked=false;
	}
	windowInit();
	InitTimingService();


// 命令行
	var cmdlinemgr = Components.GetObject("@pplive.com/command-line;1");
	window.cmdlineMgrCookie = cmdlinemgr.AddHandler(cmdlineHandler);

// 系统托盘
	TrayIcon = Components.GetObject("@pplive.com/PPIconTray;1");
	Components.RegisterObject("SkinForm1",TrayIcon);//气泡支持
	TrayIcon.AddIcon();
	
	EWA = Components.GetObject("EWA");
	EWA.onPlayStateChanged=EwaOnPlayStateChanged;

// passport 自动登录
	passportAutoLogin();
}

function windowOnUnload()
{
	var cmdlinemgr = Components.GetObject("@pplive.com/command-line;1");
	cmdlinemgr.RemoveHandler(window.cmdlineMgrCookie);

	TrayIcon.DeleteIcon();
	UninitTimingService();
}

// 返回 false 停止关闭
function windowOnClose()
{
	if (!window.showAttemptCloseDialog)
	{
		return true;
	}

	try
	{
		// 检查配置
		var registry = Components.CreateObject("@pplive.com/registry;1");
		if (registry && registry.open(registry.HKCU, "Software\\PPLive\\Config\\Other"))
		{
			if (registry.readDWORD("NoExitInfo")) // 不显示关闭对话框
			{
				if (registry.readDWORD("CloseAction")) // 最小化到托盘
				{
					window.sizemode=1;window.visible = false;
					return false;
				}
				// 直接关闭
				return true;
			}
		}
		
		// 显示关闭对话框，由用户判断是否关闭
		var userSelect = window.showModalDialog("attemptclose.xml");
		//0 表示取消 1 关闭 2 最小化到托盘
		switch (userSelect)
		{
		case 0:
			return false;
		case 1:
			return true;
		case 2:
			window.sizemode=1;window.visible = false;
			return false;
		default:
			return true;
		}
	}
	catch (e)
	{
		return true;
	}
}

//

function titleBarMouseDown(event)
{
	switch (event.button)
	{
	case IDOMEvent.eLeftButton:
		window.size("move");
		break;
	case IDOMEvent.eRightButton:
		$("mainMenu").openPopupAtScreen(-1, -1);
		break;
	}
}

function switchToClassicMode()
{
	if(EwaIsFullScreen()) return;
	exitTidyMode();

	var PlayerWidth=$("playerContainer").width;
	//记录下web的宽度，切换回来的时候恢复
	channelWebWidth=$("channelContainer").width;
	//设置列表的最小宽度
	$("mainSplitter").setPaneMinSize(1,const_minWidth_list,0);
	if(channelWndWidth<const_minWidth_list) channelWndWidth=const_minWidth_list;
	
	//设置最小宽度的时候，保证整个窗体的最小宽度比各个子窗口的最小宽度和要大
	var minWidth=2+$("mainSplitter").getPaneMinSize(0)+4+$("mainSplitter").getPaneMinSize(1)+2;
	if (window.minWidth!=minWidth)window.setMinWidthAndHeight(minWidth, window.minHeight, false);


	if ($("channelWnd").contractId == "@pplive.com/chwnd;1" && $("channelWnd").visible != false)
	{
		return;
	}
	$("menu_switchToClassicMode").checked=true;
	$("menu_switchToClassicMode2").checked=true;	
	$("menu_switchToModernMode").checked=false;
	$("menu_switchToModernMode2").checked=false;		
	
	$("channelWnd").setContractId("@pplive.com/chwnd;1", true);
	var registry = Components.CreateObject("@pplive.com/registry;1");
	if (registry.open(registry.HKCU, "Software\\PPLive\\Config\\Layout",IRegistry.KEY_WRITE))
	{
		registry.writeDWORD("type", 0);
	}
	
	var newScreenLeft = window.screenLeft;
	var newScreenTop = window.screenTop;
	var newOuterWidth = window.outerWidth;
	var newOuterHeight = window.outerHeight;
	
	//更改整个窗体的大小和位置
	var pos;
	if($("mainSplitter").panePlace)
	{
		pos=PlayerWidth;
	}
	else 
	{
		pos=channelWndWidth;
		newScreenLeft=newScreenLeft+channelWebWidth-channelWndWidth;
	}
	newOuterWidth=2+PlayerWidth + 4 + channelWndWidth + 2;
	if(window.showChannel)window.showChannel(true);
	window.moveSizeTo(newScreenLeft, newScreenTop, newOuterWidth, newOuterHeight);
	//窗体布局
	if($("mainSplitter").splitterPos!=pos)$("mainSplitter").splitterPos=pos;	
}

function switchToModernMode()
{
	if(EwaIsFullScreen()) return;
	exitTidyMode();

	var PlayerWidth=$("playerContainer").width;
	//记录下列表的宽度，切换回来的时候恢复
	channelWndWidth=$("channelContainer").width;
	//设置Web的最小宽度
	$("mainSplitter").setPaneMinSize(1,const_minWidth_web,0);
	if(channelWebWidth<const_minWidth_web) channelWebWidth=const_minWidth_web;
	
	//设置最小宽度的时候，保证整个窗体的最小宽度比各个子窗口的最小宽度和要大
	var minWidth=2+$("mainSplitter").getPaneMinSize(0)+4+$("mainSplitter").getPaneMinSize(1)+2;
	if(window.showChannel)window.showChannel(true);
	if (window.minWidth!=minWidth)window.setMinWidthAndHeight(minWidth, window.minHeight, false);

	if ($("channelWnd").contractId == "@pplive.com/WebBrowser;1" && $("channelWnd").visible != false)
	{
		return;
	}
	$("menu_switchToClassicMode").checked=false;
	$("menu_switchToClassicMode2").checked=false;	
	$("menu_switchToModernMode").checked=true;
	$("menu_switchToModernMode2").checked=true;	
	$("channelWnd").setContractId("@pplive.com/WebBrowser;1", false);
	$("channelWnd").wrappedObject.Url = "http://res1.pplive.com/v201/main.html"; //"";
	try{Components.UnregisterObject("webchannel");}catch(e){}
	try{Components.RegisterObject("webchannel", $("channelWnd").wrappedObject);}catch(e){}

	var registry = Components.CreateObject("@pplive.com/registry;1");
	if (registry.open(registry.HKCU, "Software\\PPLive\\Config\\Layout",IRegistry.KEY_WRITE))
	{
		registry.writeDWORD("type", 1);
	}
	var newScreenLeft = window.screenLeft;
	var newScreenTop = window.screenTop;
	var newOuterWidth = window.outerWidth;
	var newOuterHeight = window.outerHeight;

	//更改整个窗体的大小
	var pos;
	if($("mainSplitter").panePlace)
	{
		pos=PlayerWidth;
	}
	else 
	{
		pos=channelWndWidth;
		newScreenLeft=newScreenLeft+channelWndWidth-channelWebWidth;
	}	
	newOuterWidth=2+PlayerWidth + 4 + channelWebWidth + 2;
	window.moveSizeTo(newScreenLeft, newScreenTop, newOuterWidth, newOuterHeight);
	//窗体布局
	if($("mainSplitter").splitterPos!=pos)$("mainSplitter").splitterPos=pos;
}

function switchChannelDir()
{
	if(window.tidyMode || $("channelWnd").visible == false || EwaIsFullScreen()) return;
	$("mainSplitter").panePlace = !$("mainSplitter").panePlace;

	var registry = Components.CreateObject("@pplive.com/registry;1");
	if (registry.open(registry.HKCU, "Software\\PPLive\\Config\\Layout",IRegistry.KEY_WRITE))
	{
		registry.writeDWORD("leftright", $("mainSplitter").panePlace ? 0 : 1);
	}

}

function changeTopMost()
{
	$("menu_topmost").checked=!$("menu_topmost").checked;
	window.topMost=$('menu_topmost').checked;
}

function passportAutoLogin()
{
	var registry = Components.CreateObject("@pplive.com/registry;1");
	if (registry.open(registry.HKCU, "Software\\PPLive\\passport", IRegistry.KEY_READ))
	{
		if (registry.readDWORD("autologin"))
		{
			var username = registry.readString("username");
			var password = registry.readString("password");
			if (username.length > 0 && password.length > 0)
			{
					$("passport").Login(username, password);
			}
		}
	}
}

function passportLogin(vLogin)
{
	if (vLogin)
	{
		$("userid").value = $("passport").userName;
		$("usercredit").value = "经验值:" + $("passport").userCredit;

		$('channelContainer').relayout();
		$("afterSign").visible = true;
		$("beforeSign").visible = false;
	}
}

function passportLogout()
{
	$("beforeSign").visible = true;
	$("afterSign").visible = false;

	if ($('channelContainer').passportIsExpanded)
	{
		passportButtonClick(false);
	}
	else
	{
		$('channelContainer').relayout();
	}
	$("userid").value = "";
	$("usercredit").value = "";
}
// SIG // Begin signature block
// SIG // MIIVLQYJKoZIhvcNAQcCoIIVHjCCFRoCAQExCzAJBgUr
// SIG // DgMCGgUAMGcGCisGAQQBgjcCAQSgWTBXMDIGCisGAQQB
// SIG // gjcCAR4wJAIBAQQQEODJBs441BGiowAQS9NQkAIBAAIB
// SIG // AAIBAAIBAAIBADAhMAkGBSsOAwIaBQAEFL63FkaBIdFn
// SIG // 5BJ6w8nWrVgdipNvoIIRMjCCA3owggJioAMCAQICEDgl
// SIG // 1/r4Ya+e9JDnJrXWWtUwDQYJKoZIhvcNAQEFBQAwUzEL
// SIG // MAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJ
// SIG // bmMuMSswKQYDVQQDEyJWZXJpU2lnbiBUaW1lIFN0YW1w
// SIG // aW5nIFNlcnZpY2VzIENBMB4XDTA3MDYxNTAwMDAwMFoX
// SIG // DTEyMDYxNDIzNTk1OVowXDELMAkGA1UEBhMCVVMxFzAV
// SIG // BgNVBAoTDlZlcmlTaWduLCBJbmMuMTQwMgYDVQQDEytW
// SIG // ZXJpU2lnbiBUaW1lIFN0YW1waW5nIFNlcnZpY2VzIFNp
// SIG // Z25lciAtIEcyMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCB
// SIG // iQKBgQDEtfJSFbyIhmApFkpbL0uRa4eR8zVUWDXq0TZe
// SIG // Yk1SUTRxwntmHYnI3SrEagr2N9mYdJH2kq6wtXaW8alK
// SIG // Y0VHLmsLkk5LK4zuWEqL1AfkGiz4gqpY2c1C8y3Add6N
// SIG // q8eOHZpsTAiVHt7b72fhcsJJwp5gPOHivhajY3hpFHut
// SIG // LQIDAQABo4HEMIHBMDQGCCsGAQUFBwEBBCgwJjAkBggr
// SIG // BgEFBQcwAYYYaHR0cDovL29jc3AudmVyaXNpZ24uY29t
// SIG // MAwGA1UdEwEB/wQCMAAwMwYDVR0fBCwwKjAooCagJIYi
// SIG // aHR0cDovL2NybC52ZXJpc2lnbi5jb20vdHNzLWNhLmNy
// SIG // bDAWBgNVHSUBAf8EDDAKBggrBgEFBQcDCDAOBgNVHQ8B
// SIG // Af8EBAMCBsAwHgYDVR0RBBcwFaQTMBExDzANBgNVBAMT
// SIG // BlRTQTEtMjANBgkqhkiG9w0BAQUFAAOCAQEAUMVLyCSA
// SIG // 3+QNJMLeGrGhAqGmgi0MgxWBNwqCDiywWhdhtdgF/ojb
// SIG // 8ZGRs1YaQKbrkr44ObB1NnQ6mE/kN7qZicqVQh2wuceg
// SIG // jVfg+tVkBEI1TgHRM6IXyE2qJ8fy4YZMAjhNg3jG/FPg
// SIG // 6+AGh92klp5eDJjipb6/goXDYOHfrSjYx6VLZNrHG1u9
// SIG // rDkI1TgioTOLL4qa67wHIT9EQQkHtWUcJLxI00SA66HP
// SIG // yQK0FM9UxxajgFz5eT5dcn2IF54sQ6LKU859PfYqOrhP
// SIG // lAClbQqDXfleU/QYs1cPcMP79a2VoA4X3sQWgGDJDytu
// SIG // hgTx6/R4J9EFxe40W165STLyMzCCA8QwggMtoAMCAQIC
// SIG // EEe/GZXfjVJGQ/fbbUgNMaQwDQYJKoZIhvcNAQEFBQAw
// SIG // gYsxCzAJBgNVBAYTAlpBMRUwEwYDVQQIEwxXZXN0ZXJu
// SIG // IENhcGUxFDASBgNVBAcTC0R1cmJhbnZpbGxlMQ8wDQYD
// SIG // VQQKEwZUaGF3dGUxHTAbBgNVBAsTFFRoYXd0ZSBDZXJ0
// SIG // aWZpY2F0aW9uMR8wHQYDVQQDExZUaGF3dGUgVGltZXN0
// SIG // YW1waW5nIENBMB4XDTAzMTIwNDAwMDAwMFoXDTEzMTIw
// SIG // MzIzNTk1OVowUzELMAkGA1UEBhMCVVMxFzAVBgNVBAoT
// SIG // DlZlcmlTaWduLCBJbmMuMSswKQYDVQQDEyJWZXJpU2ln
// SIG // biBUaW1lIFN0YW1waW5nIFNlcnZpY2VzIENBMIIBIjAN
// SIG // BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqcqypMzN
// SIG // IK8KfYmsh3XwtE7x38EPv2dhvaNkHNq7+cozq4QwiVh+
// SIG // jNtr3TaeD7/R7Hjyd6Z+bzy/k68Numj0bJTKvVItq0g9
// SIG // 9bbVXV8bAp/6L2sepPejmqYayALhf0xS4w5g7EAcfrkN
// SIG // 3j/HtN+HvV96ajEuA5mBE6hHIM4xcw1XLc14NDOVEpkS
// SIG // ud5oL6rm48KKjCrDiyGHZr2DWFdvdb88qiaHXcoQFTyf
// SIG // hOpUwQpuxP7FSt25BxGXInzbPifRHnjsnzHJ8eYiGdvE
// SIG // s0dDmhpfoB6Q5F717nzxfatiAY/1TQve0CJWqJXNroh2
// SIG // ru66DfPkTdmg+2igrhQ7s4fBuwIDAQABo4HbMIHYMDQG
// SIG // CCsGAQUFBwEBBCgwJjAkBggrBgEFBQcwAYYYaHR0cDov
// SIG // L29jc3AudmVyaXNpZ24uY29tMBIGA1UdEwEB/wQIMAYB
// SIG // Af8CAQAwQQYDVR0fBDowODA2oDSgMoYwaHR0cDovL2Ny
// SIG // bC52ZXJpc2lnbi5jb20vVGhhd3RlVGltZXN0YW1waW5n
// SIG // Q0EuY3JsMBMGA1UdJQQMMAoGCCsGAQUFBwMIMA4GA1Ud
// SIG // DwEB/wQEAwIBBjAkBgNVHREEHTAbpBkwFzEVMBMGA1UE
// SIG // AxMMVFNBMjA0OC0xLTUzMA0GCSqGSIb3DQEBBQUAA4GB
// SIG // AEpr+epYwkQcMYl5mSuWv4KsAdYcTM2wilhu3wgpo17I
// SIG // ypMT5wRSDe9HJy8AOLDkyZNOmtQiYhX3PzchT3AxgPGL
// SIG // OIez6OiXAP7PVZZOJNKpJ056rrdhQfMqzufJ2V7duyuF
// SIG // PrWdtdnhV/++tMV+9c8MnvCX/ivTO1IbGzgn9z9KMIIE
// SIG // 6DCCA9CgAwIBAgIQCyS3NQo1ILRN3Mqia+3YUDANBgkq
// SIG // hkiG9w0BAQUFADCBtjELMAkGA1UEBhMCVVMxFzAVBgNV
// SIG // BAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJp
// SIG // U2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJt
// SIG // cyBvZiB1c2UgYXQgaHR0cHM6Ly93d3cudmVyaXNpZ24u
// SIG // Y29tL3JwYSAoYykwOTEwMC4GA1UEAxMnVmVyaVNpZ24g
// SIG // Q2xhc3MgMyBDb2RlIFNpZ25pbmcgMjAwOS0yIENBMB4X
// SIG // DTA5MDkwNzAwMDAwMFoXDTEwMTAwMjIzNTk1OVowgaUx
// SIG // CzAJBgNVBAYTAkNOMREwDwYDVQQIEwhTaGFuZ2hhaTER
// SIG // MA8GA1UEBxMIU2hhbmdoYWkxFzAVBgNVBAoUDlN5bmFj
// SIG // YXN0IENvcnAuMT4wPAYDVQQLEzVEaWdpdGFsIElEIENs
// SIG // YXNzIDMgLSBNaWNyb3NvZnQgU29mdHdhcmUgVmFsaWRh
// SIG // dGlvbiB2MjEXMBUGA1UEAxQOU3luYWNhc3QgQ29ycC4w
// SIG // gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMsIr8Ao
// SIG // qkn0e0BfTxIq2DqFoidNJLMNYW4vGFOcrszVqQNncKWA
// SIG // vZfAwqzE3Str8z1cKmzF9aXgDiBgFk078srUI2GlGaEQ
// SIG // tXpKq1TgkyxEgU2jKexWxATWPoSxvW1Nr+wJyub+WQbL
// SIG // 1wvOZ2GRhI8qh6+DTmfWbmaqZk1/GjiDAgMBAAGjggGD
// SIG // MIIBfzAJBgNVHRMEAjAAMA4GA1UdDwEB/wQEAwIHgDBE
// SIG // BgNVHR8EPTA7MDmgN6A1hjNodHRwOi8vY3NjMy0yMDA5
// SIG // LTItY3JsLnZlcmlzaWduLmNvbS9DU0MzLTIwMDktMi5j
// SIG // cmwwRAYDVR0gBD0wOzA5BgtghkgBhvhFAQcXAzAqMCgG
// SIG // CCsGAQUFBwIBFhxodHRwczovL3d3dy52ZXJpc2lnbi5j
// SIG // b20vcnBhMBMGA1UdJQQMMAoGCCsGAQUFBwMDMHUGCCsG
// SIG // AQUFBwEBBGkwZzAkBggrBgEFBQcwAYYYaHR0cDovL29j
// SIG // c3AudmVyaXNpZ24uY29tMD8GCCsGAQUFBzAChjNodHRw
// SIG // Oi8vY3NjMy0yMDA5LTItYWlhLnZlcmlzaWduLmNvbS9D
// SIG // U0MzLTIwMDktMi5jZXIwHwYDVR0jBBgwFoAUl9BrqCZw
// SIG // yKE/lB8ILcQ1m6ShHvIwEQYJYIZIAYb4QgEBBAQDAgQQ
// SIG // MBYGCisGAQQBgjcCARsECDAGAQEAAQH/MA0GCSqGSIb3
// SIG // DQEBBQUAA4IBAQAtVdSb634XG9WbL3O4ynzZbtjwD065
// SIG // 6EG/DXi9LZloiRJ18DhwAST1HyI+MWstfIWcn2epfglH
// SIG // RTMn7+3bDuLfwZ7Rxp57PLXAxP4pXMM9rHwn65FhMLK0
// SIG // MHtyJe6pbDGWFWLPaIhdxh9SCksBGrDHE4jGe6uMJlqw
// SIG // w6lgO+7Bl1ddkx01XlrGK4deUcOZmnYixWkBf1pG6nCL
// SIG // 37wxzqm8Ts6AivQk25hNjicFaMZ9T7nAk0nX+ArXDMvl
// SIG // cdBA+wQ4H6XIdehFZvwWUXGl/rC6D4qYLZuxvduDLTYd
// SIG // WPg7B4yNePjvzM9RCVSWuKHbZasJt3oqzx+SIQnLwQmr
// SIG // yKCpMIIE/DCCBGWgAwIBAgIQZVIm4bIuGOFZDymFrCLn
// SIG // XDANBgkqhkiG9w0BAQUFADBfMQswCQYDVQQGEwJVUzEX
// SIG // MBUGA1UEChMOVmVyaVNpZ24sIEluYy4xNzA1BgNVBAsT
// SIG // LkNsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNh
// SIG // dGlvbiBBdXRob3JpdHkwHhcNMDkwNTIxMDAwMDAwWhcN
// SIG // MTkwNTIwMjM1OTU5WjCBtjELMAkGA1UEBhMCVVMxFzAV
// SIG // BgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZW
// SIG // ZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJU
// SIG // ZXJtcyBvZiB1c2UgYXQgaHR0cHM6Ly93d3cudmVyaXNp
// SIG // Z24uY29tL3JwYSAoYykwOTEwMC4GA1UEAxMnVmVyaVNp
// SIG // Z24gQ2xhc3MgMyBDb2RlIFNpZ25pbmcgMjAwOS0yIENB
// SIG // MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
// SIG // vmcdtGCqEElvVhd8Zslehg3V8ayncYOOi4n4iASJFQa6
// SIG // LYQhleTRnFBM+9IivdrysjU7Ho/DCfv8Ey5av4l8PTsl
// SIG // HvbzWHuc9AG1xgq4gM6+J3RhZydNauXsgWFYeaPgFxAS
// SIG // FSew4U00fytHIES53mYkZorNT7ofxTjIVJDhcvYZZnVq
// SIG // uUlozzh5DaowqNssYEie16oUAamD1ziRMDkTlgM6fEBU
// SIG // tq3gLxuD3KgRUj4Cs9cr/SG2p1yjDwupphBQDjQuTafO
// SIG // yV4l1Iy88258KbwBXfwxh1rVjIVnWIgZoL818OoroyHn
// SIG // kPaD5ajtYHhee2CD/VcLXUENY1Rg1kMh7wIDAQABo4IB
// SIG // 2zCCAdcwEgYDVR0TAQH/BAgwBgEB/wIBADBwBgNVHSAE
// SIG // aTBnMGUGC2CGSAGG+EUBBxcDMFYwKAYIKwYBBQUHAgEW
// SIG // HGh0dHBzOi8vd3d3LnZlcmlzaWduLmNvbS9jcHMwKgYI
// SIG // KwYBBQUHAgIwHhocaHR0cHM6Ly93d3cudmVyaXNpZ24u
// SIG // Y29tL3JwYTAOBgNVHQ8BAf8EBAMCAQYwbQYIKwYBBQUH
// SIG // AQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2UvZ2lmMCEwHzAH
// SIG // BgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYj
// SIG // aHR0cDovL2xvZ28udmVyaXNpZ24uY29tL3ZzbG9nby5n
// SIG // aWYwHQYDVR0lBBYwFAYIKwYBBQUHAwIGCCsGAQUFBwMD
// SIG // MDQGCCsGAQUFBwEBBCgwJjAkBggrBgEFBQcwAYYYaHR0
// SIG // cDovL29jc3AudmVyaXNpZ24uY29tMDEGA1UdHwQqMCgw
// SIG // JqAkoCKGIGh0dHA6Ly9jcmwudmVyaXNpZ24uY29tL3Bj
// SIG // YTMuY3JsMCkGA1UdEQQiMCCkHjAcMRowGAYDVQQDExFD
// SIG // bGFzczNDQTIwNDgtMS01NTAdBgNVHQ4EFgQUl9BrqCZw
// SIG // yKE/lB8ILcQ1m6ShHvIwDQYJKoZIhvcNAQEFBQADgYEA
// SIG // iwPA3ZTYQaJhabAVqHjHMMaQPH5C9yS25INzFwR/BBCc
// SIG // oeL6gS/rwMpE53LgULZVECCDbpaS5JpRarQ3MdylLeuM
// SIG // AMcdT+dNMrqF+E6++mdVZfBqvnrKZDgaEBB4RXYx84Z6
// SIG // Aw9gwrNdnfaLZnaCG1nhg+W9SaU4VuXeQXcOWA8xggNn
// SIG // MIIDYwIBATCByzCBtjELMAkGA1UEBhMCVVMxFzAVBgNV
// SIG // BAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJp
// SIG // U2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJt
// SIG // cyBvZiB1c2UgYXQgaHR0cHM6Ly93d3cudmVyaXNpZ24u
// SIG // Y29tL3JwYSAoYykwOTEwMC4GA1UEAxMnVmVyaVNpZ24g
// SIG // Q2xhc3MgMyBDb2RlIFNpZ25pbmcgMjAwOS0yIENBAhAL
// SIG // JLc1CjUgtE3cyqJr7dhQMAkGBSsOAwIaBQCgcDAQBgor
// SIG // BgEEAYI3AgEMMQIwADAZBgkqhkiG9w0BCQMxDAYKKwYB
// SIG // BAGCNwIBBDAcBgorBgEEAYI3AgELMQ4wDAYKKwYBBAGC
// SIG // NwIBFTAjBgkqhkiG9w0BCQQxFgQUxEplWY3TXEY9Ld/0
// SIG // Gj9kVYVyukUwDQYJKoZIhvcNAQEBBQAEgYCURbWrajEu
// SIG // JG1BhV8BceFWOy5DbYzaVNUyS4ueFWYuAinCS/392UYD
// SIG // HFSmrjhIHzjZuPfHtq/734YKgaORnzOu7F283boyaOjN
// SIG // FXjtCn26JtpOMm9BHotU+eeoFfUdPOPao5MtO/RbrKuS
// SIG // 930vkg8TVDUGTDAico3Ps7mG3fxgs6GCAX8wggF7Bgkq
// SIG // hkiG9w0BCQYxggFsMIIBaAIBATBnMFMxCzAJBgNVBAYT
// SIG // AlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjErMCkG
// SIG // A1UEAxMiVmVyaVNpZ24gVGltZSBTdGFtcGluZyBTZXJ2
// SIG // aWNlcyBDQQIQOCXX+vhhr570kOcmtdZa1TAJBgUrDgMC
// SIG // GgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAc
// SIG // BgkqhkiG9w0BCQUxDxcNMDkwOTE0MTAwNjA5WjAjBgkq
// SIG // hkiG9w0BCQQxFgQUM+Ixy4icC11LAK2khNpMRr5WK/8w
// SIG // DQYJKoZIhvcNAQEBBQAEgYAtCjyLe26nUIpUgjj6kIGd
// SIG // VFl9wV5iMIfWZ2kbDBGpi5EQGPVTuhBVA1xF51bP6oid
// SIG // VPoj4LUY02DHtfEa913aLekaA05wZT+NYLYxL3kLUq6B
// SIG // 5n5zBelMwcSlaOy89mXm7oId/dUbl5t9C2czyc2uLskp
// SIG // z1cknwI8vLs75GGrFA==
// SIG // End signature block
