TopBanner		= function( displayObj ) {
	
	this.cLayer			= displayObj;
	
	var ref				= this;

	this.title			= "";
	this.contents		= "";
	this.url			= "";
	this.fname			= "";
	
	this.init			= function() {
		new ASYNCXMLHTTP( this._____initHandler, "/admin/prog/eucck_maintop_banner_management/getData.php" );
	}
	
	this._____initHandler	= function(xmlHttp) {
		
	    var xml		= xmlHttp.responseXML.getElementsByTagName("datas")[0];

	    ref.title		= xml.getElementsByTagName("title")[0].firstChild.nodeValue;
	    ref.contents	= xml.getElementsByTagName("contents")[0].firstChild.nodeValue;
	    ref.url		= xml.getElementsByTagName("url")[0].firstChild.nodeValue;
	    ref.fname		= xml.getElementsByTagName("fname")[0].firstChild.nodeValue;
		
		ref.initTemplate();
	}
	
	this.initTemplate			= function() {
		new ASYNCXMLHTTP( this._____initTemplateHandler, "/_ui/MainPage/TopBanner/template.html" );
	}
	
	
	this._____initTemplateHandler	= function(xmlHttp) {
	    ref.proc( xmlHttp );
	}
	
	this.proc			= function(xmlHttp) {
		
		var output		= xmlHttp.responseText;

		output		= output.replace( /__DATA_IMAGE__/g, "/admin/prog/eucck_maintop_banner_management/output/" + this.fname );
		output		= output.replace( /__DATA_TITLE__/g, this.title );
		output		= output.replace( /__DATA_CONTENTS__/g, this.contents );
		output		= output.replace( /__DATA_URL__/g, this.url );
		
		this.cLayer.innerHTML		= output;
	}
	
	this.init();
}


new TopBanner( document.getElementById('topBanner') );
