{template 'member','header'}
<script language="javascript">
<?php
sajax_show_javascript();
?>
function activegame(id){
	OpenDiv();
	document.getElementById("idserver").value=id;
    
}
function doSub(){
    var id = document.getElementById("idserver").value;
	var gpass = document.getElementById("gpass").value;
	var rgpass = document.getElementById("rgpass").value;
	if(gpass == ""){
	window.alert("请输入密码！");
	return false;
	}
	if(rgpass == ""){
	window.alert("请输入确认密码！");
	return false;
	}
	if(gpass != rgpass){
	window.alert("两次输入的密码不一致！");
	return false;
	}
	CloseLoad();
    var c = document.getElementById("acting_"+id);
	c.innerHTML = "<span style='FONT-WEIGHT:bold;FONT-SIZE:12px;COLOR: red'>正在激活...</span>";
    var o = document.getElementsByTagName("INPUT"); 
    var l = o.length 
    for(var i=0;i<l;i++) { 
      o[i].disabled = true; 
    }
	x_doSub(id,gpass,doSub_cb);

function doSub_cb(z) {
  if(z=="true")
  {
	c.innerHTML = "<span style='FONT-WEIGHT:bold;FONT-SIZE:12px;COLOR: blue'>激活成功</span>";
	for(var i=0;i<l;i++) { 
      o[i].disabled = false; 
    }
	document.getElementById("gpass").value="";
	document.getElementById("rgpass").value="";
	location.href=location.href;
	}
	else
	{
	window.alert(z);
	c.innerHTML = "<span style='FONT-WEIGHT:bold;FONT-SIZE:12px;COLOR: red'>激活失败</span>";
	 for(var i=0;i<l;i++) { 
      o[i].disabled = false; 
    }
	document.getElementById("gpass").value="";
	document.getElementById("rgpass").value="";
	}
}
}
//-->
</script>

<DIV class=main>
{template 'game','left'}
<DIV class="ad_rbarB boxC">
<DIV class=columnC><SPAN class="l_tit f_l">激活游戏</SPAN></DIV>

<TABLE cellSpacing=0 cellPadding=0 width="85%" border=0  align=center>
                    <TBODY>
                    <TR>
                      <TD width=0% rowSpan=13></TD>
                      <TD colSpan=2 height=30 align="center">
						<b>
						<font color="#FF0000" size="5">注意：</font><font color="#00FF00" size="5">一个帐号只能激活一个分区</font></b></TD></TR>


                    <TR>
                      <TD colSpan=2 height=25>
                        <TABLE cellSpacing=0 cellPadding=0 width=545 align=center border=0>
                          <TBODY>
                          <TR>
                            <TD><IMG height=7 src="{HS_PATH}img/member/index17_1.jpg" width=545></TD></TR>
                          <TR>
                            <TD style="BACKGROUND: url({HS_PATH}img/member/index17_2.jpg)" width=545 height=32><table cellspacing=0 cellpadding=0 width="95%" align=center border=0>
                              <tbody>
                                <tr>
                                  <td style="BACKGROUND: url({HS_PATH}img/member/index18_2.jpg);FONT-SIZE: 13px; COLOR: #e94d01;font-weight:bold;text-align:center;height:30px;padding-top:5px" colspan="2">《{$HS[sitename]}》 游戏分区列表</td>
                                </tr>
                              </tbody>
                              {loop $servlist $value}
  <tr class=zhucelist>
    <td align=middle colspan=2 height=12><img 
                                height=7 src="{HS_PATH}img/member/index17_line.jpg" 
                                width=545 /></td>
  </tr>
  <tr>
    <td class=zhucelist align=middle width="52%" height=30><span style="FONT-SIZE: 13px; COLOR: #935d0f;font-weight:bold">{$value[servername]}</span></td>
    <td width="48%" height=30 align=middle id="acting_{$value[id]}">{if $value[ag]==1 && $value[status] == 1}<span style="FONT-WEIGHT:bold;FONT-SIZE:12px;COLOR: green">已激活</span>{elseif $acted == 1 }<span style="FONT-WEIGHT:bold;FONT-SIZE:12px;COLOR: green">只能激活一个分区</span>{elseif $value[ag]!=1 && $value[status] == 1}<input type="image" src="{HS_PATH}img/member/jihuo_banner.jpg" onclick="javascript:activegame({$value[id]})">{else}<span style="FONT-WEIGHT:bold;FONT-SIZE:12px;COLOR: #666">此分区已暂停激活</span>{/if}</td>
  </tr>
                              {/loop}
                            </table></TD>
                          </TR>
                          <TR>
                            <TD><IMG height=7 alt="" 
                              src="{HS_PATH}img/member/index17_4.jpg" 
                          width=545></TD></TR></TBODY></TABLE></TD></TR>
                    <TR>
                      <TD colSpan=2 height=15></TD></TR>
                    <TR>
                      <TD>
                      </TD></TR></TBODY></TABLE>


