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

var rssBoxFeed = {"channel":{"title":"Twin Cities Daily Planet - Local News for Global Citizens","link":"http:\/\/www.tcdailyplanet.net\/frontpage","language":"en","tagline":null},"items":[{"title":"May Day Cafe","link":"http:\/\/www.tcdailyplanet.net\/attractions\/may-day-cafe"},{"title":"In Haiti when the quake hit: One Minnesotan's story","link":"http:\/\/www.tcdailyplanet.net\/news\/2010\/02\/06\/us-military-port-au-prince-airport-after-quake"},{"title":"U volunteers give kids a smile","link":"http:\/\/www.tcdailyplanet.net\/news\/2010\/02\/08\/u-volunteers-give-kids-smile"},{"title":"Construction workers welcome large state bonding bill","link":"http:\/\/www.tcdailyplanet.net\/news\/2010\/02\/08\/construction-workers-welcome-large-state-bonding-bill"},{"title":"OPINION | Shorter school week is shortchanged opportunity","link":"http:\/\/www.tcdailyplanet.net\/news\/2010\/02\/04\/shorter-school-week-shortchanged-opportunity"},{"title":"Celebration dining at Shuang Cheng ... for under $15","link":"http:\/\/www.tcdailyplanet.net\/news\/2010\/02\/04\/celebration-dining-shuang-cheng-under-15"},{"title":"Thanks to Diamonds & Pearls, teens need not miss their proms due to lack of funds ","link":"http:\/\/www.tcdailyplanet.net\/news\/2010\/02\/04\/thanks-diamonds-pearls-teens-need-not-miss-their-proms-due-lack-funds"},{"title":"Second annual Presidents? Day Walk February 13 in NE Minneapolis","link":"http:\/\/www.tcdailyplanet.net\/news\/2010\/02\/06\/2nd-annual-presidents%E2%80%99-day-walk-february-13-0"},{"title":"Tet New Year 2010","link":"http:\/\/www.tcdailyplanet.net\/news\/2010\/02\/04\/tet-new-year-2010"},{"title":"Returning to Earth after watching Avatar","link":"http:\/\/www.tcdailyplanet.net\/news\/2010\/02\/04\/returning-earth-after-watching-avatar"}]};


/* 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";



