<?xml version="1.0" encoding="utf-8"?>
<window id="mainWindow" left="0" top="0" width="878" height="540" titleBar="false" resizeMargins="3,3,3,3" bottomRightCorner="0,0" minWidth="754" minHeight="449" onload="window.loading=true;constructor();centerWindow();AddSupport_HotKey();$('Player').setContractId('@pplive.com/PPFrame;1', true);windowOnload();window.loading=false;" onunload="try{windowOnUnload();}catch(e){}" onsizemode="windowOnSizemode();" onsize="if(window.firstSize){window.firstSize=false; $('channelWnd').visible=true;} return windowOnSize();" onclose="return windowOnClose();" ontaskbarbuttoncreated="OnTaskbarButtonCreated();" onrunmodechanged="windowOnChangeMode();" onactivate="OnActive(event.activated)" onshow="windowOnShow();" title="PPTV">
	<script src="common.js" />
	<script src="timingservice.js" />
	<script src="mainframe.xml.js" />
	<script src="tabs.js" />
	<script src="Balloons.js" />
	<script>
	<![CDATA[
		window.firstSize = true;
		function closeWindow()
		{
			window.close();
		}
		function constructor()
		{
			$("channelContainer").passportIsExpanded = false;
			$("channelContainer").relayout = function(){this.moveSizeTo(this.left, this.top, this.width, this.height);};
			$("mainSubWindow").relayout = function(){this.moveSizeTo(this.left, this.top, this.width, this.height);};
		}
		function layoutChannelContainer()
		{
			if ($("channelContainer").passportIsExpanded)
			{
				var width = $("channelContainer").width;
				var height = $("channelContainer").height;
				
				$("passportContainer").moveSizeTo($("channelContainer").left, $("channelContainer").top, width + 39, 56);
				if(window.tabs)window.tabs.movePanel(0, 56, width, height-56-16 + 3 - 6);
//				$("channelWnd").moveSizeTo(0, 56, width, height-56-16 + 3);
				$("statusPanel").moveSizeTo(width-22-212, height-16 + 3 - 6, 212, 16);

				$("tabsContainer").moveSizeTo($("mainSubWindow").width-39, 56, 39, $("mainSubWindow").height-56);
			}
			else
			{
				var width = $("channelContainer").width;
				var height = $("channelContainer").height;
				
				var passportHeight = 24; // 登录前高度
				if ($("passport").state == 0)
				{
					passportHeight = 32; // 登录后高度
				}
				
				$("passportContainer").moveSizeTo($("channelContainer").left, $("channelContainer").top, width + 39, passportHeight); // 39 为 互动栏 的宽度
				if(window.tabs)window.tabs.movePanel(0, passportHeight, width, height-passportHeight-16 + 3 - 6);
//				$("channelWnd").moveSizeTo(0, passportHeight, width, height-passportHeight-16 + 3);
				$("statusPanel").moveSizeTo(width-4-212, height-16 + 3 - 6, 212, 16);

				$("tabsContainer").moveSizeTo($("mainSubWindow").width-39, passportHeight, 39, $("mainSubWindow").height-passportHeight);

			}

			if (!$("mainSplitter").panePlace) // 频道列表 在左边
			{
				$("tabsContainer").moveSizeTo(0, $("passportContainer").height, $("tabsContainer").width, $("passportContainer").parentNode.height - $("passportContainer").height);
			}
			else
			{
				$("tabsContainer").moveSizeTo($("passportContainer").parentNode.width - $("tabsContainer").width, $("passportContainer").height, 
						$("tabsContainer").width, $("passportContainer").parentNode.height - $("passportContainer").height);
			}
			return false;
		}
		function passportButtonClick()
		{
			if (arguments.length == 1)
			{
				$('channelContainer').passportIsExpanded = arguments[0];
			}
			else
			{
				$('channelContainer').passportIsExpanded = !$('channelContainer').passportIsExpanded;
			}

			var faceFrame = $("userFace").parentNode;
			if ($('channelContainer').passportIsExpanded)
			{
				$("passportButton").src = "passport_collapse.png";
				faceFrame.src = "avatar_bg.png";
				faceFrame.moveSizeTo(5, 0, 48, 48);
				$("useridC").moveTo(56, 0);
			}
			else
			{
				$("passportButton").src = "passport_expand.png";
				faceFrame.src = "avatar_bg_s.png";
				faceFrame.moveSizeTo(5, 0, 24, 24);
				$("useridC").moveTo(32, 0);
			}

			$('channelContainer').relayout();
		}

		function UserCenter()
		{
			$("passport").NavigateUserURL("003");
		}

		function PPCoin()
		{
			$("passport").NavigateUserURL("009");
		}
		
		function ModifyUserInfo()
		{
			$("passport").NavigateUserURL("004");
		}

		function ModifyUserPic()
		{
			$("passport").NavigateUserURL("005");
		}

		function UserInBox()
		{
			$("passport").NavigateUserURL("006");
		}

		function VIPHome()
		{ 
			$("passport").NavigateUserURL("002");
		}
			
		function VIPPrivilege()
		{
			$("passport").NavigateUserURL("007");
		}
		function PPLState(i)
		{
		    var PPLState = Components.GetObject2('@pplive.com/PPLStat;1');
		    if(PPLState)PPLState.PPTVStartTime(i);
		}
	]]>
	</script>
