var org = {p3k: ({url:"http://www.caribbeannetnews.com/news/_files/rss/news/all.xml", xml:"<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<rss version=\"2.0\">\n\t<channel>\n\t\t<title>Caribbean Net News Daily Headlines</title>\n\t\t<link>http://www.caribbeannetnews.com/article.php</link>\n\t\t<description>A summary of our daily news headlines of events happening in or relevant to the Caribbean region</description>\n\t\t<language>en-us</language>\n\t\t<copyright>Caribbean Net News</copyright>\n\t\t<managingEditor>editor@caribbeannetnews.com</managingEditor>\n\t\t<item>\n\t\t\t<title>Clouds gather over Wyclef Jean&#039;s Haiti bid  </title>\n\t\t\t<link>http://www.caribbeannetnews.com/article.php?news_id=24102</link>\n\t\t\t<description>&lt;img border=&#34;1&#34; hspace=&#34;5&#34; alt=&#34;&#34; vspace=&#34;2&#34; align=&#34;left&#34; src=&#34;http://www.caribbeannetnews.com/news/_files/Image/2010/mar/19/wyclefjean-tn.jpg&#34; width=&#34;60&#34; height=&#34;80&#34; /&gt;PORT-AU-PRINCE, Haiti (AFP) -- Hip-hop superstar Wyclef Jean flew out of his native Haiti on Friday as clouds gathered over his outsider presidential bid announced barely 24 hours earlier. &amp;quot;I am leaving because of family obligations, but I will return in several weeks to enter the electoral campaign,&amp;quot; he said.</description>\n\t\t\t<pubDate>2010-08-07</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Gay condemns Bolt to first defeat in two years</title>\n\t\t\t<link>http://www.caribbeannetnews.com/article.php?news_id=24103</link>\n\t\t\t<description>STOCKHOLM, Sweden (AFP) -- World record holder and Olympic champion Usain Bolt crashed to his first defeat in two years on Friday when America&#039;s Tyson Gay won their eagerly-awaited 100m clash at the Diamond League meeting. Gay clocked 9.84sec to edge Bolt, who was second in 9.97sec.</description>\n\t\t\t<pubDate>2010-08-07</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>UN talks founder as climate impacts mount, say delegates</title>\n\t\t\t<link>http://www.caribbeannetnews.com/article.php?news_id=24104</link>\n\t\t\t<description>PARIS, France (AFP) -- UN climate talks tasked with curbing the threat of global warming are backsliding, delegates from both rich and developing nations said on Friday at the close of a week-long session in Bonn. Even as evidence mounts that deadly impacts are upon us, negotiators said.</description>\n\t\t\t<pubDate>2010-08-07</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Tropical Storm Colin heads towards Bermuda</title>\n\t\t\t<link>http://www.caribbeannetnews.com/article.php?news_id=24105</link>\n\t\t\t<description>MIAMI, USA (AFP) -- Tropical Storm Colin barreled towards Bermuda on&amp;nbsp;Friday, with US forecasters saying the weather system could clip the island, or even pass directly over it, but was not likely to affect the US east coast.&amp;nbsp; At 11:00 am local time the storm was about 380 miles south-southwest of Bermuda.</description>\n\t\t\t<pubDate>2010-08-07</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Players&#039; chief calls for uniform referral system</title>\n\t\t\t<link>http://www.caribbeannetnews.com/article.php?news_id=24106</link>\n\t\t\t<description>SYDNEY, Australia (AFP) -- The chief of the Federation of International Cricketers&#039; Associations on Friday called for the Umpire Decision Review System (UDRS) to be applied throughout all Test series. The referral system is being used in a Test series in Britain for the first time during the current four-match campaign.</description>\n\t\t\t<pubDate>2010-08-07</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Sean Penn questions Wyclef Jean bid for Haitian presidency</title>\n\t\t\t<link>http://www.caribbeannetnews.com/article.php?news_id=24107</link>\n\t\t\t<description>LOS ANGELES, USA (AFP) -- Oscar-winning actor Sean Penn poured cold water on Wyclef Jean&#039;s bid for the Haitian presidency on Wednesday, questioning the motives of the musician and those backing his campaign. Penn has spent extended periods in Haiti since the devastating January 12 earthquake.</description>\n\t\t\t<pubDate>2010-08-07</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Castro autobiography describes rebel shaped by childhood</title>\n\t\t\t<link>http://www.caribbeannetnews.com/article.php?news_id=24108</link>\n\t\t\t<description>&lt;img border=&#34;1&#34; hspace=&#34;5&#34; alt=&#34;&#34; vspace=&#34;2&#34; align=&#34;left&#34; src=&#34;http://www.caribbeannetnews.com/news/_files/Image/2010/mar/24/fidelcastro-tn.jpg&#34; width=&#34;60&#34; height=&#34;80&#34; /&gt;HAVANA, Cuba (AFP) -- Cuba&#039;s iconic former leader Fidel Castro says his childhood struggle against unjust authority turned him into a rebel and revolutionary, in extracts of his upcoming autobiography published online on Thursday by Cubadebate.com. &amp;quot;I wasn&#039;t born a politician, although as a young child...</description>\n\t\t\t<pubDate>2010-08-07</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Commentary: Belizeans in the US should start advocating for Belizean citizenship rights</title>\n\t\t\t<link>http://www.caribbeannetnews.com/article.php?news_id=24109</link>\n\t\t\t<description>&lt;img border=&#34;1&#34; hspace=&#34;5&#34; alt=&#34;&#34; vspace=&#34;2&#34; align=&#34;left&#34; src=&#34;http://www.caribbeannetnews.com/news/_files/Image/january11/wellingtonramos-tn.jpg&#34; width=&#34;60&#34; height=&#34;80&#34; mce_src=&#34;http://www.caribbeannetnews.com/news/_files/Image/january11/wellingtonramos-tn.jpg&#34; /&gt;It has been many years now since the United Democratic Party granted dual citizenship rights to Belizeans who became citizens of another country and to their children and offspring who are born overseas. Yet, despite this passage, Belizeans who possess dual citizenship cannot vote by proxy...</description>\n\t\t\t<pubDate>2010-08-07</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Private-public sector team from Guyana to visit Kuwait</title>\n\t\t\t<link>http://www.caribbeannetnews.com/article.php?news_id=24110</link>\n\t\t\t<description>GEORGETOWN, Guyana (GINA) -- The government of Guyana, the private sector and the Ministry of Tourism, Industry and Commerce are currently working on putting together a team to travel to Kuwait, to pursue investments and build relations. This follows the recent visit by the Kuwaiti Prime Minister and delegation.</description>\n\t\t\t<pubDate>2010-08-07</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Smooth sailing for Barbados cruise industry</title>\n\t\t\t<link>http://www.caribbeannetnews.com/article.php?news_id=24111</link>\n\t\t\t<description>BRIDGETOWN, Barbados (BTA) -- Cruise is in the forefront of the Barbados Tourism Authority&amp;rsquo;s (BTA) new marketing thrust. It is described by Ryan Blackett, Director, Cruise Tourism, as having &amp;ldquo;the ability to transform the tourism landscape.&amp;rdquo; The Caribbean is at present the number one cruise destination in the world.</description>\n\t\t\t<pubDate>2010-08-07</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Jamaica seeks markets, investors in Canada</title>\n\t\t\t<link>http://www.caribbeannetnews.com/article.php?news_id=24112</link>\n\t\t\t<description>TORONTO, Canada (JIS) -- Jamaica&#039;s Minister of Agriculture and Fisheries, Dr Christopher Tufton, met on Thursday with Ontario&#039;s Minister of Agriculture, Food and Rural Affairs, Carol Mitchell, to discuss topics of mutual interest. The meeting took place at the Ontario Minister&#039;s offices in downtown Toronto.</description>\n\t\t\t<pubDate>2010-08-07</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>New York mayor to host West Indians at Gracie Mansion</title>\n\t\t\t<link>http://www.caribbeannetnews.com/article.php?news_id=24113</link>\n\t\t\t<description>NEW YORK, USA -- New York City Mayor Michael Bloomberg, is getting set to once again welcome hundreds of influencers in New York&#039;s Caribbean-American community to his official residence on&amp;nbsp;August 12 to kick-off celebrations for the 43rd West Indian American Day Carnival Association Labor Day Parade.</description>\n\t\t\t<pubDate>2010-08-07</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Over 150 firms engage in national training programmes across the OECS</title>\n\t\t\t<link>http://www.caribbeannetnews.com/article.php?news_id=24114</link>\n\t\t\t<description>CASTRIES, St Lucia (OECS) -- The OECS Export Development Unit, OECS EDU says at least one hundred and seventy-five companies across the nine-member grouping are to benefit from an ongoing series of National Training Programmes.&amp;nbsp;The workshops are supported by the European Development Fund.</description>\n\t\t\t<pubDate>2010-08-07</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Letter: What happened when Labour morphed into the MNU?</title>\n\t\t\t<link>http://www.caribbeannetnews.com/article.php?news_id=24115</link>\n\t\t\t<description>In an article published in the Vincentian (June 24/2010), listing the author as &amp;ldquo;the ULP View&amp;rdquo; and captioned &amp;ldquo;Eustace&amp;rsquo;s mountain of follies,&amp;rdquo; the writer presents a litany of charges and accusations against the leader of the opposition. The writer claims &amp;ldquo;Eustace does not have what it takes&amp;hellip;</description>\n\t\t\t<pubDate>2010-08-07</pubDate>\n\t\t</item>\n\t</channel>\n</rss>\n", message:undefined, modified:(new Date(1284017130040)), baseUri:"http://p3k.org/rss/", query:"frameColor=gold&textColor=black&_=1221176327332&titleBarColor=gold&compact=&fontFace=Tahoma&font-Size=8pt&align=&showXmlButton=&maxItems=5&boxFillColor=white&titleBarTextColor=black&width=225 &url=http://www.caribbeannetnews.com/news/_files/rss/news/all.xml&", param:{textColor:"black", 'font-Size':"8pt", width:"225 ", align:"", fontFace:"Tahoma", url:"http://www.caribbeannetnews.com/news/_files/rss/news/all.xml", compact:"", frameColor:"gold", showXmlButton:"", boxFillColor:"white", _:"1221176327332", titleBarColor:"gold", maxItems:"5", titleBarTextColor:"black"}, box:"<table class=\"rssBox\" width=\"${width}\" bgcolor=\"${frameColor}\" \n      style=\"table-layout: fixed; overflow: hidden; font-family: ${fontFace};\" \n      align=\"${align}\" cellspacing=\"1\" cellpadding=\"7\" border=\"0\">\n<tr bgcolor=\"${titleBarColor}\">\n<td>\n   ${xmlButton}\n   <strong>${title}</strong>\n   <div>\n      <small style=\"color: ${titleBarTextColor};\">${date}</small>\n   </div>\n</td>\n</tr>\n<tr bgcolor=\"${boxFillColor}\">\n<td class=\"rssBoxContent\" style=\"color: ${textColor};\">\n   ${image}\n   ${items}\n   ${input}\n   <div class=\"rssBoxPromo\" style=\"margin-top: 0px; text-align: left; \n         font: 9px verdana, sans-serif\">\n      RSS box by <a href=\"http://p3k.org/rss\">p3k.org</a>.\n   </div>\n</td>\n</tr>\n</table>\n\n", image:"<a href=\"${link}\"><img src=\"${source}\" width=\"${width}\" height=\"${height}\" \nalt=\"${title}\" title=\"${title}\" align=\"${align}\" valign=\"${valign}\" \nhspace=\"${hspace}\" vspace=\"${vspace}\" border=\"0\" /></a>\n\n", input:"<form method=\"get\" action=\"${link}\">\n${description}\n<input type=\"text\" name=\"${name}\" size=\"15\" /> <input type=\"submit\" \nvalue=\"${title}\" />\n</form>\n\n", item:"<div class=\"rssBoxItemContent\">\n${title}\n${break}\n${description}\n${buttons}\n</div><br />\n\n", date:"${year}-${month}-${day}, ${hours}:${minutes}h\n\n", link:"<a class=\"${class}\" href=\"${link}\" style=\"${style}\">${text}</a>\n", error:"<?xml version=\"1.0\"?>\n<rss version=\"error\">\n   <channel>\n      <title>RSS Box Error</title>\n      <link>${link}</link>\n      <description>This output was automatically generated to report an error \n      that occurred during a request to the JavaScript RSS Box Viewer.</description>\n      <item>\n         <title>Oops, something went wrong...</title>\n         <description>An error occurred while processing the request to the \n         JavaScript RSS Box Viewer.</description>\n      </item>\n      <item>\n         <title>An error message was returned by the server.</title>\n         <description>${message}</description>\n      </item>\n      <item>\n         <description>Most likely, this might have happened because of a \n         non-existent or invalid RSS feed URL. Please check and possibly correct \n         your input, then try again.</description>\n      </item>\n   </channel>\n</rss>\n\n"})};
function debug(str) {
   return document.write('<p><span style="background-color: yellow;">', 
         str, '</span><p>');
}

