function JingleFeedSubscriberWidget()
{
	this.host = "www.jinglefeed.com";
	this.path = "index.php?";
	this.type = '728x500_basic';
	this.borderColor = "#ffffff";
	this.backgroundColor = "#ffffff";
	this.font = "Arial";
	this.title = '';
	this.headerBgColor = "#274869";
	this.headerFontColor = "#FFFFFF";
	this.bgColor = "";
	this.fontColor = "";
}

JingleFeedSubscriberWidget.prototype.getUrl = function() {
	var url = "http://" + this.host;
	url += this.path;
	url += "&type=" + encodeURIComponent(this.type);
	url += "&headerBgColor=" + encodeURIComponent(this.headerBgColor);
	url += "&headerFontColor=" + encodeURIComponent(this.headerFontColor);
	url += "&bgColor=" + encodeURIComponent(this.bgColor);
	url += "&fontColor=" + encodeURIComponent(this.fontColor);
	url += "&font=" + encodeURIComponent(this.font);
	url += "&title=" + encodeURIComponent(this.title);
	url += "&bordercolor=" + encodeURIComponent(this.borderColor);
	url += "&titlecolor=" + encodeURIComponent(this.titleColor);
	url += "&titlebgcolor=" + encodeURIComponent(this.titleBgColor);
	return url;
}

JingleFeedSubscriberWidget.prototype.render = function()
{
	// parse "type" value for dimensions
	var re = /^(\d+)x(\d+)_\w+$/;
	var match = re.exec(this.type);
	if (match == null) throw "Invalid type: " + this.type;
	var width = match[1];
	var height = match[2];
	document.write('<iframe id="jfSubscriberWidget" width="' + width + '" height="' + height + '" frameborder="0" scrolling="no" marginwidth="0" marginheight="0" hspace="0" vspace="0" name="jingle_feed_widget" src="' + this.getUrl() + '"></iframe>');
};