<DIV align=center></DIV>
</DIV>
</DIV>
</DIV>
</DIV>

<script type="text/javascript">
//function $(){return document.getElementById?document.getElementById(arguments[0]):eval(arguments[0]);}
var OverH,OverW,ChangeDesc,ChangeH=60,ChangeW=100;
var Nw=10,Nh=10;
function OpenDiv(_Dw,_Dh) {
	_Dw =350;
	_Dh = 310;
	window.scrollTo(0, 0);
	OverH=_Dh;OverW=_Dw;ChangeDesc='';
	$("Loading").style.display='block';
	$("Loading_Bg").style.display='';
	var _H = document.documentElement.scrollHeight;
	_H = _H<document.documentElement.clientHeight ? document.documentElement.clientHeight : _H;
	$("Loading_Bg").style.width = document.documentElement.clientWidth+"px";
	$("Loading_Bg").style.height = document.documentElement.clientHeight+"px";
	if(_Dw>_Dh){
		ChangeH=Math.ceil((_Dh-10)/((_Dw-10)/50));
	}else if(_Dw<_Dh){
		ChangeW=Math.ceil((_Dw-10)/((_Dh-10)/50));
	}
	OpenNow();
}
function OpenNow() {
	if (Nw>OverW-ChangeW)ChangeW=8;
	if (Nh>OverH-ChangeH)ChangeH=8;
	Nw=Nw+ChangeW;Nh=Nh+ChangeH;
	if(OverW>Nw||OverH>Nh) {
		if(OverW>Nw) {
			$("Loading").style.width=Nw+100+"px";
			var _L=(document.documentElement.clientWidth-Nw)/2-30;if(_L<0)_L=0;
			$("Loading").style.left=_L+"px";
		}
		if(OverH>Nh) {
			$("Loading").style.height=Nh+"px";
			var _T=(document.documentElement.clientHeight-Nh)/2+0;if(_T<0)_T=0;
			$("Loading").style.top=_T+"px"
		}
		//window.setTimeout("OpenNow()",10);
                OpenNow();
	}else{
		Nw=10;Nh=10;ChangeH=50;ChangeW=50;
		$('divload').style.display='block';
		$("Loading").style.background='transparent';
		$("Loading").style.border='0px';
		$("Loading").style.filter='alpha(opacity=100)';
		$("Loading").style.opacity='1';
		$("Loading_Bg").style.filter='alpha(opacity=50)';
	}
}
function CloseLoad() {
	if(Nw!=10) return;
	$("Loading").style.display='none';
	$("Loading_Bg").style.display='none';
}


//-->
</script>
<div id="Loading_Bg"></div>
<div id="Loading">
	<div id='divload'>
<DIV class=mw> 
<DIV class=mw_box>
<DIV class=columnG><A href="javascript:void(0)" onclick="CloseLoad()"><IMG 
src="{HS_PATH}img/member/mw_close.gif"></A>设置密码</DIV>
<DIV class=mw_mbox>
<H4 style="color:#F00">请为该分区设置登陆密码</H4>
<TABLE class=mw_tabA cellSpacing=0 cellPadding=0 width="90%" align=center 
border=0>
  <TBODY>
  <TR>
  <TH height="30" colspan="2">为了安全，游戏密码可设置为与网站不同的密码！</TH>
    </TR>
  <TH>密码：</TH>
    <TD height=30><input type="password" id="gpass" value="" style="border:1px solid #ccc;height:18px;font-weight:bold" onkeydown="javascript:KeyUpPro(event);"></TD>
</TR>
  <TR>
  <TH>确认密码：</TH>
    <TD height=30><input type="password" id="rgpass" value="" style="border:1px solid #ccc;height:18px;font-weight:bold" onkeydown="javascript:KeyUpPro(event);"></TD>
</TR>
  <TR>
 <TH></TH>
    <TD class=pat10 align="left"><input type="hidden" id="idserver" value=""><input type="button" class="hsbtn" value="确认" onclick="javascript:doSub()">    </TD></TR></TBODY></TABLE>
</DIV></DIV></DIV>
	</div>
</div>

<script>
function KeyUpPro(events)
{
	if(events.keyCode==13)
	{
		doSub();
	}
}
</script>
{template 'member','footer'}