function tagUserItem(){
	this.userid = 0;
	this.unitid = 0;
	this.usertype = 0;
	this.islogin= 0;
	this.username = "";
	this.shortname = "";
	this.ischecked=false;
	this.treelevel=0;
	this.setUserID = tagUserItem_setUserID;
	this.getUserID = tagUserItem_getUserID;
	this.setUnitID = tagUserItem_setUnitID;
	this.getUnitID = tagUserItem_getUnitID;
	this.setUserType = tagUserItem_setUserType;
	this.getUserType = tagUserItem_getUserType;
	this.setIsLogin = tagUserItem_setIsLogin;
	this.getIsLogin = tagUserItem_getIsLogin;
	this.setUserName = tagUserItem_setUserName;
	this.getUserName = tagUserItem_getUserName;
	this.setShortName = tagUserItem_setShortName;
	this.getShortName = tagUserItem_getShortName;

	this.setValue = tagUserItem_setValue;
	this.getValue = tagUserItem_getValue;

//custom functoon 
	this.isGroup	=tagUserItem_isGroup;

	this.setChecked = tagUserItem_setChecked;
	this.getChecked = tagUserItem_getChecked;
}

function tagUserItem_setUserID(value)	{this.userid=value;}
function tagUserItem_getUserID()		{return this.userid;}
function tagUserItem_setUnitID(value)	{this.unitid=value;}
function tagUserItem_getUnitID()		{return this.unitid;}
function tagUserItem_setUserType(value)	{this.usertype=value;}
function tagUserItem_getUserType()		{return this.usertype;}
function tagUserItem_setIsLogin(value)	{this.islogin=value;}
function tagUserItem_getIsLogin()		{return this.islogin;}
function tagUserItem_setUserName(value)	{this.username=value;}
function tagUserItem_getUserName()		{return this.username;}
function tagUserItem_setShortName(value){this.shortname=value;}
function tagUserItem_getShortName()		{return this.shortname;}

function tagUserItem_setValue(value)
{	
	var n;
	var a = value.split("::");
	n = a.length;	
	if (n<5)
	{
		this.isvalid = false;
		return;
	}
	//int nliuserid, nliunitid,nliusertype,nliislogin;
	//string nstrusername,nstrshortname;
	this.userid = parseInt(a[0]);
	this.unitid = parseInt(a[1]);
	this.usertype = parseInt(a[2]);
	this.islogin= parseInt(a[3]);
	this.username = a[4];
	this.shortname = a[5];
	this.isvalid = true;
	this.treelevel = a[6];
}
function tagUserItem_setValueA(userid,unitid,usertype,islogin,username,shortname,treelevel)
{	
	//int nliuserid, nliunitid,nliusertype,nliislogin;
	//string nstrusername,nstrshortname;
	this.userid = userid;
	this.unitid = unitid;
	this.usertype = usertype;
	this.islogin= islogin;
	this.username = username;
	this.shortname = shortname
	this.isvalid = true;
	this.treelevel = treelevel;
}
function tagUserItem_getValue()
{
	return this.userid+"::"+this.unitid+"::"+this.usertype+"::"+this.islogin+"::"+this.username+"::"+this.shortname+"::";
}
function tagUserItem_isGroup(value)
{	
	if(parseInt(value)==2147483647)return true;	
	return ((this.usertype&value)>0)
}
function tagUserItem_setChecked(value)
{
	this.ischecked = value;
}
function tagUserItem_getChecked()
{
	return this.ischecked;
}