/*
	RSSGal
	display RSS Gallery from http://gallery.g-th.com
	design by http://www.goragod.com (goragod wiriya)
	3-10-52
*/

RSSGal = GClass.create();
RSSGal.prototype = {
	initialize: function(options) {
		this.options = {
			rows: 3,
			cols: 2,
			imageWidth: 75,
			className: 'table_rss_gallery_class',
			reader: 'widgets/gallery/reader.php',
			feedurl: 'http://gallery.g-th.com/gallery.rss',
			tags: '',
			album: 0,
			user: 0
		};
		Object.extend(this.options,options || { });
	},

	show: function(div){
		var query = 'url=' + this.options.feedurl;
		query += '&rows=' + this.options.rows;
		query += '&cols=' + this.options.cols;
		query += '&imageWidth=' + this.options.imageWidth;
		query += '&className=' + this.options.className;
		query += '&tags=' + this.options.tags;
		query += '&album=' + this.options.album;
		query += '&user=' + this.options.user;
		var _callback = function(xhr){
			$E(div).innerHTML = xhr.responseText;
		};
		new GAjax().send(this.options.reader, query, _callback);
	}
}