/**
 * @author Administrator
 */
function AutoLogin()
{
	this.parent=null;
	
	this.ChatId=null; //对方id; get value;
	this.Login=null;  //登陆方式; get value;
	
	this.UserId=null;    //用户账号
	this.UserPwd=null;   //用户密码
	
	this.GetValues=new Array();
	var MeAutoLogin=this;
	this.PassLogin=function()
	{
		MeAutoLogin.GetValue();
		if (MeAutoLogin.ChatId!=null&&MeAutoLogin.Login!=null)
		{
			if (MeAutoLogin.Login == "auto") 
			{
				this.parent.PSW.isAutoLogin=1;
			}
		}
	}
	MeAutoLogin.PassLoginCss=function()
	{
		
	}
	this.GetValue=function()
	{
		MeAutoLogin.ChatId=MeAutoLogin.$GET("chat");
		MeAutoLogin.Login=MeAutoLogin.$GET("login");
	}
    this.GetUserInfo=function()
	{
		this.parent.SysMessage.ShowMsg("系统正在为您分配账号","3000",false)
		MeAutoLogin.parent.im.SendData(".TmpUins");
	}
	this.$GET=function(key)
	{
		var Location=document.location;
		Location=Location.toString();
		if (Location == "") 
		{
			return;
		}
		if (Location.indexOf("?")==-1)
		{
			return;
		}
		Values=Location.split("?")[1];
		ValueArray=Values.split("&");
		for (var i=0;i<ValueArray.length;i++)
		{
			MeAutoLogin.GetValues[ValueArray[i].split("=")[0]]=ValueArray[i].split("=")[1]
		}
		return MeAutoLogin.GetValues[key];
	}
	 this.GetLoginType=function()
	{
		if (MeAutoLogin.$GET("login")=="auto"&&MeAutoLogin.$GET['chat']!="")
		{
			return true;	
		}
		return false
	}
}
