function MemberList () {
	this.obj = null;
	this.name = null;
	this.host = null;
	this.offset = 0;
	this.limit = 0;
	this.total = 0;
	this.p = 0;
	this.totalcnt_obj = null;

	this.load = function () {
		var url = "/IF/get_MemberList.php?name="+this.name+"&offset="+this.offset+"&limit="+this.limit;
		this.send ( url, '', "GET", true );
	}

	this.send = function ( url, data, method, async ) {
		var ML = this;
		var obj = this.obj;
		var req = get_HttpRequestObj ();
		req.open ( method, url, async );
		req.onreadystatechange = function () {
			switch ( req.readyState ) {
				case 0:	// uninitialize
				break;
				case 1:	// loading
					obj.innerHTML = "Now loading...";
				break;
				case 2:	// loaded
				break;
				case 3: // interactive
				break;
				case 4: // complete
					ML.onComplete ( req );
				break;
			}
		}
		req.send(data);
	}

	this.onComplete = function ( req ) {
		var xml = req.responseXML;
		var responseNode = xml.getElementsByTagName('response').item(0);
		var totalNode = responseNode.getElementsByTagName('total').item(0);
		var cntNode = responseNode.getElementsByTagName('cnt').item(0);

		this.total = totalNode.firstChild.nodeValue;
		this.cnt = cntNode.firstChild.nodeValue;

		this.show_Total();
		this.show_Num();
		if ( this.totalcnt_obj != null ) this.show_TotalCount();

		if ( this.cnt > 0 ) {
			var listNode = responseNode.getElementsByTagName('list').item(0);
			var memberNodeCollection = Array(); memberNodeCollection = listNode.childNodes;

			var len = listNode.childNodes.length;

			var str = null;
			if ( len > 0 ) {
				str = '<table>';
				var num = 0;

				for ( var i = 0; i < this.rows; i ++ ) {
					if ( this.cols*i < len ) {
						str += '<tr>';
						for ( var j = 0; j < this.cols; j ++ ) {
							str += '<td style="width: 60px;">';
							if ( num < this.cnt ) {
								var memberNode = memberNodeCollection[num];
								var memberNameNode = memberNode.getElementsByTagName('name').item(0);
								var memberIntroduceNode = memberNode.getElementsByTagName('introduce').item(0);
								var memberCountNode = memberNode.getElementsByTagName('cnt').item(0);

								if ( memberNameNode.hasChildNodes() ) var name = memberNameNode.firstChild.nodeValue;
								if ( memberIntroduceNode.hasChildNodes()) {
									var introduce = memberIntroduceNode.firstChild.nodeValue;
								} else {
									var introduce = '';
								}
								if ( memberCountNode.hasChildNodes()) var mcnt = memberCountNode.firstChild.nodeValue;

								var image = "http://"+this.host+"/images/iconB/"+name+"/";
								var link = "http://"+this.host+"/"+name+"/";
								var nameLabel = this.name_split ( name );
								var movies = "http://"+this.host+"/"+name+"/movies/";

								str += '<a href="'+link+'">';
								str += '<img src="'+image+'" border="0" class="u_icon" title="'+introduce+'" alt="'+name+'" style="width: 45px; height: 45px;" />';
								str += '<div class="name">'+nameLabel+'('+mcnt+')</div>';
								str += '</a>';
							} else {
								image = null;
								link = null;
								str += '&nbsp;';
								tr = 1;
							}
							str += '</td>';
							num ++;
						}
						str += '</tr>';
					}
				}
				str += '</table>';
			} else {
				str += '';
			}
		} else {
			this.obj.style.display = 'none';
			this.navi_obj.style.display = 'none';
		}
		this.obj.innerHTML = str;
	}

	this.name_split = function ( name ) {
		var unit = 7;
		var len = name.length;
		var cnt = Math.ceil(len/unit);
		var buf = "";

		for ( var i = 0; i < cnt; i ++ ) {
			buf += name.substr(i*unit, unit);
			if ( i != cnt ) buf += '<br />';
		}

		return buf;
	}

	this.next = function () {
		if ( this.p < Math.ceil(this.total/this.limit) -1) {
			this.p ++;
			this.set_Offset();
			this.load ();
		}
	}

	this.prev = function () {
		if ( this.p > 0 ) {
			this.p --;
			this.set_Offset();
			this.load ();
		}
	}

	this.set_Offset = function () {
		this.offset = this.p*this.limit;
	}

	this.show_Num = function () {
		if ( this.total > 0 ) {
			this.num_obj.innerHTML = Number(this.p)+1;
		}
	}

	this.show_Total = function () {
		if ( this.total > 0 ) {
			this.total_obj.innerHTML = Math.ceil(this.total/(this.rows*this.cols));
		}
	}

	this.show_TotalCount = function () {
		this.totalcnt_obj.innerHTML = this.total;
	}
}