// STARWARS.COM HEADLINES
//    Code and content copyright (c) 2001-2006 Lucasfilm, Ltd. All rights reserved.

// CREATE NEW HEADLINE RECORD
function hline ( h_title, h_url, h_post_date, h_category )
{
   this.h_title = h_title
   this.h_url = h_url
   this.h_post_date = h_post_date
   this.h_category = h_category
}

// MAKE ARRAY OF HEADLINES
headlines = new Array(
   new hline( "Video: George Lucas DreamForce Interview: Part 2", "http://www.starwars.com/hyperspace/tease.html?tPage=/hyperspace/member/video/gldf2.html&hljs", "2007-11-20", "Hyperspace" ),
   new hline( "News: Koto Bounty Hunters Launches with Boba Fett", "http://www.starwars.com/collecting/news/koto/news20071120.html#hljs", "2007-11-20", "Collecting" ),
   new hline( "Photo Captions: It's a Troop!", "http://www.starwars.com/community/fun/caption/2007/11/caption20071120.html#hljs", "2007-11-20", "Community" ),
   new hline( "Video: THX <i>Amazing Life</i> Trailer", "http://www.starwars.com/hyperspace/tease.html?tPage=/hyperspace/member/video/thx_al.html&hljs", "2007-11-19", "Hyperspace" ),
   new hline( "Video: George Lucas DreamForce Interview: Part 1", "http://www.starwars.com/hyperspace/tease.html?tPage=/hyperspace/member/video/gldf1.html&hljs", "2007-11-19", "Hyperspace" ),
   new hline( "News: <i>Young Indy</i> on DVD: A Tour of Volume 2, Disc 2", "http://www.starwars.com/community/news/films/news20071119.html#hljs", "2007-11-19", "Community" ),
   new hline( "News: Visual Guide -- Chapter 8: Droids for Sale", "http://www.starwars.com/episode-iv/explore/visualguides/chp08.html#hljs", "2007-11-19", "Episode IV" ),
   new hline( "News: Alderaan Destroyed by Imperial Terror Weapon", "http://www.starwars.com/hyperspace/tease.html?tPage=/hyperspace/member/sourcearchive/news20071119.html&hljs", "2007-11-19", "Hyperspace" ),
   new hline( "Video: Video Profile: Dave", "http://www.starwars.com/theclonewars/video/dave.html#hljs", "2007-11-16", "The Clone Wars" ),
   new hline( "News: Biggest StarWarsShop Sale EVER Nov. 23", "http://www.starwars.com/collecting/shop/shopnews/news20071116.html#hljs", "2007-11-16", "Collecting" ),
   new hline( "News: Wanted by Cracken: Nakaron", "http://www.starwars.com/hyperspace/tease.html?tPage=/hyperspace/member/sourcearchive/news20071116.html&hljs", "2007-11-16", "Hyperspace" ),
   new hline( "Feature: Checklist: 10 Awesome Marvel Comics Covers", "http://www.starwars.com/eu/lit/comics/f20071115/index.html#hljs", "2007-11-15", "Expanded Universe" ),
   new hline( "Feature: <i>Bantha Tracks</i> Halloween Wrap", "http://www.starwars.com/hyperspace/banthaonline/&hljs", "2007-11-15", "Hyperspace" ),
   new hline( "News: <i>Star Wars</i> Among Holiday's Most Sought-After Gifts", "http://www.starwars.com/collecting/news/misc/news20071115.html#hljs", "2007-11-15", "Collecting" ),
   new hline( "News: Chandrila Faces Uncertain Future", "http://www.starwars.com/hyperspace/tease.html?tPage=/hyperspace/member/sourcearchive/news20071115.html&hljs", "2007-11-15", "Hyperspace" ),null
);

// WRITE HEADER
if ( typeof swcom_header == 'undefined' || swcom_header ) {
	document.write( '<b><i>Star Wars</i> Today</b><br>' );
	document.write( '<small>the latest from <a href="http://www.starwars.com/swtoday" target="_blank">' );
	if ( typeof swcom_linkcolor != 'undefined' )
		 { document.write( '<font color="' + swcom_linkcolor + '">starwars.com</font>' ); }
	else { document.write( 'starwars.com' ); }
	document.write( '</a><p></small>' );
}

// SET NUMBER OF LINKS
if ( typeof swcom_numheadlines == 'undefined' )
	{ swcom_numheadlines = 4; }

// LOOP THROUGH WRITING HEADLINES
for ( var $i = 0; $i < headlines.length - 1 && $i < swcom_numheadlines; $i++ ) {
	if ( typeof swcom_bullet == 'undefined' || swcom_bullet )
    	{ document.write( '&#149;&nbsp;' ); }
    document.write( '<a href="' + headlines[$i].h_url + '" target="_blank">' );
	if ( typeof swcom_linkcolor != 'undefined' )
    	{ document.write( '<font color="' + swcom_linkcolor + '">' ); }
    document.write( headlines[$i].h_title );
    if ( typeof swcom_linkcolor != 'undefined' )
    	{ document.write( '</font>' ); }
    document.writeln( "</a><br>" );

	if ( typeof swcom_date != 'undefined' && swcom_date ) {
		document.writeln( '&nbsp;&nbsp;&nbsp;<small>'
			+ headlines[$i].h_post_date
			+ ' (' + headlines[$i].h_category
			+ ')</small><br>' );
	}
}

// COPYRIGHT NOTICE
document.write('<small><p>&copy; <script>var curDate=new Date(); document.write(curDate.getFullYear())</script> Lucasfilm Ltd.</small>');