<?xml version="1.0" encoding="utf-8"?>
<window screenLeft="0" screenTop="0" width="504" height="335" titleBar="false" resizeMargins="0,0,0,0" maximizable="false" onload="windowOnload();" onunload="windowUnload();">
<script src="common.js" />
<script>
<![CDATA[
	function OnVasFlashCmd(cmd,target,arg1,arg2,arg3,arg4)
	{
		if(cmd=="openurl" && target=="vas")
		{
			window.openurl(flashDecode(arg1));
		}
	}
	function centerWindow()
	{
		var screen = window.screen;
		var left = screen.left + (screen.width - window.outerWidth)/2;
		var top = screen.top + (screen.height - window.outerHeight)/2;
		window.moveSizeTo(left, top, window.outerWidth, window.outerHeight);
	}
	function windowOnload()
	{
		centerWindow();
		window.setFlash=function(url)
		{
			$("vasFlash").LoadSwf(url);
			var channelid = 0;
			try
			{
				if(window.dialogArguments)channelid = window.dialogArguments;
			}
			catch(e){}
			$("vasFlash").FlashCmd("setparam","vas",channelid,"b2","","");
		}
		window.destroyFlash=function()
		{
		}
		window.showVas=function(bshow)
		{
			window.visible=bshow;
		}
		window.setTitle=function(strTitle)
		{
			$("windowTitle").value=strTitle;
		}
		window.gotologin=function()
		{
			var mainWnd=Components.GetObject("@pplive.com/ui/mainwindow;1");
			if(mainWnd)
			{	
				window.destroyFlash();
				window.visible=false;
				if (mainWnd.runMode==1)
					mainWnd.showModalDialog("signin2.xml");
				else
					mainWnd.showModalDialog("signin.xml");
				window.close();
			}
		}
		window.showLable=function(vipType)
		{
			if(vipType==1)
			{
				$("vipChannel").visible=true;
				$("vipAD").visible=false;
				$("vipLogin1").visible=false;
				$("vipLogin2").visible=false;
				$("vipLogin3").visible=false;
			}
			if(vipType==2)
			{
				$("vipChannel").visible=false;
				$("vipAD").visible=true;
				$("vipLogin1").visible=false;
				$("vipLogin2").visible=false;
				$("vipLogin3").visible=false;				
			}
			if(vipType==3)
			{
				$("vipChannel").visible=false;
				$("vipAD").visible=false;
				$("vipLogin1").visible=true;
				$("vipLogin2").visible=true;
				$("vipLogin3").visible=true;				
			}
		}
		window.showmodal=function(modalType)
		{
			if(modalType=="A1")
			{
				window.setTitle("去除广告,会员专享")
				window.showLable(3);
			}
			if(modalType=="B1" || modalType=="C1")
			{
				window.setTitle("VIP节目,会员专享")
				window.showLable(3);
			}
			if(modalType=="A2")
			{
				window.setTitle("去除广告,会员专享")
				window.showLable(2);
			}
			if(modalType=="B2" || modalType=="C2")
			{
				window.setTitle("VIP节目,会员专享")
				window.showLable(1);
			}
			window.showVas(true);
			var  pplDac=Components.GetObject("@pplive.com/PPLStat;1");
			if(pplDac)
			{
				pplDac.VasDac(modalType);
			}
			window.setFlash("http://static1.pplive.cn/v2/vas/vip.swf");
		}
		window.showmodal("B2");

	}
	function windowUnload()
	{
	}
]]>
</script>
	<subwindow left="0" top="0" width="504" height="335">
		<!-- 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="416" height="27" backgroundImage="bg_top.bmp" clippingColor="#FF00FF" horizontalAlignment="stretch" backgroundImageStretchMode="stretch" backgroundColor="#000000"/>
		<!-- top right -->
		<subwindow left="496" top="0" width="8" height="27" backgroundImage="bg_right_top.bmp" clippingColor="#FF00FF" horizontalAlignment="right"/>
		<!-- right -->
		<subwindow left="502" top="27" width="2" height="306" backgroundImage="bg_right.bmp" clippingColor="#FF00FF" horizontalAlignment="right" verticalAlignment="stretch" backgroundImageStretchMode="stretch" backgroundColor="#FF0000" />
		<!-- bottom right -->
		<subwindow left="502" top="333" width="2" height="2" backgroundImage="set_bg_right_bot.bmp" clippingColor="#FF00FF" horizontalAlignment="right" verticalAlignment="bottom" />
		<!-- bottom -->
		<subwindow left="2" top="333" width="500" height="2" backgroundImage="set_bg_bot.bmp" clippingColor="#FF00FF" horizontalAlignment="stretch" verticalAlignment="bottom"  backgroundImageStretchMode="stretch" backgroundColor="#000000"/>
		<!-- bottom left -->
		<subwindow left="0" top="333" width="2" height="2" backgroundImage="set_bg_left_bot.bmp" clippingColor="#FF00FF" horizontalAlignment="left" verticalAlignment="bottom" />
		<!-- left -->
		<subwindow left="0" top="27" width="2" height="306" backgroundImage="bg_left.bmp" clippingColor="#FF00FF" horizontalAlignment="left" verticalAlignment="stretch" backgroundImageStretchMode="stretch" backgroundColor="#000000"/>
		<!-- center -->
		<subwindow left="1" top="27" width="502" height="30" backgroundColor="#000000">
		<label id="vipChannel" left="0" top="0" width="502" height="30" value="您还不是会员，无法观看VIP节目。" fontFace="宋体"  fontSize="12"  backgroundColor="#efefef" passThrough="true" textAlignment="center vcenter" visible="false"/>
		<label id="vipAD" left="0" top="0" width="502" height="30" value="您还不是会员，无法享受去除广告的功能。" fontFace="宋体"  fontSize="12"  backgroundColor="#efefef" passThrough="true" textAlignment="center vcenter" visible="false"/>
		<label id="vipLogin1" left="0" top="0" width="300" height="30" value="如果您已经是会员，请" fontFace="宋体"  fontSize="12"  foregroundColor="#000000" backgroundColor="#efefef" passThrough="true" textAlignment="right vcenter" visible="false"/>
		<label id="vipLogin2" left="300" top="0" width="40" height="30" value="登录" fontFace="宋体"  fontSize="12"  fontStyle="underline Bold"  foregroundColor="#0068bd" backgroundColor="#efefef"  textAlignment="left vcenter" visible="false" onclick="window.gotologin();"/>
		<label id="vipLogin3" left="340" top="0" width="162" height="30"  backgroundColor="#efefef" visible="false"/>
		</subwindow>
		<subwindow left="1" top="57" width="502" height="275" horizontalAlignment="stretch" verticalAlignment="stretch" backgroundColor="#ffffff">
		<widget id="vasFlash" left="1" top="1" width="500" height="275" horizontalAlignment="stretch" verticalAlignment="stretch" contractId="@pplive.com/flash;1" OnFlashCmd="OnVasFlashCmd(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]);"/>
		</subwindow>
		<!-- close button -->
		<button left="468" top="0" width="26" height="23" image="close.bmp" hoverImage="close_hover.bmp" downImage="close_down.bmp" onclick="window.destroyFlash();window.close();" tooltip="关闭"/>
		<label id="windowTitle" left="65" top="4" width="200" height="18" value="去除广告,会员专享" fontFace="Arial"  fontSize="12"  foregroundColor="#F0F8FF" passThrough="true" textAlignment="left vcenter" fontStyle="bold"/>
	</subwindow>
</window>