<?xml version="1.0" encoding="utf-8"?>
<window screenLeft="0" screenTop="0" width="112" height="131"  titleBar="false" resizeMargins="0,0,0,0" maximizable="false" onload="windowOnLoad();" onactivate="if(!event.activated) window.close();" backgroundColor="#292929">
	<script src="common.js" />
	<script>
	<![CDATA[
		function windowOnLoad()
		{
			window.moveTo(window.dialogArguments.screenLeft, window.dialogArguments.screenTop);
			if ($("passport").state == 0) // 已经登录
			{
				$("userid").value = $("passport").userName;
				if ($("passport").IsVipUser)
				{
					$("uservip").src = "user_vip.gif";
					$("uservip").setAttribute("tooltip", "PP会员中心");
				}
				$("afterSign").visible = true;
				$("beforeSign").visible = false;
				if ($("userid").textWidth > 106)
				{
					$("userid").setAttribute("textAlignment", "left vcenter");
					$("userid").setAttribute("textOverflow", "ellipsis");
				}
			}
		}
		function vipClick()
		{
			if ($("passport").state != 0) { return; }
			if ($("passport").IsVipUser) { $("passport").NavigateUserURL("002"); }
			else { $("passport").NavigateUserURL("007"); }
		}
		function labelMouseOver() { this.foregroundColor='#42ADFF';this.fontStyle='underline'; }
		function labelMouseOut() { this.foregroundColor='#FFFFFF';this.fontStyle='normal'; }
	]]>
	</script>
	<subwindow left="0" top="0" width="112" height="131" backgroundColor="#292929" passThrough="false"/>
	<subwindow left="1" top="1" width="110" height="129" backgroundColor="#000000" passThrough="false" onclick="">
		<!-- 未登录 -->
		<subwindow id="beforeSign" left="2" top="2" width="106" height="44" visible="true">
			<label left="0" top="0" width="106" height="22" value="您还未登录" fontFace="tahoma" textAlignment="center vcenter" foregroundColor="#777777"/>
			<label left="0" top="22" width="53" height="22" value="[登录]" fontFace="tahoma" textAlignment="center vcenter" foregroundColor="#FFFFFF" onmouseover="labelMouseOver.call(this);" onmouseout="labelMouseOut.call(this);" onclick="window.returnValue=3;window.close();" cursor="hand"/>
			<label left="53" top="22" width="53" height="22" value="[注册]" fontFace="tahoma" textAlignment="center vcenter" foregroundColor="#FFFFFF" onmouseover="labelMouseOver.call(this);" onmouseout="labelMouseOut.call(this);" onclick="window.close();var uiMainWindow = Components.GetObject2('@pplive.com/ui/mainwindow;1');if(uiMainWindow)uiMainWindow.ShowRegUser();" cursor="hand"/>
		</subwindow>
		<!-- 已登录 -->
		<subwindow id="afterSign" left="2" top="2" width="106" height="44" visible="false">
			<label id="userid" left="0" top="0" width="106" height="22" value="pptv_wangkun" textAlignment="center vcenter" foregroundColor="#FFFFFF"/>
			<image id="uservip" left="5" top="28" width="22" height="14" horizontalAlignment="right" src="user_normal.gif" cursor="hand" tooltip="还未开通会员" passThrough="false" onclick="vipClick(); window.close();"/> <!-- PP会员 -->
			<label left="53" top="22" width="53" height="22" value="[退出]" fontFace="tahoma" textAlignment="center vcenter" foregroundColor="#FFFFFF" onmouseover="labelMouseOver.call(this);" onmouseout="labelMouseOut.call(this);" onclick="$('passport').Logout();window.close();" cursor="hand"/>
		</subwindow>
		<subwindow left="2" top="49" width="106" height="1" backgroundColor="#292929"/>
		<label left="6" top="55" width="98" height="24" value="我的最近观看" fontFace="tahoma" textAlignment="left vcenter" foregroundColor="#FFFFFF" onmouseover="labelMouseOver.call(this);" onmouseout="labelMouseOut.call(this);" onclick="window.returnValue=1;window.close();" cursor="hand"/>
		<label left="6" top="79" width="98" height="25" value="我的收藏" fontFace="tahoma" textAlignment="left vcenter" foregroundColor="#FFFFFF" onmouseover="labelMouseOver.call(this);" onmouseout="labelMouseOut.call(this);" onclick="window.returnValue=2;window.close();" cursor="hand"/>
		<label left="6" top="104" width="98" height="25" value="我的游戏" fontFace="tahoma" textAlignment="left vcenter" foregroundColor="#FFFFFF" onmouseover="labelMouseOver.call(this);" onmouseout="labelMouseOut.call(this);" onclick="window.returnValue=4;window.close();" cursor="hand"/>

		<widget id="passport" left="0" top="0" width="0" height="0" contractId="@pplive.com/passport;1" useService="true" />
	</subwindow>
</window>