

var rssBoxFeedUrl = "http://www.tcdailyplanet.net/rss.xml";

var rssBoxFeed = {"channel":{"title":"Twin Cities Daily Planet | Minneapolis - St. Paul - ","link":"http:\/\/www.tcdailyplanet.net","language":"en","tagline":null},"items":[{"title":"Rwanda refugee remembers","link":"http:\/\/www.tcdailyplanet.net\/article\/2008\/07\/02\/rwanda-refugee-remembers.html"},{"title":"Weekend what's what 7\/3-7\/5: Red, hot, and blue","link":"http:\/\/www.tcdailyplanet.net\/blog-entry\/2008\/07\/03\/weekend-whats-what-7-3-7-5-red-hot-and-blue.html"},{"title":"Minnesota Spokesman-Recorder turns 75","link":"http:\/\/www.tcdailyplanet.net\/article\/2008\/06\/28\/minnesota-spokesman-recorder-turns-75.html"},{"title":"Citizenship","link":"http:\/\/www.tcdailyplanet.net\/audio-video\/2008\/06\/24\/citizenship.html"},{"title":"Twin Cities World Refugee Day","link":"http:\/\/www.tcdailyplanet.net\/article\/2008\/07\/02\/twin-cities-world-refugee-day.html"},{"title":"Drinking iced tea and getting beat up at e.p. altelier","link":"http:\/\/www.tcdailyplanet.net\/article\/2008\/06\/29\/drinking-iced-tea-and-getting-beat-e-p-altelier.html"},{"title":"The Beat: Hot coffee and high decibels","link":"http:\/\/www.tcdailyplanet.net\/blog-entry\/2008\/07\/03\/beat.html"},{"title":"Snacking and grazing the Mill City Farmers Market ","link":"http:\/\/www.tcdailyplanet.net\/article\/2008\/07\/02\/snacking-and-grazing-mill-city-farmers-market.html"},{"title":"Barbara Allivato: The mother of affordable housing in Minnesota","link":"http:\/\/www.tcdailyplanet.net\/article\/2008\/07\/02\/barbara-allivato-mother-affordable-housing-minnesota.html"},{"title":"Wal-Mart violated worker rights more than 2 million times, Minnesota judge rules ","link":"http:\/\/www.tcdailyplanet.net\/article\/2008\/07\/02\/wal-mart-violated-worker-rights-more-2-million-times-minnesota-judge-rules.html"}]};


/* prototype lite minified */

var Class={create:function(){return function(){this.initialize.apply(this,arguments);}}}
Object.extend=function(destination,source){for(property in source)destination[property]=source[property];return destination;}
Function.prototype.bind=function(object){var __method=this;return function(){return __method.apply(object,arguments);}}
Function.prototype.bindAsEventListener=function(object){var __method=this;return function(event){__method.call(object,event||window.event);}}
function $(){if(arguments.length==1)return get$(arguments[0]);var elements=[];$c(arguments).each(function(el){elements.push(get$(el));});return elements;function get$(el){if(typeof el=='string')el=document.getElementById(el);return el;}}
if(!window.Element)var Element=new Object();Object.extend(Element,{remove:function(element){element=$(element);element.parentNode.removeChild(element);},hasClassName:function(element,className){element=$(element);if(!element)return;var hasClass=false;element.className.split(' ').each(function(cn){if(cn==className)hasClass=true;});return hasClass;},addClassName:function(element,className){element=$(element);Element.removeClassName(element,className);element.className+=' '+className;},removeClassName:function(element,className){element=$(element);if(!element)return;var newClassName='';element.className.split(' ').each(function(cn,i){if(cn!=className){if(i>0)newClassName+=' ';newClassName+=cn;}});element.className=newClassName;},cleanWhitespace:function(element){element=$(element);$c(element.childNodes).each(function(node){if(node.nodeType==3&&!/\S/.test(node.nodeValue))Element.remove(node);});},find:function(element,what){element=$(element)[what];while(element.nodeType!=1)element=element[what];return element;}});var Position={cumulativeOffset:function(element){var valueT=0,valueL=0;do{valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;element=element.offsetParent;}while(element);return[valueL,valueT];}};document.getElementsByClassName=function(className){var children=document.getElementsByTagName('*')||document.all;var elements=[];$c(children).each(function(child){if(Element.hasClassName(child,className))elements.push(child);});return elements;}
Array.prototype.each=function(func){for(var i=0;ob=this[i];i++)func(ob,i);}
function $c(array){var nArray=[];for(i=0;el=array[i];i++)nArray.push(el);return nArray;}
/* writes a rss box for tcdailyplanet.net*/

