$(function(){
	var MberState=$("#MberState");
	var getCookie=document.cookie;
	var arrCookie=getCookie.split(";");
	var myName="访客";
	var myUid="0";
	var UFlag="false";
	
	for(var i=0;i<arrCookie.length;i++)
	{
 		var arr=arrCookie[i].split("=");
		
		if($.trim(arr[0])=="UFlag")
		{
			UFlag=arr[1];
		}
		
		if($.trim(arr[0])=="loginName")
		{
			myName=decodeURI(arr[1]);
		}
		
		if($.trim(arr[0])=="usid")
		{
			myUid=arr[1];
		}
	}
	if(UFlag!=null && UFlag!="false")
	{
		MberState.html("欢迎,<font color='red'> "+myName+" </font>  <a href='/user/'>会员中心</a> <a href='/user/out.aspx'>退出</a> </span>");
	}
	else
	{
		MberState.html("<a href='/loading/'>登录</a><span class='gray'>|</span><a href='/register/'>注册</a>");
	}
});