NewMembers		= function( displayObj ) {
	
	this.cLayer			= displayObj;
	
	var ref				= this;

	this.thumbURL		= "";
	this.info			= "";
	this.url			= "";
	this.articleNum		= "";
	
	this.init			= function() {
		new ASYNCXMLHTTP( this._____initHandler, "/_share_/EUCCKBoard/_protocol/getListXML.php?tid=EUCCK_new_members&listnum=1" );
	}
	
	this._____initHandler	= function(xmlHttp) {
	    
	    var xml		= xmlHttp.responseXML.getElementsByTagName("row")[0];

	    ref.thumbURL		= xml.getElementsByTagName("thumb_url")[0].firstChild.nodeValue;
	    ref.info			= xml.getElementsByTagName("info")[0].firstChild.nodeValue;
	    ref.url				= xml.getElementsByTagName("url")[0].firstChild.nodeValue;
	    ref.articleNum		= xml.getElementsByTagName("num")[0].firstChild.nodeValue;
		
		ref.initTemplate();
	}
	
	this.initTemplate			= function() {
		new ASYNCXMLHTTP( this._____initTemplateHandler, "/_ui/MainPage/NewMembers/template.html" );
	}
	
	
	this._____initTemplateHandler	= function(xmlHttp) {
	    ref.proc( xmlHttp );
	}
	
	this.proc			= function(xmlHttp) {
		
		var output		= xmlHttp.responseText;
		
		this.info		= this.info.substr( 0, 100 ) + " ...";

		output		= output.replace( /__DATA_THUMB_URL__/g, this.thumbURL );
		output		= output.replace( /__DATA_INFO__/g, this.info );
		output		= output.replace( /__DATA_HOMEPAGE__/g, makeValidURL(this.url) );
		output		= output.replace( /__DATA_URL__/g, "/site/members/new_members.htm?mode=view&num=" + this.articleNum );
		
		this.cLayer.innerHTML		= output;
	}
	
	this.init();
}


new NewMembers( document.getElementById('newMembers') );