<keyset id="accelset">
	<key id="key_openFile" modifiers="control" key="O" oncommand="var file=window.openFile();pppPlayString(file,9);" scope="app"/>
	<key id="key_openUrl" modifiers="control" key="U" oncommand="window.openUrlDialog();" scope="app"/>
	<key id="key_showPreferences" modifiers="control" key="W" oncommand="window.showPreferences();" scope="app"/>
	<key id="key_switchDir" modifiers="alt" key="E" oncommand="switchChannelDir();" scope="app"/>
	<!-- 去时尚模式
	<key id="key_switchToClassicMode" modifiers="alt" key="C" oncommand="switchToClassicMode();" />
	<key id="key_switchToModernMode" modifiers="alt" key="F" oncommand="switchToModernMode();" />
	-->
	<key id="key_switchTinyMode" modifiers="alt" key="Q" oncommand="if (window.tidyMode) window.exitTidyMode(); else window.enterTidyMode();" scope="app"/>
	<key id="key_directCloseWindow" modifiers="control" keycode="VK_F4" oncommand="window.directClose();" scope="app"/>
	<key id="key_PlayOrPause" modifiers="control" key="P" oncommand="EwaPlayOrPause();" scope="app"/>
	<key id="key_PlayOrPause2" modifiers="" keycode="VK_MEDIA_PLAY_PAUSE" oncommand="EwaPlayOrPause();" scope="app"/>
	<key id="key_Stop" modifiers="control" key="S" disabled="true" oncommand="EwaStop();" scope="app"/>
	<key id="key_Stop2" modifiers="" keycode="VK_MEDIA_STOP" disabled="true" oncommand="EwaStop();" scope="app"/>
	<key id="key_SpacePlayOrPause" modifiers="" keycode="VK_SPACE" oncommand="EwaPlayOrPause();" scope="app"/>
	<key id="key_FullOrUnfull" modifiers="alt" keycode="VK_ENTER" oncommand="EwaFullOrUnfull();" scope="app"/>
	<key id="key_05x" modifiers="alt" key="1" oncommand="Resize(8);" scope="app"/>
	<key id="key_10x" modifiers="alt" key="2" oncommand="Resize(1);" scope="app"/>
	<key id="key_20x" modifiers="alt" key="3" oncommand="Resize(3);" scope="app"/>
	<key id="key_screenshot" modifiers="alt" key="A" oncommand="screenShot()" scope="app"/>
	<key id="key_larger" keycode="VK_NUMPAD9" oncommand="window.videoScan.zoomPostion(1,1,0,0);" scope="app"/>
	<key id="key_smaller" keycode="VK_NUMPAD1" oncommand="window.videoScan.zoomPostion(-1,-1,0,0);" scope="app"/>
	<key id="key_hlarge" keycode="VK_NUMPAD6" oncommand="window.videoScan.zoomPostion(1,0,0,0);" scope="app"/>
	<key id="key_hsmall" keycode="VK_NUMPAD4" oncommand="window.videoScan.zoomPostion(-1,0,0,0);" scope="app"/>
	<key id="key_vlarge" keycode="VK_NUMPAD8" oncommand="window.videoScan.zoomPostion(0,1,0,0);" scope="app"/>
	<key id="key_vsmall" keycode="VK_NUMPAD2" oncommand="window.videoScan.zoomPostion(0,-1,0,0);" scope="app"/>
	<key id="key_resetscreen" keycode="VK_NUMPAD5" oncommand="window.videoScan.reset();" scope="app"/>
	<key id="key_leftmove" modifiers="control" keycode="VK_NUMPAD4" oncommand="window.videoScan.zoomPostion(0,0,-1,0);" scope="app"/>
	<key id="key_rightmove" modifiers="control" keycode="VK_NUMPAD6" oncommand="window.videoScan.zoomPostion(0,0,1,0);" scope="app"/>
	<key id="key_upmove" modifiers="control" keycode="VK_NUMPAD8" oncommand="window.videoScan.zoomPostion(0,0,0,-1);" scope="app"/>
	<key id="key_downmove" modifiers="control" keycode="VK_NUMPAD2" oncommand="window.videoScan.zoomPostion(0,0,0,1);" scope="app"/>
	<key id="key_middlemove" modifiers="control" keycode="VK_NUMPAD5" oncommand="window.videoScan.positionX = window.videoScan.positionY=0.5; window.videoScan.update();" scope="app"/>
	<key id="key_FF" keycode="VK_RIGHT" oncommand="EWAFastForward(true);" scope="app"/>
	<key id="key_FV" keycode="VK_LEFT" oncommand="EWAFastForward(false);" scope="app"/>
	<key id="key_next" modifiers="control" keycode="VK_RIGHT" oncommand="pppPlayNewItem(1);" scope="app"/>
	<key id="key_prev" modifiers="control" keycode="VK_LEFT" oncommand="pppPlayNewItem(-1);" scope="app"/>
	<key id="key_crash" modifiers="alt control shift" key="c" oncommand="Components.GetObject('@pplive.com/crash;1').crash()" />	
</keyset>
<keyset id="accelsetVol">
	<key id="key_volumeInc" modifiers="" keycode="VK_UP" oncommand="EwaVolumeModify(10);" scope="app"/>
	<key id="key_volumeDec" modifiers="" keycode="VK_DOWN" oncommand="EwaVolumeModify(-10);" scope="app"/>
	<key id="key_volumeMute" modifiers="" keycode="VK_F7" oncommand="EwaChangeMute();" scope="app"/>