org.p3k.RssBox = function() {
   var ref;
   var ISOPATTERN = /([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9:]+).*$/;
   
   var data = org.p3k;
   data.defaults = {
      url: "http://blog.p3k.org/rss",
      maxItems: 7,
      width: 200,
      align: "",
      frameColor: "black",
      titleBarColor: "lightblue",
      titleBarTextColor: "black",
      boxFillColor: "white",
      textColor: "black",
      showXmlButton: "",
      compact: ""
   };
   
   var baseUri = data.baseUri;
    
   var getColor = function(str) {
      if (str.length === 6 && parseInt(str, 16) && str.indexOf("#") !== 0) {
         str = "#" + str;
      }
      return str.toLowerCase();
   }

   var value;
   for (var i in data.defaults) {
      value = data.param[i];
      if (!value || value.length === 0) {
         data.param[i] = data.defaults[i];
      } else if (i.indexOf("Color") > 0) {
         data.param[i] = getColor(value);
      }
   }

   // FIXME: Ugly work-around for many boxes using too small width 
   // values because the former version did not show the exact output.
   if (data.param.javascript && data.param.width < 200) {
      data.param.width = 200;
   }
   // Remove obsolete parameters from param and query
   delete data.param.javascript;
   data.query = data.query.replace("javascript=true", "");   

   var NAMESPACES = {
      dc: "http://purl.org/dc/elements/1.1/",
      rdf: "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   };

   var getUrl = function(url) {
      url = baseUri + "proxy.r?" + encodeURIComponent(url);
   
      var HttpRequest = function() {
         return (typeof XMLHttpRequest !== "undefined") ?
            new XMLHttpRequest() : new ActiveXObject("Msxml2.XMLHTTP");
      }
   
      var request = new HttpRequest();
      request.open("GET", url, false);
      request.send(null);   
      if (!request.getResponseHeader("Date")) {
         var cached = request;
         var ifModifiedSince = cached.getResponseHeader("Last-Modified") || 
               new Date(0); // January 1, 1970
         request = new HttpRequest();
         request.open("GET", url, false);
         request.setRequestHeader("If-Modified-Since", ifModifiedSince);
         request.send("");
         if (request.status === 304) {
            request = cached; 
         }
      }
      return request;
   }
   
   var getDocument = function(source) {
      if (source) {
         if (document.implementation.createDocument) {
            var parser = new DOMParser();
            var doc = parser.parseFromString(source, "text/xml");
            return doc;
         } else if (window.ActiveXObject) {
            var doc = new ActiveXObject("Microsoft.XMLDOM");
            doc.async = "false";
            doc.loadXML(source);
            return doc;
         }
      }
      return null;
   }
   
   var getError = function() {
      var msg = null, root;
      if (!xml || data.message) {
         msg = data.message || "Unknown error.";
      } else if (xml.parseError && xml.parseError.errorCode) {
         msg = xml.parseError.reason; // IExplore
      } else if (root = xml.documentElement) {
         var errorNode;
         if (root.nodeName === "parsererror") {
            msg = xml.documentElement.textContent; // Mozilla
         } else if ((errorNode = root.childNodes[0]) && 
               errorNode.nodeName === "parsererror") {
            msg = errorNode.textContent; // Safari
         } else if (!/rss|rdf|scriptingNews/i.test(xml.documentElement.nodeName)) {
            msg = "Incompatible data format. Are you sure this is an RSS feed?";
         }
      }
      return msg;
   }
   
   var getNode = function(parent, name, namespace) {
      if (namespace) {
         if (typeof parent.getElementsByTagNameNS === "undefined") {
            var elements = parent.getElementsByTagName(namespace + ":" + name);
         } else {
            var elements = parent.getElementsByTagNameNS(NAMESPACES[namespace], name);
         }
      } else {
         var elements = parent.getElementsByTagName(name);
      }
      if (elements && elements[0]) {
         return elements[0];
      }
      return null;
   }
   
   var getText = function(node) {
      if (node && node.childNodes && node.childNodes.length > 0) {
         return node.childNodes[0].nodeValue || "";
      }
      return "";
   }
   
   var trim = function(str) {
      if (str) {
         return str.replace(/^\s*(\S*)\s*$/, "$1");
      }
      return "";
   }
   
   var padZero = function(n) {
      if (n < 10) {
         return "0" + n
      }
      return n;
   }

   var encodeXml = function(str) {
      if (!str) {
         return "";
      }
      return str.replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/&/g, "&amp;");
   }
      
   var render = function(template, param) {
      if (!template || !param) {
         return template;
      }
      template = template.replace(/\$\{([^}]+)\}/g, function() {
         var key = arguments[1];
         return param[key] || "";
      });
      return template;
   }
   
   var renderDate = function(date) {
      if (date.constructor !== Date) {
         var str = String(date);
         var millis = Date.parse(str.replace(ISOPATTERN, "$1/$2/$3 $4"));
         if (millis) {
            date = new Date(millis);
         } else {
            date = new Date;
         }
      }

      return render(data.date, {
         year: date.getFullYear(),
         month: padZero(date.getMonth() + 1),
         day: padZero(date.getDate()),
         hours: padZero(date.getHours()),
         minutes: padZero(date.getMinutes()),
         seconds: padZero(date.getSeconds()),
         timeZone: "" // date.getTimezoneOffset()
      });
   }
   
   var renderButtons = function(enclosure, source) {
      var result = "";
      if (enclosure && enclosure.link) {
         result += render(data.image, {
            source: baseUri + "enclosure.gif",
            title: enclosure.type,
            link: encodeURI(enclosure.link),
            width: 13,
            height: 16
         });
      }
      if (source && source.link) {
         result += render(data.image, {
            source: baseUri + "source.gif",
            title: source.title,
            link: encodeURI(source.link),
            width: 15,
            height: 15
         });
      }
      return result;         
   }
   
   var param = data.param;
   var rss = data.rss = {items: []};
   var xml = getDocument(data.xml);

   rss.error = getError();
   if (rss.error !== null) {
      xml = getDocument(render(data.error, {
         link: baseUri + "?" + encodeXml(data.query),
         message: encodeXml(rss.error)
      }));
      param.compact = 0;
      param.showXmlButton = 1;
   }

   var root = xml.documentElement;
   var type = root.nodeName;

   if (type === "scriptingNews") {
      var channel = getNode(xml, "header");
      rss.format = "Scripting News";
      rss.version = getText(getNode(channel, "scriptingNewsVersion"));
      rss.title = getText(getNode(channel, "channelTitle"));
      rss.description = getText(getNode(channel, "channelDescription"));
      rss.link = getText(getNode(channel, "channelLink"));
      if (ref = getText(getNode(channel, "imageUrl"))) {
         ref = rss.image = {source: ref};
         ref.title = getText(getNode(channel, "imageTitle"));
         ref.link = getText(getNode(channel, "imageLink"));
         ref.width = getText(getNode(channel, "imageWidth"));
         ref.height = getText(getNode(channel, "imageHeight"));
         ref.description = getText(getNode(channel, "imageCaption"));
      }
   } else {
      var channel = getNode(xml, "channel");
      rss.format = "RSS";
      rss.version = (type === "rdf:RDF") ? "1.0" : 
            root.getAttribute("version");
      rss.title = getText(getNode(channel, "title"));
      rss.description = getText(getNode(channel, "description"));
      rss.link = getText(getNode(channel, "link"));
      var image = getNode(xml, "image");
      if (image) {
         ref = rss.image = {};
         ref.source = getText(getNode(image, "url"));
         ref.title = getText(getNode(image, "title"));
         ref.link = getText(getNode(image, "link"));
         ref.width = getText(getNode(image, "width"));
         ref.height = getText(getNode(image, "height"));
         ref.description = getText(getNode(image, "description"));
      }
   }
   
   if (type === "rdf:RDF") {
      rss.date = renderDate(getText(getNode(channel, "date", "dc")) || data.modified);
      rss.rights = getText(getNode(channel, "creator", "dc"));
      var input = getNode(root, "textinput");
      if (input && !getNode(input, "link")) {
         input = root.getElementsByTagName("textinput")[1];
      }
      if (input) {
         ref = rss.input = {};
         ref.link = getText(getNode(input, "link"));
         ref.description = getText(getNode(input, "description"));
         ref.name = getText(getNode(input, "name"));
         ref.title = getText(getNode(input, "title"));
      }
   } else {
      rss.date = renderDate(getText(getNode(channel, "lastBuildDate") || getText(getNode(channel, "pubDate"))) || data.modified);
      rss.rights = getText(getNode(channel, "copyright"));
   }
   
   var item, text, node;
   var items = xml.getElementsByTagName("item");

   for (var i=0; i<Math.min(items.length, param.maxItems); i+=1) {
      item = items[i];

      if (type === "scriptingNews") {
         ref = {title: ""};
         ref.description = getText(getNode(item, "text")).replace(/\n/g, " ");
         ref.link = getText(getNode(item, "link"));
         if (text = trim(getText(getNode(item, "linetext")).replace(/\n/g, " "))) {
            ref.description = ref.description.replace(new RegExp(text), 
                  '<a href="' + getText(getNode(item, "url")) + '">' + text + '</a>');
         }
      } else {
         ref = {
            title: getText(getNode(item, "title")),
            description: getText(getNode(item, "description")),
            link: getText(getNode(item, "link") || getNode(item, "guid"))
         };
     }

     if (node = getNode(item, "source")) {
        ref.source = {
           link: node.getAttribute("url"),
           title: getText(node)
        }
     }
     
     if (node = getNode(item, "enclosure")) {
        ref.enclosure = {
           link: node.getAttribute("url"),
           length: node.getAttribute("length"),
           type: node.getAttribute("type")
        }
     }
     
     if (node = getNode(item, "category")) {
        ref.category = {
           domain: node.getAttribute("domain") || "",
           content: getText(node)
        }
     }
     
     rss.items.push(ref);
   }
   
   var item, items = "";
   for (var i=0; i<rss.items.length; i+=1) {
      item = rss.items[i];
      items += render(data.item, {
         title: new function() {
            var title = (!param.compact ? "<strong>" : "");
            if (item.link) {
               title += render(data.link, {
                  link: encodeURI(item.link),
                  text: item.title,
                  'class': "rssBoxItemTitle"
               });
            } else {
               title += item.title;
            }
            !param.compact && (title += "</strong>");
            return new String(title); // FIXME: Funny, title alone will be rendered as [object]
         }(),
         'break': item.title && item.description ? "<br />" : "",
         description: (!param.compact || !item.title) && item.description,
         buttons: renderButtons(item.enclosure, item.source)
      });
   }
   
   var box = render(data.box, {
      title: rss.link ? render(data.link, {
         link: encodeURI(rss.link),
         text: rss.title,
         'class': "rssBoxTitle",
         style: "color: " + param.titleBarTextColor
      }) : rss.title,
      description: rss.description,
      items: items,

      xmlButton: param.showXmlButton && render(data.image, {
         link: param.url,
         source: baseUri + "rss.png",
         title: rss.format + " " + rss.version,
         width: 16,
         height: 16,
         align: "right",
         hspace: 3
      }),
      
      image: !param.compact && rss.image && render(data.image, {
         link: encodeURI(rss.image.link),
         source: rss.image.source,
         width: rss.image.width,
         height: rss.image.height,
         title: rss.image.title,
         align: "right",
         valign: "baseline",
         hspace: 5,
         vspace: 5
      }),
      
      input: !param.compact && rss.input && render(data.input, {
         link: encodeURI(rss.input.link),
         description: rss.input.description,
         name: rss.input.name,
         title: rss.input.title
      }),
      
      date: rss.date,
      width: param.width,
      frameColor: param.frameColor,
      fontFace: param.fontFace,
      align: param.align,
      titleBarColor: param.titleBarColor,
      titleBarTextColor: param.titleBarTextColor,
      boxFillColor: param.boxFillColor,
      textColor: param.textColor
   });

   if (!window.rssBoxSetup) {
      document.write(box);
   }
   
   return box;
};

org.p3k.RssBox();

