<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="network.aspx.cs" Inherits="JuSNS.Web.home.ibase.network" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title id="ptitle" runat="server">网络设置</title>
<script language="javascript" type="text/javascript" src="../../js/ajax.js"></script>
<script language="javascript" type="text/javascript" src="../../js/public.js"></script>
<link href="../../template/<% Response.Write(JuSNS.Config.UiConfig.SkinStyle); %>/css/base.css" id="skinpath" type="text/css" rel="stylesheet" />
</head>
<body>
<!--头部-->
<%=this.GetHtmlShort()%>
<div id="divhead">
    <%=this.GetHtmlHead()%>
</div>

<div id="divbody">
    <div id="body_first">
        <div class="body_menu"> 
        <%=this.GetHtmlLeft()%>
        </div>
    </div>
    <div id="body_sec">
            <div id="body_mid"> 
                <div class="body_frame"> 
                 <!--主题内容中-->    
                
                <input type="hidden" id="txtYear" runat="server" /><input type="hidden" id="txtDay" runat="server" />                    
                <div class="body_frame_otherinfo">
	                        <div class="title">
                                <div class="l"><img src="../../template/<%Response.Write(JuSNS.Config.UiConfig.SkinStyle); %>/images/site/acc.gif" align="absmiddle" /> <span class="shenlan bold font14 ocolor">网络设置</span></div>
                                <div class="r"><a href="javascript:window.history.back();" title="返回上一页">返回上一页</a></div>
                                <div class="c"></div>
                            </div>
            		       
                            <div class="nav-menu">
                                <ul>
                                 <li><a href="index.aspx">帐号管理</a></li>
                                 <li style="display:none;"><a href="advs.aspx">高级管理</a></li>
                                 <li class="current"><a href="network.aspx">网络设置</a></li>
                                 <li><a href="msn.aspx">MSN/GTalk</a></li>
                                 <li><a href="mobile.aspx">手机</a></li>
                                 <li><a href="email.aspx">邮件通知</a></li>
                                 <li><a href="../space/edit.aspx">空间设置</a></li>
                                 </ul>
                            </div>        
                     </div>
            <div class="body_sec_all">
                    <div class="content-reshow">
                        <% Response.Write(JuSNS.Config.UiConfig.SiteName); %>的网络根据地区划分。加入你当前所在地的网络，发现在你身边工作、学习和生活的朋友。
                    </div>
                    <div class="msg-succ" id="div_Suc" runat="server" style="display: none;"></div>
	                <div class="msg-error" id="div_Error" runat="server" style="display: none;"></div>
                    <div class="spline"></div>
	                <!--修改网络设置-->
                    <div class="content">
			            <form method="post" action="">
					        <label for="province" class="f-label">所在地</label>
					        <select name="homeprovince" id="homeprovince" runat="server" onchange="ShowC(this.value);"></select>
					        <input type="hidden" id="hidProvince" runat="server" value="" />		
                            <select name="SelCity" id="SelCity" runat="server" style="display:none;" ></select>
                            <p class="pstr">
                           <label for="province" class="f-label">&nbsp;</label> 
					         <input type="button" class="f-button" id="networkFormSubmit" value="修改所在地"  onclick="Submit();"/>
					         </p>
			            </form>
		            </div>   
		     </div>                       
                    <div class="spline"></div>
           </div>  
           <!--底部-->
             <div class="divbottom">
              <%=this.GetHtmlFoot()%>
              </div>
          </div>
   </div>
</div>
</body>
</html>
<script language="JavaScript" type="text/javascript">
function Load()
{
    if($("SelCity").length==0)
    {
       $("SelCity").style.display="none"; 
    }
    else
    {
        $("SelCity").style.display=""; 
    }
}Load();
//根据省加载市
function ShowC(id)
{
     var  options={  
				   method:'post',  
				   parameters:"id="+id+"&Type=City",  
				   onComplete:function(transport)
					{ 
					    var v=transport.responseText;
					    
					    if (v.indexOf("??")>-1)
					    {
					        $("SelCity").style.display="none";
                        }
					    else
					    {
                           var array=v.split('|');
                           var len=array.length;
                           if(len>0)
                           {  
                               $("SelCity").style.display="";
                               $("SelCity").length=0;
                               for(var i=0;i<array.length-1;i++)
                               { 
                                  var s=array[i].split(',');
                                  if(s.length>0)
                                  {
                                    $("SelCity").options.add(new Option(s[1],s[0]));
                                  }
                               }
                           } 
                           else
                           {
                                $("SelCity").style.display="none";
                           }
                        }
					}  
				  }; 
       new Ajax.Request('network.aspx',options);
}

//提交
function Submit()
{
    var homeprovince=$("homeprovince").value;
    var SelCity=$("SelCity").value;
    
    if($("SelCity").style.display=="none")
    {
        SelCity=0;
    }
    var  options={  
				   method:'post',  
				   parameters:"homeprovince="+homeprovince+"&SelCity="+SelCity+"&Type=Edit",  
				   onComplete:function(transport)
					{ 
					    var v=transport.responseText;
					     $('div_Suc').style.display="";
					    if (v.indexOf("??")>-1)
					    {
                           $('div_Suc').innerHTML="修改失败！";
                        }
					    else
					    {
                           $('div_Suc').innerHTML=v;
                        }
					}  
				  }; 
       new Ajax.Request('network.aspx',options);
}
//  End -->
</script>