</keyset>
<!-- Window Region -->
<subwindow id="fullModeRegion" left="0" top="0" width="878" height="540" horizontalAlignment="stretch" verticalAlignment="stretch" visible="true">
	<!-- top left -->
	<subwindow left="0" top="0" width="80" height="27" backgroundImage="bg_left_top.bmp" clippingColor="#FF00FF" />
	<!-- top -->
	<subwindow left="80" top="0" width="790" height="27" backgroundImage="bg_top.bmp" clippingColor="#FF00FF" horizontalAlignment="stretch" backgroundImageStretchMode="stretch" backgroundColor="#000000"/>
	<!-- top right -->
	<subwindow left="870" top="0" width="8" height="27" backgroundImage="bg_right_top.bmp" clippingColor="#FF00FF" horizontalAlignment="right"/>
	<!-- right -->
	<subwindow left="876" top="27" width="2" height="492" backgroundImage="bg_right.bmp" clippingColor="#FF00FF" horizontalAlignment="right" verticalAlignment="stretch" backgroundImageStretchMode="stretch" backgroundColor="#000000" />
	<!-- bottom right -->
	<subwindow left="856" top="519" width="22" height="21" backgroundImage="bg_right_bot.bmp" clippingColor="#FF00FF" horizontalAlignment="right" verticalAlignment="bottom" />
	<!-- bottom -->
	<subwindow left="15" top="519" width="841" height="21" backgroundImage="bg_bot.bmp" clippingColor="#FF00FF" horizontalAlignment="stretch" verticalAlignment="bottom"  backgroundImageStretchMode="stretch" backgroundColor="#000000"/>
	<!-- bottom left -->
	<subwindow left="0" top="519" width="15" height="22" backgroundImage="bg_left_bot.bmp" clippingColor="#FF00FF" horizontalAlignment="left" verticalAlignment="bottom" />
	<!-- left -->
	<subwindow left="0" top="27" width="2" height="505" backgroundImage="bg_left.bmp" clippingColor="#FF00FF" horizontalAlignment="left" verticalAlignment="stretch" backgroundImageStretchMode="stretch" backgroundColor="#000000"/>
	<!-- center -->
	<subwindow id="r_center" left="2" top="27" width="874" height="492" horizontalAlignment="stretch" verticalAlignment="stretch" backgroundColor="#121212" />
</subwindow>
<!-- 精简模式 -->
<subwindow id="tidyModeRegion" left="0" top="0" width="400" height="280" horizontalAlignment="stretch" verticalAlignment="stretch" backgroundColor="#000000" visible="false">
	<image left="0" top="0" width="400" height="26" horizontalAlignment="stretch" src="small\frame_title.png" stretchMode="ninegrid" nineGridMargins="2,0,2,26"/>
	<image left="398" top="2" width="2" height="276" horizontalAlignment="right" verticalAlignment="stretch" src="small\frame_r.png" stretchMode="stretch"/>
	<image left="0" top="278" width="400" height="2" horizontalAlignment="stretch"  verticalAlignment="bottom" src="small\frame_bottom.png" stretchMode="ninegrid" nineGridMargins="2,0,2,2"/>
	<image left="0" top="2" width="2" height="276" verticalAlignment="stretch" src="small\frame_l.png" stretchMode="stretch"/>
</subwindow>

