/*
RSSFeed Class by design-disorder.com
Author: Helmuth Ritzer
Version: 1.0 Date: 1.1.2010
*/
function RSSFeed(feedURL, showChannel, numItems, descSize, showHtml, showDate, timeZone, target, useUtf8, customCss) {

	// instance vars
	this.feedURL = feedURL;
	this.showChannel = showChannel;
	this.numItems = numItems;
	this.descSize = descSize;
	this.showHtml = showHtml;
	this.showDate = showDate;
	this.timeZone = timeZone;
	this.target = target;
	this.useUtf8 = useUtf8;
	this.customCss = customCss;
	
	// methods
	this.generate = function () {
		var url = "http://feed2js.org/feed2js.php?src=";
		url = url + escape(this.feedURL);
		url = url + "&num=" + this.numItems;
		url = url + "&desc=" + this.descSize;
		if (this.showHtml)
			url = url + "&html=a";
		else
			url = url + "&html=p";
		if (this.showChannel)
			url = url + "&chan=y";
		if (this.showDate)
			url = url + "&date=y";
		url = url + "&tz=" + this.timeZone;
		url = url + "&targ=" + this.target;
		if (this.useUtf8)
			url = url + "&utf=y";
		if (this.customCss)
			url = url + "&css=" + this.customCss;
		if (this.useUtf8)
			document.write('<scr'+'ipt type="text/javascript" language="javascript" charset="UTF-8" src="' + url + '"></scr'+'ipt>');
		else
			document.write('<scr'+'ipt type="text/javascript" language="javascript" src="' + url + '"></scr'+'ipt>');
	};
};