// private variables
if (!rssBoxArrow)
	var rssBoxArrow = 'http://tcdailyplanet.co-opmedia.org//lib/arrowNormal.gif';
	
if (!rssBoxHomeLink)
	var rssBoxHomeLink = 'http://tcdailyplanet.net/';	

if (!rssBoxArrowOver)
	var rssBoxArrowOver = 'http://tcdailyplanet.co-opmedia.org//lib/arrowOver.gif';

if (!rssBoxBackgroundImage)
	var rssBoxBackgroundImage =  "http://tcdailyplanet.co-opmedia.org//lib/planetRssBack.gif";
	
if (!rssBoxHeadline)
	var rssBoxHeadline = "Stories from Your Planet Today";
	
if (!rssBoxHeadlineColor)
	var rssBoxHeadlineColor = "#4085c3";

	
if (!rssBoxBorderColor)
	var rssBoxBorderColor = "#4085c3";
	
if (!rssBoxBackgroundColor)
	var rssBoxBackgroundColor = "#fff";

	
if (!rssBoxItemColor)
	var rssBoxItemColor = "#000";
	
if (!rssBoxItemColorOver)
	var rssBoxItemColorOver = "#DA1920";
	
var rssBoxMaxHeight = 190;
with(document){
	write('<div style=" height: 250px; width: 300px; border: 1px solid '+rssBoxBorderColor+'; background: '+rssBoxBackgroundColor+' url(\''+rssBoxBackgroundImage+'\') no-repeat top right; text-align: left; font: bold 12px/10px Arial, Helvetica, sans-serif; padding: 0px;" id="rssBoxFeedBox">');


	write('\t <h2 style="padding: 0px; margin: 3px 0px 0px 5px; text-align: left; font: bold 24px/24px Arial, Helvetica, sans-serif; width:230px; color: '+rssBoxHeadlineColor+'; ">'+rssBoxHeadline+'</h2>');	
	write('\t <div id="rssBoxNewsBox" style="width:230px; height: 0px; overflow: hidden; margin: 5px 0px 0px 5px; float: left;">');
	write('\n<style type="text/css" media="screen">\n');
	write('ul#rssBoxFeedList li{ list-style: none outside url('+rssBoxArrow+'); margin-bottom: 8px; }');
	write('ul#rssBoxFeedList li:hover{ list-style: none outside url('+rssBoxArrowOver+'); }');
	write('ul#rssBoxFeedList li a{ color: '+rssBoxItemColor+'; text-decoration: none;}');
	write('ul#rssBoxFeedList li a:hover{ color: '+rssBoxItemColorOver+'; }' );
	write('</style>\n');
	write('\t <ul id="rssBoxFeedList" style="margin: 0px; padding: 0px 0px 0px 17px; */letter-spacing: 0.2px;*/ line-height: 14.2px; text-align: left; font: bold 12px/14px Arial, Helvetica, sans-serif; list-style: none outside url('+rssBoxArrow+');">');	
}
for (var i=0; i < rssBoxFeed.items.length; i++) {	
	document.write('\t\t <li class="rssBoxNewsItem" style="font: bold 12px/14px Arial, Helvetica, sans-serif; text-indent:0px;"><a href="'+ rssBoxFeed.items[i].link +'" style=" font: bold 12px/14px Arial, Helvetica, sans-serif;">'+ rssBoxFeed.items[i].title + '</a></li>\n');
};

with(document){
	write('\t </ul>');
	write('\t </div>');
	write('<a href="'+ rssBoxHomeLink +'" style="border:0; height: 250px; width: 60px; display: none; float: right; margin-top: -50px" id="rssBoxRssLink"></a>');
	write('</div>');
}
var rssBoxLis = document.getElementsByClassName('rssBoxNewsItem');
var rssBoxHeight = 0;
rssBoxLis.each(function(rssBoxLi){
rssBoxHeight += rssBoxLi.scrollHeight+8;
if (rssBoxHeight >rssBoxMaxHeight){
	rssBoxLi.style.display="none";
}
});
$('rssBoxNewsBox').style.height= rssBoxMaxHeight+"px";
$('rssBoxRssLink').style.display= "block";



