function LoginClass(pcallback){ 
	this.XMLhttp=null; 							//xml下载对象
	this.result=new Array();  			//二维数组
	this.ResultCallBack=pcallback;	//结果处理完毕回调
	
	//初始化共享变量
	if(typeof LoginClass._initShareVar == "undefined"){
		LoginClass.prototype.instanceCount=0; //初始化实例数
		LoginClass.prototype.instanceArray=new Array(); //保存实例数组
		LoginClass._initShareVar=true;
	}
	
	LoginClass.prototype.instanceCount++;
	this.hwnd=LoginClass.prototype.instanceCount;
	
	//初始化开始
	if(typeof LoginClass._initialized == "undefined"){ 
			
		//查询信息
		LoginClass.prototype.login=function (theForm){
			if(!isAlphaOrNum(theForm.hht_alias_name.value||theForm.hht_alias_name=="")){
				alert("请正确添写户户帐号，只能是字母或数据!");
				theForm.hht_alias_name.focus();
				return false;
			}
			if(!isAlphaOrNum(theForm.hht_password.value||theForm.hht_password=="")){
				alert("请正确添写户户密码!");
				theForm.hht_password.focus();
				return false;
			}
			if(theForm.vcode.value==""){
				alert("请正确添写验证码!");
				theForm.vcode.focus();
				return false;
			}
			
			var encodepwd=MD5(theForm.vcode.value+theForm.hht_password.value);
			
			var url1="/login/WebLoginXML.jsp?hht_alias_name="
							 +theForm.hht_alias_name.value+"&hht_password="
							 +encodepwd+"&vcode="+theForm.vcode.value;
			var temp=this;
			xmlQuery(url1,function(){temp.callback();},this.result);
			return false;
		};	

		//查询xml回调
		LoginClass.prototype.callback=function(){
			if(this.result[0][0]=="true"){
				this.ResultCallBack(this.result);
			}else{
				this.ResultCallBack(this.result);
			}
			this.XMLhttp =null;
			this.result =new Array();
		};
				
		LoginClass._initialized = true; 
	}
	LoginClass.prototype.instanceArray[this.hwnd]=this; //保存实例引用
}
