﻿//$(function(){
//  var guid = $.query.get('guid');
//   var account = $.query.get('account');
//   if(guid !="" && account !="")
//   {
//      Sys.Net.WebServiceProxy.invoke("Handlers/transformer.aspx","UserActivationAccount",false,{account:account,guid:guid},function(result){
//         if (result==true){
//         ActivationAccountOK();
//         }
//       },function(err){
//         alert(err.get_message());
//       });
//   }
//});

//用户激活帐号
  $(function(){
  
    //NEED FIX: URL ENCODED ERROR
    var query = window.location.search;
    
    var guid = query.substr(6, 32);
   if(guid !="")
   {
      Sys.Net.WebServiceProxy.invoke("Handlers/transformer.aspx","UserActivationAccount",false,{guid:guid},function(result){
         if (result==true){
         ActivationAccountOK();
         }
       },function(err){
       });
   }
});
//成功激活提示信息
function ActivationAccountOK()
{
                     var s = "<table width=\"530\" border=\"1\" cellpadding=\"1\" cellspacing=\"0\" bordercolor=\"#CEF8AC\">"+
  "<tr>"+
    "<td scope=\"col\"><table width=\"530\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">"+
      "<tr>"+
        "<td width=\"95\" height=\"110\" align=\"left\" valign=\"top\" background=\"images/ok3.gif\" bgcolor=\"#F3FEEE\" scope=\"col\">&nbsp;</td>"+
        "<td width=\"24\" align=\"left\" valign=\"middle\" bgcolor=\"#F3FEEE\" scope=\"col\">&nbsp;</td>"+
        "<td width=\"411\" align=\"left\" valign=\"top\" bgcolor=\"#F3FEEE\" class=\"hei14\" scope=\"col\">"+  
          "<div class=\"hei14 Popping_1\">&nbsp;&nbsp;&nbsp;&nbsp;恭喜，您的账户注册成功，现在可以立即登录!</div>"+
          "<br/>"+
          "<div style=\"margin-left:120px\">"+
           "<input type=\"button\" value=\"确 定\" onclick=\"$.unblockUI();\" />"+
          "</div>"+
          "</td>"+
      "</tr>"+
    "</table></td>"+
  "</tr>"+
"</table>";
$.blockUI({message:s,css:{top:'30%'}});
}
var mailcount = 0;//发送激活邮件数量
function SendActivationAccountMail(account,password)
{
 if(mailcount <3)
 {
Sys.Net.WebServiceProxy.invoke("Handlers/transformer.aspx","AgainActivationAccount",false,{account:account,password:password},function(result){
         if (result==true){
         mailcount++;
           alert("激活邮件已重新发送。");
         }
         else{
         alert("激活邮件发送失败。");
         }
       },function(err){
       });
       }
       else
       {
        alert("已经连续重复发送3次，请稍后尝试。");
       }
}

//未绑定手机
function UnBindMobie()
{
   var s ="<div class=\"layer_1 hui12\">"+
"<img src=\"images/ok_1.jpg\" /><b>手机验证</b>是保证账户安全、开通网吧支付的必要条件，请您先绑定手机！"+
"<span class=\"font_blue2\">----<a href=\"http://pay.sicent.com/HelpPay.aspx#help_11\">什么是网吧支付？</a></span>"+
"<div class=\"btns\">"+
  "<font class=\"font_blue\">[ <a href=\"ChangeAccountBindMobie.aspx\">现在去绑定</a> ]</font>　"+　　
  "<font class=\"font_blue\">[ <a href=\"javascript:;\" onclick=\"$.unblockUI();\">下次再说</a> ]</font>"+
"</div>"+
"<div class=\"div_clear\"></div>"+
"</div>";
   $.blockUI({message:s});
}