<subwindow id="titleBar" left="0" top="0" width="874" height="27" horizontalAlignment="stretch" visible="true" passThrough="false" onmousedown="titleBarMouseDown(event);" ondblclick="if (window.sizemode == 2) window.sizemode = 0; else window.sizemode = 2;">
<!-- title bar -->
	<label id="windowTitle" left="74" top="3" width="630" height="18" value="" fontFace="Arial"  fontSize="13"  foregroundColor="#D4D4D4" passThrough="true" textAlignment="left vcenter" fontStyle="bold" horizontalAlignment="stretch"/>
	<subwindow left="78" top="5" width="200" height="18" visible="false">
		<menupopup id="IconMenu">
			<menuitem id="menu_showhide" defaultItem="true" label="显示/隐藏" oncommand="window.showWindow(!window.visible);"/>
			<menuseparator/>
			<menuitem id="menu_aboutpptv" label="关于PPTV..." oncommand="window.showAbout();"/>
			<menuitem id="menu_homepage" label="访问PPTV首页" oncommand="window.openurl('http://www.pptv.com');"/>
			<menuseparator/>
			<menuitem id="menu_setting" label="设置..." image="ico-setting.png" key="key_showPreferences" oncommand="window.showPreferences();"/>
			<menuseparator/>
			<menuitem id="menu_close" label="关闭" image="ico-exit.png" key="key_directCloseWindow" oncommand="window.directClose();"/>
	</menupopup>
	
		<!-- 播放器右键菜单 -->
	<menupopup id="PlayMenu" onpopupshowing="checkPlayMenu();">
			<menu id="menu_topmostpos" label="置顶选择">
				<menupopup id="TopMostMenu">
					<menuitem id="menu_playTop" label="播放时置顶" type="radio" oncommand="window.SetTopMostEx(2);"/>
					<menuitem id="menu_alwaysTop" label="始终置顶" type="radio" oncommand="window.SetTopMostEx(1);"/>
					<menuitem id="menu_cancelTop" label="不置顶" type="radio" oncommand="window.SetTopMostEx(0);"/>
				</menupopup>		
			</menu>
			<menuitem id="menu_addinfolder" label="添加到收藏夹" disabled="true" oncommand="AddCurrentChannelToFavirate();"/>
			<menuseparator/>
			<menuitem id="menu_FullOrUnfull" label="全屏" key="key_FullOrUnfull" oncommand="EwaFullOrUnfull();"/>
			<menu id="menu_picMenu" label="图像" disabled="true">
				<menupopup id="pictureMenu" onpopupshowing="checkPictureMenu();">
					<script>
					<![CDATA[
					function checkPictureMenu()
					{
						if (EwaIsFullScreen())
						{
							$("menu_autoadjust").disabled=true;
							$("menu_fitwindow").disabled=true;
							$("menu_original").disabled=true;
						}
						else
						{
							$("menu_autoadjust").disabled=false;
							$("menu_fitwindow").disabled=false;
							$("menu_original").disabled=false;
						}

						if (window.videoScan.defaultSize==4)// 铺满窗口
						{
							$("menu_autoadjust").checked=false;
							$("menu_fitwindow").checked=false;
							$("menu_original").checked=false;

							$("menu_defaultrate").checked=false;
							$("menu_rate43").checked=false;
							$("menu_rate169").checked=false;

							$("menu_fill").checked=true;
							return;
						}
						$("menu_fill").checked=false;

						$("menu_autoadjust").checked=false;
						$("menu_original").checked=false;
						$("menu_fitwindow").checked=false;
						var ospp = GetOriginalSizePlayPolicy();
						switch (ospp)
						{
						case 1:
							$("menu_autoadjust").checked=true;
							break;
						case 2:
							$("menu_original").checked=true;
							break;
						case 3:
							$("menu_fitwindow").checked=true;
							break;
						}

						var varVideoScan = window.videoScan;
						if(varVideoScan)
						{
							$("menu_defaultrate").checked=false;
							$("menu_rate43").checked=false;
							$("menu_rate169").checked=false;
							if(varVideoScan.aspectRatioWidth == 0 && varVideoScan.aspectRatioHeight == 0)
							{
								$("menu_defaultrate").checked=true;
							}
							if(varVideoScan.aspectRatioWidth == 4 && varVideoScan.aspectRatioHeight == 3)
							{
								$("menu_rate43").checked=true;
							}
							if(varVideoScan.aspectRatioWidth == 16 && varVideoScan.aspectRatioHeight == 9)
							{
								$("menu_rate169").checked=true;
							}
						}
					}
					function commandVideoSizePolicy(policy)
					{
						if (window.videoScan.defaultSize==4)
						{// 恢复默认比例
							window.videoScan.aspectRatioWidth=0;
							window.videoScan.aspectRatioHeight=0;
						}
						SetOriginalSizePlayPolicy(policy);
						var osd="";
						var tjcode=0;
						switch(policy)
						{
						case 1: osd="自动调整视频尺寸"; tjcode=39; break;
						case 2: osd="视频原始尺寸";     tjcode=40; break;
						case 3: osd="适应窗口尺寸";     tjcode=41; break;
						}
						var mainFrame = Components.GetObject2('mframe');
						if(mainFrame)
							mainFrame.TipControl.ShowTipText(osd, 0xCCCCCC, 3);
						PPLState(tjcode);
					}
					function commandVideoAspect(ax,ay)
					{
						window.videoScan.preventUpdate = true;
						if (window.videoScan.defaultSize==4)
						{
							SetOriginalSizePlayPolicy();
						}
						window.videoScan.aspectRatioWidth=ax;
						window.videoScan.aspectRatioHeight=ay;
						window.videoScan.preventUpdate = false;
						window.videoScan.update();
						window.ShowResizeTip(0.0);
					}
					function commandVideoFillWindow()
					{
						if(window.videoScan.defaultSize==4) {
							window.videoScan.preventUpdate = true;
							var ax = window.videoScan.aspectRatioWidth;
							var ay = window.videoScan.aspectRatioHeight;
							SetOriginalSizePlayPolicy();
							window.videoScan.aspectRatioWidth=ax;
							window.videoScan.aspectRatioHeight=ay;
							window.videoScan.preventUpdate = false;
							window.videoScan.update();
						} else {
							AspectChange(-1,-1);
						}
					}
					]]>
					</script>
					<menuitem id="menu_autoadjust" label="自动调整视频尺寸" type="radio" oncommand="commandVideoSizePolicy(1);" />
					<menuitem id="menu_original" label="视频原始尺寸" type="radio" oncommand="commandVideoSizePolicy(2);"/>
					<menuitem id="menu_fitwindow" label="适应窗口尺寸" type="radio" oncommand="commandVideoSizePolicy(3);"/>
					<menuseparator/>
					<menuitem id="menu_defaultrate" label="视频原始比例" type="radio" oncommand="commandVideoAspect(0,0);"/>
					<menuitem id="menu_rate43" label="4:3" type="radio" oncommand="commandVideoAspect(4,3);"/>
					<menuitem id="menu_rate169" label="16:9" type="radio" oncommand="commandVideoAspect(16,9);"/>
					<menuseparator/>
					<menuitem id="menu_fill" label="铺满窗口" type="check" oncommand="commandVideoFillWindow();"/>
				</menupopup>
			</menu>
			<menu label="声音">
			  <menupopup id="soundMenu">
				  <menuitem id="menu_leftTrack" label="左声道" type="radio" oncommand="PPPSetTrack(-1);"/>
					<menuitem id="menu_rightTrack" label="右声道" type="radio" oncommand="PPPSetTrack(1);"/>
					<menuitem id="menu_stereo" label="立体声" type="radio" oncommand="PPPSetTrack(0);"/>
					<menuitem id="menu_volumeMute" label="静音"  key="key_volumeMute" oncommand="EwaChangeMute();"/>
			  </menupopup>
			</menu>
			<menu label="配音" id="menu_soundLanguage">
				<menupopup onpopupshowing="buildSoundLanguageMenu(this);">
				</menupopup>
			</menu>
			<menuseparator/>
			<menuitem id="menu_downfile" label="下载" disabled="true" oncommand="AddFileToFolder();"/>
			<menuseparator/>
			<menuitem id="menu_setting" label="设置..." image="ico-setting.png" key="key_showPreferences" oncommand="window.showPreferences();"/>
	</menupopup>
	
		<!-- main menu  -->
		<menupopup id="mainMenu" left="0" top="0" width="200" height="18">
			<menu left="0" top="0" width="40" height="18" label="文件      ">
				<menupopup id="fileMenu">
					<menuitem id="menu_openFile" label="打开本地文件..." key="key_openFile" oncommand="var file=window.openFile();pppPlayString(file,9);"/>
					<menuitem id="menu_openUrl" label="打开网络文件..." key="key_openUrl" oncommand="window.openUrlDialog();"/>
				</menupopup>
			</menu>
			<menu left="40" top="0" width="40" height="18" label="显示 " >
				<menupopup id="viewMenu" onpopupshowing="buildSkinMenu(this);CheckViewMenu();">
					<menuseparator/>
					<menuitem id="menu_switchDir" label="列表左右互换" key="key_switchDir" oncommand="switchChannelDir();" />
					<menuseparator/>
					<menuitem id="menu_switchTinyMode" label="迷你模式" key="key_switchTinyMode" oncommand="if (window.tidyMode) window.exitTidyMode(); else window.enterTidyMode();"/>
					<menuseparator/>
					<menu label="显示比例">
						<menupopup>
							<menuitem id="menu2_05x" label="50%" key="key_05x" oncommand="Resize(8);"/>
							<menuitem id="menu2_10x" label="100%" key="key_10x" oncommand="Resize(1);"/>
							<menuitem id="menu2_20x" label="200%" key="key_20x" oncommand="Resize(3);"/>
							<menuitem id="menu_FullOrUnfull2" label="全屏" key="key_FullOrUnfull" oncommand="EwaFullOrUnfull();"/>
						</menupopup>
					</menu>
					<menu id="menu_topmostpos2" label="置顶选择">
						<menupopup id="TopMostMenu2">
							<menuitem id="menu_playTop2" label="播放时置顶" type="radio" oncommand="window.SetTopMostEx(2);"/>
							<menuitem id="menu_alwaysTop2" label="始终置顶" type="radio" oncommand="window.SetTopMostEx(1);"/>
							<menuitem id="menu_cancelTop2" label="不置顶" type="radio" oncommand="window.SetTopMostEx(0);"/>
						</menupopup>		
					</menu>
				</menupopup>
			</menu>
			<menu left="80" top="0" width="40" height="18" label="播放">
				<menupopup id="playMenu" onpopupshowing="checkMainMenu();">
					<menuitem id="menu_PlayOrPause" label="播放/暂停" key="key_PlayOrPause" oncommand="EwaPlayOrPause();"/>
					<menuitem id="menu_Stop" label="停止" key="key_Stop" disabled="true"  oncommand="EwaStop();"/>
					<menuseparator/>
					<menuitem id="menu_playPrev" label="上一集" key="key_prev" oncommand="pppPlayNewItem(-1);"/>
					<menuitem id="menu_playNext" label="下一集" key="key_next" oncommand="pppPlayNewItem(1);"/>
					<menuseparator/>
					<menu label="音量" >
						<menupopup>
							<menuitem id="menu_volumeInc" label="增大" key="key_volumeInc" oncommand="EwaVolumeModify(10);"/>
							<menuitem id="menu_volumeDec" label="减小" key="key_volumeDec" oncommand="EwaVolumeModify(-10);"/>
							<menuitem id="menu_volumeMute2" label="静音" key="key_volumeMute" oncommand="EwaChangeMute();"/>
						</menupopup>
					</menu>
					<menuseparator/>
					<menu label="声道">
						<menupopup>
							<menuitem id="menu_leftTrack1" label="左声道" type="radio" oncommand="PPPSetTrack(-1);"/>
							<menuitem id="menu_rightTrack1" label="右声道" type="radio" oncommand="PPPSetTrack(1);"/>
							<menuitem id="menu_stereo1" label="立体声" type="radio"  oncommand="PPPSetTrack(0);"/>
						</menupopup>
					</menu>
				</menupopup>
			</menu>
			<menuseparator/>
			<menuitem id="menu_autoShowdown" label="定时关机..." oncommand="window.showModalDialog('autoshutdown.xml');"/>
			<menuitem id="menu_showPreferences" label="设置..." image="ico-setting.png" key="key_showPreferences" oncommand="window.showPreferences();"/>
			<menu left="160" top="0" width="40" height="18" label="帮助">
				<menupopup id="helpMenu">
					<menuitem id="menu_help" label="帮助中心" oncommand="window.openurl('http://help.pptv.com/faq/');"/>
					<menuitem id="menu_customerservice" label="在线客服" oncommand="window.openurl('http://dlt.zoosnet.net/LR/ChatWin.aspx?id=DLT10040515');"/>
					<menuseparator/>
					<menuitem id="menu_pplive" label="PPTV官网" oncommand="window.openurl('http://www.pptv.com/');"/>
					<menuseparator/>
					<menuitem id="menu_about" label="关于..." oncommand="window.showAbout();"/>
				</menupopup>
			</menu>
			<menuseparator/>
			<menuitem id="menu_minimize" label="最小化到系统托盘" oncommand="window.visible=false;"/>
			<menuitem id="menu_exit" label="退出" image="ico-exit.png" key="key_directCloseWindow" oncommand="window.directClose();"/>
		</menupopup>
	</subwindow>
	<subwindow left="688" top="0" width="190" height="23" horizontalAlignment="right">
		<button  left="18" top="0" width="60" height="23" image="shift2new.bmp" hoverImage="shift2new_hover.bmp" downImage="shift2new_down.bmp" onclick="window.runMode=1;PPLState(9);" tooltip="使用新模式"/>
		<button left="78" top="0" width="26" height="23" image="menu.bmp" hoverImage="menu_hover.bmp" downImage="menu_down.bmp" tooltip="菜单" onclick="	$('mainMenu').openPopup(this, 'after_start');"/>
		<button left="104" top="0" width="26" height="23" image="min.bmp" hoverImage="min_hover.bmp" downImage="min_down.bmp" tooltip="最小化" onclick="window.sizemode=1;"/>
		<button id="maxRestoreBtn" left="130" top="0" width="26" height="23" image="max.bmp" hoverImage="max_hover.bmp" downImage="max_down.bmp" checkImage="restore.bmp" checkHoverImage="restore_hover.bmp" checkDownImage="restore_down.bmp" tooltip="最大化" checkTooltip="向下还原" onclick="if (window.sizemode == 2) window.sizemode = 0; else window.sizemode = 2;"/>
		<button left="156" top="0" width="26" height="23" image="close.bmp" hoverImage="close_hover.bmp" downImage="close_down.bmp" tooltip="关闭" onclick="myClose();"/>
	</subwindow>
