// 		/thewar/includes/getheader.js
function getElem(divid) {
	var elem;
	if( document.getElementById ) // this is the way the standards work
		elem = document.getElementById( divid );
	else if( document.all ) // this is the way old msie versions work
		elem = document.all[divid];
	else if( document.layers ) // this is the way nn4 works
		elem = document.layers[divid];
	return elem;
}

function getheader() {
	var div_text="factoid";
	var div_image="kywarheader";
	var elem_text=getElem(div_text);
	var elem_image=getElem(div_image);

	elem_text.innerHTML = "";
	elem_image.style.background = "none";

	var num_text=19;
	var text=new Array(num_text);
	text[0]="Louisville&#8217;s Ford Motor Company factory built more than 100,000 Jeeps for the war effort.";
	text[1]="Fleming Countian Franklin Sousley helped raise the American flag on Iwo Jima. He is second from the left in Joe Rosenthal&#8217;s famous photo.";
	text[2]="More than 300,000 Kentuckians served in World War II, and more than 7,900 died.";
	text[3]="After the Allies captured Rome, Frankfort native Edgar Erskine Hume served as the city&#8217;s military governor.";
	text[4]="Glasgow native Willa Brown Chappell was the first African-American woman licensed to fly in the U.S. and was instrumental in the formation of the Tuskegee Airmen, training some of them at a pilot school she co-founded.";
	text[5]="Rose Will Monroe, a Pulaski County native who helped build military airplanes at a factory in Michigan, became the real-life model for Rosie the Riveter after actor Walter Pidgeon met her there.";
	text[6]="Harrodsburg was featured in a July 6, 1942 photo essay in <em>Life</em> magazine as its residents waited for word on 66 local men whose tank battalion had been sent to the Philippines.";
	text[7]="Fort Campbell was built in 1942 as a training site for armored divisions. Spread over four counties in two states, it was originally designated Camp Campbell, TN but then was assigned a Kentucky postal address.";
	text[8]="The U.S. Armored Force was created at Fort Knox in 1940 to develop tactics for defeating Germany&#8217;s devastating panzer divisions. Established in 1918, the fort grew to more than 100,000 acres during WWII.";
	text[9]="Because Axis advances had cut off most sources of natural rubber, synthetic substitutes were critical to the war effort. For a time during WWII, Louisville was the world&#8217;s leading supplier.";
	text[10]="Robert H. Brooks, a black man from Sadieville, was killed in the Philippines on December 8, 1941, making him the first American casualty after the U.S. officially entered the war.";
	text[11]="Pacific fleet commander Husband Kimmel was from Henderson.";
	text[12]="Eastern Kentucky lost proportionately more men than any other region of the state, with more than 1,400 deaths (18.5% of the state total) recorded from just 10 mountain counties.";
	text[13]="During WWII, the Louisville Slugger factory turned out tank pins, carbine stocks, and billy clubs ... but still made baseball bats for shipment to the troops.";
	text[14]="Originals of the Magna Carta, the Gutenberg Bible, the Declaration of Independence, the U.S. Constitution, and the Gettysburg Address were among the documents shipped to the gold depository at Fort Knox for safekeeping during the war.";
	text[15]="Eight Kentuckians received the Congressional Medal of Honor for their service in World War II.";
	text[16]="Navy Cmdr. D.W. &#8220;Mush&#8221; Morton, who grew up in Hopkins County, commanded the submarine <em>Wahoo,</em> credited with sinking almost 32,000 tons of Japanese shipping in the Pacific.";
	text[17]="1945 was the only year the Kentucky Derby was held in June. Faced with a federal ban on racing, promoter Matt Winn took nominations as usual and then waited until after V-E Day to hold the race.";
	text[18]="As a POW being held in Japan, John Sadler of Harrodsburg witnessed the atomic bombing of Nagasaki.";

	var one_to_one=1;	// number of linked images and texts.  They must be before this number (at top of array) to link

	var num_image=3;
	var image=new Array(num_image);
	image[0]="images/sub_bgtop01.jpg";
	image[1]="images/sub_bgtop02.jpg";
	image[2]="images/sub_bgtop03.jpg";

	var ran_text=Math.floor(Math.random()*num_text);
	//ran_text=0;
	if( ran_text < one_to_one)
		var ran_image=ran_text;
	else
		var ran_image=Math.floor(Math.random()*(num_image));
		// var ran_image=Math.floor(Math.random()*(num_image - one_to_one))+one_to_one;

	elem_text.innerHTML = text[ran_text];
	elem_image.style.background = "#ccc url(" + image[ran_image] + ") no-repeat top left";
}
//		End of /thewar/includes/getheader.js


//	Added by Mike Ginter
function openOut(earl,resyze,wydth,hyght) {
	outWin = window.open(earl,"sites","toolbar=0,location=0,directories=0,menubar=0,scrollbars=yes,status=0,resizable=" + 
	resyze + ",width=" + wydth + ",height=" + hyght)
	outWin.focus();
}



