var nasaLOTitles = new Array("The Human Advantage","Rex Walheim--Space Station Construction Worker","Spending The Summer In Space","Leland Melvin--Playing For NASA's Team","Inspiring The Next Generation...");
var nasaLOURL = new Array("http://liftoff.msfc.nasa.gov/news/2003/news-human.asp","http://liftoff.msfc.nasa.gov/news/2003/news-Walheim.asp","http://liftoff.msfc.nasa.gov/news/2003/news-summer.asp","http://liftoff.msfc.nasa.gov/news/2003/news-Melvin.asp","http://liftoff.msfc.nasa.gov/news/2003/news-edspace.asp");
var nasaLODates = new Array("Sep 23","Sep 16","Sep 9","Sep 2","Aug 26");
var nasaLOIntro = new Array("Robots and computers play an important part in today's space program, but there are some things they just can't do.  Learn more about the benefits of having human hands and minds involved","On his first spaceflight, Rex Walheim participated in the construction of the International Space Station during two space walks.  Learn more about his exciting experience","While most people were catching rays and playing baseball all summer, an astronaut and a cosmonaut were having a very different summer.  The Expedition 7 Crew spent their summer in space","Leland Melvin, a former pro football player, is now a member of a very different team","Among NASA's next class of astronauts will be a special group of educator astronauts.  These former teachers will have the job of inspiring today's youth");
var nasaScienceTitles = new Array("Sunset Planet Alert","An Avalanche of Dark Asteroids","Equinox Sky Show","The Multiplying Mystery of Moonwater","Solar 'Current of Fire' Speeds Up");
var nasaScienceURL = new Array("http://science.nasa.gov/headlines/y2010/31mar_sunsetplanets.htm","http://science.nasa.gov/headlines/y2010/26mar_darkasteroids.htm","http://science.nasa.gov/headlines/y2010/19mar_equinox.htm","http://science.nasa.gov/headlines/y2010/18mar_moonwater.htm","http://science.nasa.gov/headlines/y2010/12mar_conveyorbelt.htm");
var nasaScienceDates = new Array("Mar 31","Mar 26","Mar 19","Mar 18","Mar 12");
var nasaScienceIntro = new Array("The solar system's innermost planets are about to put on a beautiful show.  Keep an eye on the sunset this weekend for a bright conjunction of Venus and Mercury.","Every day, a NASA infrared space telescope named \"WISE\" is discovering dozens of previously unknown asteroids.  The observatory is making a remarkable contribution to the census of dark space rocks that could potentially threaten Earth.","Grab your binoculars. The crescent Moon and the Pleiades star cluster are gathering for a close encounter on the first night of Spring. It's the best Moon-Pleiades meeting over the United States until the year 2023.","Researchers who once confidently stated that the Moon was bone-dry are now thinking the unthinkable:  The Moon has so much water, there's actually a \"lunar hydrosphere.\"  International spacecraft have recently discovered no fewer than three \"flavors\" of moonwater and no one knows when the discoveries will end. ","A massive \"current of fire\" on the sun has started running at high speed, surprising researchers and challenging some models of the solar cycle.");
var nasaCalTitles = new Array("16th ESA Symposium on European Rocket and Balloon Programmes and Related Research, St. Gallen, Switzerland.","RHESSI Workshop: Distribution Functions of Energetic Flare Particles, Glasgow, Scotland","The Lowell Star Party, Flagstaff, Arizona");
var nasaCalURL = new Array("http://www.spaceflight.esa.int/users/file.cfm?filename=coord-symp-pac","http://www.astro.gla.ac.uk/users/eduard/rhessi/workshop/","http://www.lowell.edu/Public/lsp/");
var nasaCalDate ="Jun 5";
function nasaShowHeadline(site, start, count) {
	var titles = null;
	var dates = null;
	var urls = null;

	if (site == "Science") {
		titles = nasaScienceTitles;
		urls = nasaScienceURL;
		intros = nasaScienceIntro;
		dates = nasaScienceDates;
		document.writeln("<b><a href=\"http://science.nasa.gov/\">Science @ NASA</a></b><br>");
	} else if (site == "Liftoff") {
		titles = nasaLOTitles;
		urls = nasaLOURL;
		intros = nasaLOIntro;
		dates = nasaLODates;
		document.writeln("<b><a href=\"http://liftoff.msfc.nasa.gov/\">LIFTOFF News</a></b><br>");
	}

	for (i = start-1; i < count && i <  titles.length; i++) {
            document.writeln(dates[i] + ": " + "<a href=\"" + urls[i] + "\">" + titles[i] + "</A><br>");
	}
}

function nasaShowLeadIn(site, start, count) {
	var titles = null;
	var dates = null;
	var urls = null;
	var intros = null;

	if (site == "Science") {
		titles = nasaScienceTitles;
		urls = nasaScienceURL;
		intros = nasaScienceIntro;
		dates = nasaScienceDates;
		document.writeln("<b><a href=\"http://science.nasa.gov/\">Science @ NASA</a></b><br>");
	} else if (site == "Liftoff") {
		titles = nasaLOTitles;
		urls = nasaLOURL;
		intros = nasaLOIntro;
		dates = nasaLODates;
		document.writeln("<b><a href=\"http://liftoff.msfc.nasa.gov/\">LIFTOFF News</a></b><br>");
	}

	for (i = start-1; i < count && i <  titles.length; i++) {
		document.writeln(dates[i] + ": <A HREF=\"" + urls[i] + "\"><b>" + titles[i] + "</b></A><BR>" + intros[i] + "<P>");
	}
}

function nasaShowCal() {
	document.writeln("<a href=\"http://liftoff.msfc.nasa.gov/\"><b>Space Calendar - " + nasaCalDate + "</b></a><br>");
	for (i = 0; i < nasaCalTitles.length; i++) {
		document.writeln("* <A HREF=\"" + nasaCalURL[i] + "\">" + nasaCalTitles[i] + "</A><BR>");
	}
}

	function MM_swapImgRestore() { //v3.0
	  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
	}
	function MM_preloadImages() { //v3.0
	  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
		var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
		if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
	}
	function MM_findObj(n, d) { //v4.01
	  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
		d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
	  if(!x && d.getElementById) x=d.getElementById(n); return x;
	}
	function MM_swapImage() { //v3.0
	  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
	   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
	}

	function Spanish_Link_fix() { //v3.0

		document.getElementById('espanol').href="http://Ciencia.nasa.gov" + location.pathname + location.search;
	}