</subwindow>
<subwindow id="mainSubWindow" left="2" top="27" width="874" height="511" horizontalAlignment="stretch" verticalAlignment="stretch" onsize="return mainSubWindowOnSize.call(this);">
<!-- main -->
	<splitter id="mainSplitter" left="0" top="0" width="835" height="511" horizontalAlignment="stretch" verticalAlignment="stretch" passThrough="true" horizontal="false" leftPaneMinSize="480" rightPaneMinSize="229" rightAligned="true">
		<subwindow id="playerContainer" left="0" top="0" width="500" height="511">
			<widget id="Player" left="0" top="0" width="500" height="505" horizontalAlignment="stretch" verticalAlignment="stretch" contractId="" useService="true" visible="true"/>  <!-- @pplive.com/PPFrame;1 --> 
		</subwindow>
        <splitterbar left="602" top="0" width="4" height="511">
			<subwindow id="spltBar" left="0" top="0" width="4" height="511" horizontalAlignment="stretch" verticalAlignment="stretch" backgroundColor="#222222" />
		</splitterbar>
		<subwindow id="channelContainer" left="492" top="0" width="302" height="511" onsize="return layoutChannelContainer();">
			<widget id="channelWnd" left="0" top="30" width="302" height="462" visible="false" horizontalAlignment="stretch" verticalAlignment="stretch" contractId="@pplive.com/chwnd;1" useService="false" OnContextMenu="OnChctrlMenu(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6], arguments[7], arguments[8], arguments[9]);" />  <!--  -->
			<widget id="statusPanel" left="68" top="494" width="212" height="16" horizontalAlignment="right" verticalAlignment="bottom" contractId="@pplive.com/gallop;1" useService="false"/>  <!--  --> 
			<!--在线列表分类菜单-->
			<menupopup id="menu_live_catalog" onpopupshowing="buildChctrlSkinMenu(this);">
				<menuitem id="menu_live_expand_catalog"  label="展开" oncommand="OnExpand();"/>
				<menuitem id="menu_live_stop_catalog" label="停止" oncommand="OnStopItem();"/>
				<menuseparator/>
				<menuitem id="menu_live_copy_cataloglink" label="复制链接" oncommand="OnCopyPlayLink();"/>
				<menuitem id="menu_live_refresh_catalog" label="刷新频道" oncommand="OnRefreshChannel();"/>
				<menuitem id="menu_live_addto_fav_catalog" label="加入收藏" oncommand="OnAddToFav();"/>
				<menuseparator/>
				<menuitem id="menu_live_all_collapse_catalog" label="全部收缩" oncommand="OnAllCollapse();"/>
				<menuitem id="menu_live_auto_collapse_catalog" label="自动收缩" oncommand="OnAutoCollapse();"/>
			</menupopup>
			<!--在线列表合集菜单-->
			<menupopup id="menu_live_channel" onpopupshowing="buildChctrlSkinMenu(this);">
				<menuitem id="menu_live_play_channel" label="播放" oncommand="OnPlayItem();"/>
				<menuitem id="menu_live_stop_channel" label="停止" oncommand="OnStopItem();"/>
				<menuitem id="menu_live_download_channel" label="下载" oncommand="OnDownloadItem();" /> 
				<menuseparator/>
				<menuitem id="menu_live_copy_channellink" label="复制链接" oncommand="OnCopyPlayLink();"/>
				<menuitem id="menu_live_refresh_channel" label="刷新频道" oncommand="OnRefreshChannel();"/>
				<menuitem id="menu_live_addto_fav_channel" label="加入收藏" oncommand="OnAddToFav();"/>
				<menuseparator/>
				<menuitem id="menu_live_all_collapse_channel" label="全部收缩" oncommand="OnAllCollapse();"/>
				<menuitem id="menu_live_auto_collapse_channel" label="自动收缩" oncommand="OnAutoCollapse();"/>
			</menupopup>
			<!--收藏列表频道菜单-->
			<menupopup id="menu_fav_channel" onpopupshowing="buildChctrlSkinMenu(this);">
				<menuitem id="menu_fav_play" label="播放" oncommand="OnPlayItem();"/>
				<menuitem id="menu_fav_stop" label="停止" oncommand="OnStopItem();"/>
				<menuitem id="menu_fav_download"  label="下载" oncommand="OnDownloadItem();"/>
				<menuseparator/>
				<menuitem id="menu_fav_copy_link" label="复制链接" oncommand="OnCopyPlayLink();"/>
				<menuseparator/>
				<menuitem id="menu_fav_item_delete" label="删除选中项" oncommand="OnDeleteSel();"/>
				<menuitem id="menu_fav_all_delete" label="清除列表" oncommand="OnDeleteAll();"/>
			</menupopup>
			<!--收藏列表搜索菜单-->
			<menupopup id="menu_fav_search_channel" onpopupshowing="buildChctrlSkinMenu(this);">
				<menuitem id="menu_fav_search_play" label="播放" oncommand="OnPlayItem();"/>
				<menuitem id="menu_fav_search_stop" label="停止" oncommand="OnStopItem();"/>
				<menuitem id="menu_fav_search_download"  label="下载" oncommand="OnDownloadItem();"/>
				<menuseparator/>
				<menuitem id="menu_fav_search_copy_link" label="复制链接" oncommand="OnCopyPlayLink();"/>
			</menupopup>
			<!--最近观看列表频道菜单-->
			<menupopup id="menu_lastwatch_channel" onpopupshowing="buildChctrlSkinMenu(this);">
				<menuitem id="menu_last_play" label="播放" oncommand="OnPlayItem();"/>
				<menuitem id="menu_last_stop" label="停止" oncommand="OnStopItem();"/>
				<menuitem id="menu_last_download"  label="下载" oncommand="OnDownloadItem();"/>
				<menuseparator/>
				<menuitem id="menu_last_addto_fav" label="加入收藏" oncommand="OnAddToFav();"/>
				<menuitem id="menu_last_copy_link" label="复制链接" oncommand="OnCopyPlayLink();"/>
				<menuseparator/>
				<menuitem id="menu_last_item_delete" label="删除选中项" oncommand="OnDeleteSel();"/>
				<menuitem id="menu_last_all_delete" label="清除列表" oncommand="OnDeleteAll();"/>
			</menupopup>
			<!--最近观看搜索菜单-->
			<menupopup id="menu_lastwatch_search_channel" onpopupshowing="buildChctrlSkinMenu(this);">
				<menuitem id="menu_last_search_play" label="播放" oncommand="OnPlayItem();"/>
				<menuitem id="menu_last_search_stop" label="停止" oncommand="OnStopItem();"/>
				<menuitem id="menu_last_search_download"  label="下载" oncommand="OnDownloadItem();"/>
				<menuseparator/>
				<menuitem id="menu_last_search_addto_fav" label="加入收藏" oncommand="OnAddToFav();"/>
				<menuitem id="menu_last_search_copy_link" label="复制链接" oncommand="OnCopyPlayLink();"/>
			</menupopup>

			<!--正在下载单个选中菜单-->
			<menupopup id="menu_downloading_single" onpopupshowing="buildDownloadSkinMenu(this);">
				<menuitem id="menu_begin_download"  label="开始" oncommand="DownloadingSingleSelectCmd(0)"/>
				<menuitem id="menu_pause_download" label="暂停" oncommand="DownloadingSingleSelectCmd(1)"/>
				<menuseparator/>
				<menuitem id="menu_folder_download" label="打开文件夹" oncommand="DownloadingSingleSelectCmd(3)"/>
				<menuseparator/>
				<menuitem id="menu_delete_task_download" label="删除任务" oncommand="DownloadingSingleSelectCmd(4)"/>
				<menuitem id="menu_delete_task_file_download" label="删除任务及下载文件" oncommand="DownloadingSingleSelectCmd(5)"/>
				<menuseparator/>
				<menuitem id="menu_begin_all_inSingle_download" label="全部开始" oncommand="DownloadingSingleSelectCmd(6)"/>
				<menuitem id="menu_pause_al_inSingle_download" label="全部暂停" oncommand="DownloadingSingleSelectCmd(7)"/>
				<menuseparator/>
				<menuitem id="menu_attribute_download" label="文件属性" oncommand="DownloadingSingleSelectCmd(8)"/>
			</menupopup>
			<menupopup id="menu_downloading_multi" onpopupshowing="buildDownloadSkinMenu(this);">
				<menuitem id="menu_begin_multi_download" label="全部开始" oncommand="DownloadingMultiSelectPreCmd(0)"/>
				<menuitem id="menu_pause_multi_download" label="全部暂停" oncommand="DownloadingMultiSelectPreCmd(1)"/>
				<menuseparator/>
				<menuitem id="menu_delete_multi_task_download" label="删除全部任务" oncommand="DownloadingMultiSelectPreCmd(2)"/>
				<menuitem id="menu_delete_multi_task_file_download" label="删除全部任务及下载文件" oncommand="DownloadingMultiSelectPreCmd(3)"/>
			</menupopup>
			<!--正在下载全部选中菜单-->
			<menupopup id="menu_downloading_all" onpopupshowing="buildDownloadSkinMenu(this);">
				<menuitem id="menu_begin_all_download" label="全部开始" oncommand="DownloadingAllSelectCmd(0)"/>
				<menuitem id="menu_pause_all_download" label="全部暂停" oncommand="DownloadingAllSelectCmd(1)"/>
				<menuseparator/>
				<menuitem id="menu_delete_all_task_download" label="删除全部任务" oncommand="DownloadingAllSelectCmd(2)"/>
				<menuitem id="menu_delete_all_task_file_download" label="删除全部任务及下载文件" oncommand="DownloadingAllSelectCmd(3);"/>
			</menupopup>
			<!--下载完成单个选中菜单-->
			<menupopup id="menu_finish_single" onpopupshowing="buildDownloadSkinMenu(this);">
				<menuitem id="menu_open_file_finish"  label="打开文件" oncommand="FinishSingleSelectCmd(0)"/>
				<menuitem id="menu_folder_finish" label="打开文件夹" oncommand="FinishSingleSelectCmd(1)"/>
				<menuseparator/>
				<menuitem id="menu_delete_task_finish" label="删除任务记录" oncommand="FinishSingleSelectCmd(2)"/>
				<menuitem id="menu_delete_task_file_finish" label="删除任务记录及下载文件" oncommand="FinishSingleSelectCmd(3)"/>
				<menuseparator/>
				<menuitem id="menu_delete_redownload_finish" label="重新开始下载" oncommand="FinishSingleSelectCmd(4)"/>
				<menuitem id="menu_move_file_finish" label="移动文件到..." oncommand="FinishSingleSelectCmd(5)"/>
				<menuseparator/>
				<menuitem id="menu_attribute_finish" label="任务属性" oncommand="FinishSingleSelectCmd(6)"/>
			</menupopup>
			<menupopup id="menu_finish_multi" onpopupshowing="buildDownloadSkinMenu(this);">
				<menuitem id="menu_delete_multi_task_finish"  label="删除全部任务" oncommand="FinishMultiSelectCmd(0)"/>
				<menuitem id="menu_delete_multi_task_file_finish"  label="删除全部任务及下载文件" oncommand="FinishMultiSelectCmd(1)"/>
			</menupopup>
			<!--下载完成全部选中菜单-->
			<menupopup id="menu_finish_all" onpopupshowing="buildDownloadSkinMenu(this);">
				<menuitem id="menu_delete_all_task_finish"  label="删除所有任务" oncommand="FinishAllSelectCmd(0)"/>
				<menuitem id="menu_delete_all_task_file_finish"  label="删除所有任务及下载文件" oncommand="FinishAllSelectCmd(1)"/>
			</menupopup>
		</subwindow>
	</splitter>
	<subwindow id="passportContainer" left="0" top="0" width="302" height="32" horizontalAlignment="left">  <!-- passport -->
		<subwindow id="beforeSign" left="0" top="0" width="302" height="24" horizontalAlignment="stretch"> <!-- 登录前 -->
			<button id="btnLogin" left="222" top="2" width="40" height="20" horizontalAlignment="right" cursor="hand" tooltip="登录" onclick="window.showModalDialog('signin.xml');" label="登录" fontSize="11" foregroundColor="#efefef" fontStyle="bold" fontFace="Arial" />
			<label id="lblLogin1" left="110" top="2" width="91" height="20" value="自动登录失败,请" fontSize="11" foregroundColor="#efefef" fontFace="Arial" passThrough="true" visible="false" horizontalAlignment="right" textAlignment="center vcenter"/>
			<button id="btnReLogin" left="203" top="2" width="55" height="20" horizontalAlignment="right" cursor="hand" tooltip="重新登录" onclick="window.ReLoginClick();" visible="false" label="重新登录" fontSize="11" foregroundColor="#fff000" fontStyle="bold underline" fontFace="Arial"/> <!-- 自动登录失败后提示重新登录 -->
			<button left="262" top="2" width="40" height="20" horizontalAlignment="right" tooltip="注册" cursor="hand" onclick="window.ShowRegUser();" label="注册" foregroundColor="#efefef" fontStyle="bold" fontSize="11" fontFace="Arial"/>
		</subwindow>
		<subwindow id="afterSign" left="0" top="0" width="302" height="32" horizontalAlignment="stretch" verticalAlignment="stretch" visible="false"> <!-- 登录后 -->
			<image left="5" top="0" width="24" height="24" src="avatar_bg_s.png"> <!-- 头像 -->
				<image id="userFace" left="2" top="2" width="20" height="20" horizontalAlignment="stretch" verticalAlignment="stretch" src="" stretchMode="stretch"/>
			</image>
			<subwindow id="useridC" left="32" top="0" width="190" height="22" horizontalAlignment="stretch">
				<button left="0" top="0" width="9" height="22" type="menu" image="passport_menu.gif" hoverImage="passport_menu_hover.gif"  checkImage="passport_menu_down.gif">
					<menupopup>
						<menuitem label="个人中心首页" oncommand="UserCenter();"/>
						<menuitem label="修改个人信息" oncommand="ModifyUserInfo();"/>
						<menuitem label="更改头像" oncommand="ModifyUserPic();"/>
						<menuitem label="我的小纸条" oncommand="UserInBox();"/>
					</menupopup>
				</button>
				<label id="userid" left="10" top="5" width="180" height="24" fontSize="12" foregroundColor="#EFEFEF" fontStyle="bold" fontFace="Tahoma" value="" tooltip="" horizontalAlignment="stretch"/><!-- ID -->
			</subwindow>
			<button id="usernormal" left="230" top="7" width="32" height="20" horizontalAlignment="right" image="user_normal.gif" hoverImage="user_normal.gif" downImage="user_normal.gif" cursor="hand" tooltip="还未开通会员" onclick="VIPPrivilege();"/> <!-- 未开通会员 -->
			<button id="uservip" left="230" top="7" width="32" height="20" horizontalAlignment="right" image="user_vip.gif" hoverImage="user_vip.gif" downImage="user_vip.gif" cursor="hand" tooltip="PP会员中心" onclick="VIPHome();" visible="false"/> <!-- PP会员 -->
			<button left="265" top="3" width="32" height="20" horizontalAlignment="right" image="passport_bot_bg.png" hoverImage="passport_bot_bg_hover.png" downImage="passport_bot_bg_down.png" cursor="hand"  tooltip="退出" label="退出" fontSize="11" fontFace="Arial" foregroundColor="#efefef" onclick="window.Logout();" /> <!-- 退出 -->
			<button left="56" top="27" width="58" height="20" image="passport_bot_bg.png" hoverImage="passport_bot_bg_hover.png" downImage="passport_bot_bg_down.png" tooltip="在线影视" stretchMode="stretch" onclick="window.openurl('http://www.pptv.com/');" label="在线影视" fontSize="11" fontFace="Arial" foregroundColor="#efefef"/> 
			<button left="116" top="27" width="58" height="20" image="passport_bot_bg.png" hoverImage="passport_bot_bg_hover.png" downImage="passport_bot_bg_down.png" tooltip="个人中心" stretchMode="stretch" onclick="UserCenter();" label="个人中心" fontSize="11" fontFace="Arial" foregroundColor="#efefef"/>
			<button left="176" top="27" width="58" height="20" image="passport_bot_bg.png" hoverImage="passport_bot_bg_hover.png" downImage="passport_bot_bg_down.png" tooltip="P币账户" stretchMode="stretch" onclick="PPCoin();" label="P币账户" fontSize="11" fontFace="Arial" foregroundColor="#efefef"/>
			<button left="0" top="24" width="302" height="8" image="passport_bot.png" hoverImage="passport_bot_hover.gif" downImage="passport_bot_down.png" horizontalAlignment="stretch" verticalAlignment="bottom" stretchMode="stretch" onclick="passportButtonClick();">
				<image id="passportButton" left="298" top="0" width="9" height="8" horizontalAlignment="center" verticalAlignment="bottom" src="passport_expand.png"  passThrough="true" />
			</button>
		</subwindow>
		<widget id="passport" left="0" top="0" width="0" height="0" contractId="@pplive.com/passport;1" useService="true" onlogin="window.OnPassportLogin(arguments[0]);" onGetUserPicture="$('userFace').src=$('passport').localFacePicture;" OnLogoutEx="window.OnPassportLogout(arguments[0]);"/> <!--  -->
	</subwindow>
	<subwindow id="tabsContainer" left="835" width="39" top="0" height="505" onsize="if(document.tabs)document.tabs.layoutButtons(); if(this.firstChild.nodeName=='image') { if(window.channelIsLeft()) this.firstChild.moveSizeTo(-1, 0, 40, this.height); else  this.firstChild.moveSizeTo(0, 0, 40, this.height);} return false;">
		<image src="tab_background.png" left="0" top="0" width="41" height="505" stretchMode="ninegrid" nineGridMargins="1,1,1,1"/>
	</subwindow>
</subwindow>
<image id="resizeGripper" left="856" top="519" width="22" height="21" src="resize_gripper.png" onmousedown="if (event.button == IDOMEvent.eLeftButton) {window.size('bottomright'); return false;} return true;" horizontalAlignment="right" verticalAlignment="bottom" passThrough="false" cursor="sizenwse"/>
</window>
