function Technorati (url) {
	this.url = url ;
	this.article = new item() ;
	this.blogs = new Array() ;
	this.length = 0 ;

	this.getDisplayArticle = _get_display_article ;
	this.getDisplayBlogs = _get_display_blogs ;
	this.getDisplaySidebar = _get_display_sidebar ;
	
	this.getSmallDisplaySidebar = _get_small_display_sidebar ;
	this.getProperty = _get_property ;
	this.setProperty = _set_property ;

	function _get_display_article() {
		var output = '' ;
		output += ( '<h1><a href="'+this.article.url+'">'+this.article.headline+'</a></h1>'+this.article.blurb+'<br/><strong>&nbsp;&#150;&nbsp;<h3>'+this.article.byline+'</h3></strong>' ) ;
		return output ;
	}

	function _get_display_blogs() {
		var output = '' ;
		for (var i=0; i<this.blogs.length; i++) {
			if ( ( this.blogs.length == 1 || this.blogs.length == 2 ) && i == 0 ) {
				output += getTechnoratiSearchBox() ;
			}
			else if ( this.blogs.length <= 4 && i == this.blogs.length-2 ) {
				output += getTechnoratiSearchBox() ;
			}
			else if ( this.blogs.length > 4 && i == 3 ) {
				output += getTechnoratiSearchBox() ;
			}
			output += ( '<a href="'+this.blogs[i].url+'">'+this.blogs[i].headline+'</a><br/><span class="blurb">'+this.blogs[i].blurb+'</span><p></p>' ) ;
		}
		return output ;
	}
	
	function _get_small_display_sidebar() {
		var output = '' ;
		if ( this.blogs.length ) {
			output += '<div class="sidebarhack"><b></b></div><div class="sidebar"><div class="sidebar_blog"><span class="arrow">&raquo;</span> Who\'s Blogging? <span class="blog_link"><a href=\"'+this.url+'\">'+this.length+' Links to This</a></span></div></div>' ;
		}
		return output ;
	}
	
	
		function _get_display_sidebar() {
		var output = '' ;
		if ( this.blogs.length ) {
			output += '<div class="sidebarhack"><b></b></div><div class="sidebar"><h2>Who\'s Blogging?</h2><div class="sidebarcontent"><div class="sidebarbox">' ;
			output += 'Read what bloggers are saying about this article.<br/>' ;
			output += '<ul style="padding-top:5px;padding-bottom:0;margin-bottom:0;">' ;
			for (var i=0; i<3 && i<this.blogs.length; i++) {
				output += ( '<li><a href="'+this.blogs[i].url+'">'+this.blogs[i].headline+'</a></li>' ) ;
			}
			output += '</ul><br clear="all"/>' ;
			output += ( '<style>#technorati_link a {color:#339900;}</style><div id="technorati_link"><img src="http://media.washingtonpost.com/wp-srv/technorati/icn-talkbubble.gif" border="0"/>&#32;<a href="'+this.url+'" style="font-weight:normal;" style="color:#339900;">Full List of Blogs ('+this.length+' links) &raquo;</a></div>' ) ;
			output += '<img src="http://media.washingtonpost.com/wp-srv/images/spacer.gif" width="100" height="12"/><br/>' ;
			output += '<div>Most Blogged About Articles</div>' ;
			output += ( '<style>#technorati_link a {color:#339900;}</style><div id="technorati_link"><img src="http://media.washingtonpost.com/wp-srv/technorati/icn-talkbubble.gif" border="0"/>&#32;' ) ;
			output += ( '<a href="http://www.washingtonpost.com/wp-srv/technorati/RoundUp.html" style="font-weight:normal;" style="color:#339900;">On washingtonpost.com</a>' ) ;
			output += ( '&nbsp;|&nbsp;' ) ;
			output += ( '<a href="http://www.washingtonpost.com/wp-srv/technorati/NewsTalk.html" style="font-weight:normal;" style="color:#339900;">On the web</a>' ) ;
			output += ( '</div>' ) ;
			output += '<img src="http://media.washingtonpost.com/wp-srv/images/spacer.gif" width="100" height="12"/><br/>' ;
			output += '<a href="http://www.technorati.com/"><img src="http://media.washingtonpost.com/wp-srv/technorati/pwdByTech82x18a.gif" border="0" width="82" height="18"/></a>' ;
			output += '</div></div></div>' ;
		}
		return output ;
	}
	
	

	function _set_property(property,value) {
		eval("this."+property+"=value");
	}

	function _get_property(property) {
		return eval("this."+property);
	}
}

function item (headline,url,blurb,byline) {
	this.headline = headline ;
	this.url = url ;
	this.blurb = blurb ;
	this.byline = byline ;
	
	this.getProperty = _get_property ;
	this.setProperty = _set_property ;

	function _set_property(property,value) {
		eval("this."+property+"=value");
	}

	function _get_property(property) {
		return eval("this."+property);
	}

}

function getTechnoratiSearchBox() {
	var output = '' ;
	output += '<div style="float:right;width:228px;padding-left:10px;"><div class="sidebarhack"><b></b></div> <div class="sidebar"> <h2>Search Technorati</h2> <div class="sidebarcontent"><div class="sidebarbox"><form action="http://www.technorati.com/search.php" method="post"><label for="kw-search"><strong>Search 20.1 million blogs for the latest on:</label></strong><br/><input type="text" id="kw-search" name="s" /><input type="image" src="http://media.washingtonpost.com/wp-srv/images/goButton_white.gif" alt="Search" class="img" value="Search" /></form><br/><a href="http://www.technorati.com"><img src="http://media.washingtonpost.com/wp-srv/technorati/pwdByTech126x13r.gif" border="0" width="126" height="13" style="display:inline;"/></a></div></div></div></div>' ;
	return output ;
}

