// JavaScript Document

	
	var theimages2 = [ "./images/veges.png", 
						"./images/marijuana.gif",
						"./images/garvey_thumb.png",
						"./images/relax_thumb.png"
					];
						
	var thetext2 = [ "<strong>Eating Vegetables &quot;Cuts Blood Pressure&quot;</strong>", 
					"<strong>Kali-Cancer Findings Startle Scientists</strong> Scientists are surprise to learn that a study of more than 2,000 people found no increase in the risk of developing lung cancer for marijuana smokers.", 
					"<strong>&quot;The American Antecedents of Marcus Garvey&quot;</strong> How the early involvement of Caribbeans in the struggle for human rights in the U.S. helped pave the way to Garvey&rsquo;s rise",
					"<strong>Emotions Contagious</strong> Research shows that emotions--both upbeat ones like enthusiasm and joy, and negative ones like sadness, fear and anger--are contagious"			  
				  ];
				  
	var thelinks2 = [ "http://news.bbc.co.uk/2/hi/health/4595332.stm",
				  	 "http://www.sciam.com/article.cfm?chanID=sa011&articleID=0002491F-755F-1473-B55F83414B7F0000",
					 "http://www.nbufront.org/html/MastersMuseums/JHClarke/Contemporaries/MarcusGarveyAntecedents.html",
					 "http://www.washingtonpost.com/wp-dyn/content/article/2006/05/29/AR2006052900757.html"
					 ];
	var temp2;  
	var index2 = new Array( 3 );
	var counter2 = 0;
	index2[ counter2 ] = Math.floor( Math.random() * ( theimages2.length ) );
	//document.writeln( "<br />  counter = " + counter + " index[ counter ] = " + index[ counter ]);
	counter2 = 1;
	var k2 = 0;

	while( counter2 <= 2 )
	{
		
		temp2 = Math.floor( Math.random() * ( theimages2.length ) );
		
		if( linearSearch2( index2, temp2, counter2 ) == 1 )
		{
			index2[ counter2 ] = temp2;
			counter2++;
		}
	}
	
	function linearSearch2( theArray, key, counter )
	{
		for( var n = 0; n <= counter - 1; ++n )
			if( theArray[ n ] == key )
				return 0;
				
			return 1;
	}
	
	function initValues2()
	{
		var site = document.getElementById("img_link_id2");
		site.href = thelinks2[ index2[ 0 ] ];
		var sentence = document.getElementById( "news_text2" );
		sentence.innerHTML = thetext2[ index2[ 0 ] ];
		var pic = document.getElementById( "news_img2" );
		pic.src = theimages2[ index2[ 0 ] ];
		changePic2();
	}
	
	function changePic2()
	{	
		setInterval( "changePicNow2()", 10000 );
		return;
	}
	
	function changePicNow2()
	{
		k2 = (k2 + 1) % 3;
		var sentence = document.getElementById("news_text2");
		sentence.innerHTML = thetext2[ index2[ k2 ] ];
		var pic = document.getElementById("news_img2");
		pic.src = theimages2[ index2[ k2 ] ];
		var site = document.getElementById("img_link_id2");
		site.href = thelinks2[ index2[ k2 ] ];
		return;
	}
	
	function submitTheId2( the_id )
	{
		document.display_form2.this_id.value = the_id;
		document.display_form2.submit();
		return false;	
	}
			