var AjaxLoad = Class.create({
	url: null,
	container: null,
	initialize: function(id) {
		this.url = this.convertHtmlIdToUrl(id);
		this.container = $(id).up();
		var self = this;
		window.setTimeout(function(){self.doUpdate()}, 100);
	},
	doUpdate: function()
	{
		var self = this;
		new Ajax.Updater(this.container, this.url, {
			onCreate: function(){self.onCreate()},
			onSuccess: function(){self.onSuccess()},
			onComplete: function(){self.onComplete()}
		});
	},
	convertHtmlIdToUrl: function(id)
	{
		var url = '';
		url = id.replace(/-/gi, '/');
		return '/' + url;
	},
	onCreate: function()
	{
	},
	onSuccess: function()
	{
	},
	onComplete: function()
	{
	try{
	new text2img(this.container);
	}
	catch(e){
	alert(e);
	}
	initSroller();
	}

});
