if (document.images) {

// header images
	pressroom = new Image()
	pressroom.src = "images/head/pressroom.gif"
	pressroom_on = new Image()
	pressroom_on.src = "images/head/pressroom_on.gif"

	events = new Image()
	events.src = "images/head/events.gif"
	events_on = new Image()
	events_on.src = "images/head/events_on.gif"
	
// mainmenu images	
	about = new Image()
	about.src = "images/mainmenu/about.gif"
	about_on = new Image()
	about_on.src = "images/mainmenu/about_on.gif"

	war = new Image()
	war.src = "images/mainmenu/war.gif"
	war_on = new Image()
	war_on.src = "images/mainmenu/war_on.gif"
	
	gallery = new Image()
	gallery.src = "images/mainmenu/gallery.gif"
	gallery_on = new Image()
	gallery_on.src = "images/mainmenu/gallery_on.gif"
	
	edu_outreach = new Image()
	edu_outreach.src = "images/mainmenu/edu_outreach.gif"
	edu_outreach_on = new Image()
	edu_outreach_on.src = "images/mainmenu/edu_outreach_on.gif"
	
	visit = new Image()
	visit.src = "images/mainmenu/visit.gif"
	visit_on = new Image()
	visit_on.src = "images/mainmenu/visit_on.gif"

// footer images
	acknowledge = new Image()
	acknowledge.src = "images/foot/acknowledge.gif"
	acknowledge_on = new Image()
	acknowledge_on.src = "images/foot/acknowledge_on.gif"

	newsletter = new Image()
	newsletter.src = "images/foot/newsletter.gif"
	newsletter_on = new Image()
	newsletter_on.src = "images/foot/newsletter_on.gif"
	
	sendtofriend = new Image()
	sendtofriend.src = "images/foot/sendtofriend.gif"
	sendtofriend_on = new Image()
	sendtofriend_on.src = "images/foot/sendtofriend_on.gif"
	
	contact = new Image()
	contact.src = "images/foot/contact.gif"
	contact_on = new Image()
	contact_on.src = "images/foot/contact_on.gif"
	
	sitemap = new Image()
	sitemap.src = "images/foot/sitemap.gif"
	sitemap_on = new Image()
	sitemap_on.src = "images/foot/sitemap_on.gif"
}

function swap(imgName,imgSource) {
	if (document.images) {
		document.images[imgName].src = eval(imgSource + ".src")
	}
}

// preload images

function 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=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];}}
}
// put images to preload into a variable
var preload = ""

// search validate
function s_validate(formObject){
    if(formObject.elements['keywords'].value == '' || formObject.elements['keywords'].value == 'search' || formObject.elements['keywords'].value == 'SEARCH'){
        alert('Please enter a query before submtting.');
        return false;
    } else {return true;}
    }

//clear search
function clear_search(s) {
  if (s.defaultValue==s.value || s.value=='SEARCH') s.value = ""
}

// RANDOM HISTORICAL NOTES
function random_head(){
var images=new Array()

images[1]='<img src="images/rcol/historical_notes/note_01.gif" border="0" alt="Historical Notes: The Indians took settlers captive as a means to replace family members lost in conflicts and scare colonists from their land.  Captives were released as part of the Treaty of Easton, but some, like Mary Jemison, chose to stay with their new Indian families." title="Historical Notes: The Indians took settlers captive as a means to replace family members lost in conflicts and scare colonists from their land.  Captives were released as part of the Treaty of Easton, but some, like Mary Jemison, chose to stay with their new Indian families." usemap="#map" /><map name="Map" id="Map"><area shape="rect" coords="31,166,203,185" href="index_24.html" alt="Put it in perspective" title="Put it in perspective" /></map>'
images[2]='<img src="images/rcol/historical_notes/note_02.gif" border="0" alt="Historical Notes: General Braddock, mortally wounded in the Battle of Monongahela, was buried in the middle of a road in Southwestern Pennsylvania.  His soldiers then marched over the road so the French would not discover the whereabouts of his remains." title="Historical Notes: General Braddock, mortally wounded in the Battle of Monongahela, was buried in the middle of a road in Southwestern Pennsylvania.  His soldiers then marched over the road so the French would not discover the whereabouts of his remains." usemap="#map" /><map name="Map" id="Map"><area shape="rect" coords="32,166,206,187" href="index_24.html" alt="Put it in perspective" title="Put it in perspective" /></map>'
images[3]='<img src="images/rcol/historical_notes/note_03.gif" border="0" alt="Historical Notes: To reduce the number of Indian dissenters in Pontiac\'s War, General Amherst suggests germ warfare - giving smallpox-infected blankets to Indians at the siege on Fort Pitt." title="Historical Notes: To reduce the number of Indian dissenters in Pontiac\'s War, General Amherst suggests germ warfare - giving smallpox-infected blankets to Indians at the siege on Fort Pitt." usemap="#map" /><map name="Map" id="Map"><area shape="rect" coords="34,121,202,142" href="index_24.html" alt="Put it in perspective" title="Put it in perspective" /></map>'
images[4]='<img src="images/rcol/historical_notes/note_07.gif" border="0" alt="Historical Notes: George Washington was the only representative to arrive in uniform at the Second Continental Congress - signaling that he was ready to fight for the revolution." title="Historical Notes: George Washington was the only representative to arrive in uniform at the Second Continental Congress - signaling that he was ready to fight for the revolution." usemap="#map" /><map name="Map" id="Map"><area shape="rect" coords="30,117,204,144" href="index_24.html" alt="Put it in perspective" title="Put it in perspective" /></map>'
images[5]='<img src="images/rcol/historical_notes/note_06.gif" border="0" alt="Historical Notes: Louis Coulon de Villiers, the French captain who led the attack on Fort Neccessity, also had a personal motive.  He was the brother of Ensign Jumonville, who\'s killing helped spark the French and Indian War." title="Historical Notes: Louis Coulon de Villiers, the French captain who led the attack on Fort Neccessity, also had a personal motive.  He was the brother of Ensign Jumonville, who\'s killing helped spark the French and Indian War." usemap="#map" /><map name="Map" id="Map"><area shape="rect" coords="33,144,202,172" href="index_24.html" alt="Put it in perspective" title="Put it in perspective" /></map>'
images[6]='<img src="images/rcol/historical_notes/note_05.gif" border="0" alt="Historical Notes: Upon capturing Fort Beausejour, the British expelled French Acadians from Nova Scotia.  Many of them fled to Louisiana, and their descendants are known as the Cajuns." title="Historical Notes: Upon capturing Fort Beausejour, the British expelled French Acadians from Nova Scotia.  Many of them fled to Louisiana, and their descendants are known as the Cajuns." usemap="#map" /><map name="Map" id="Map"><area shape="rect" coords="32,136,213,164" href="index_24.html" alt="Put it in perspective" title="Put it in perspective" /></map>'
images[7]='<img src="images/rcol/historical_notes/note_08.gif" border="0" alt="Historical Notes: En route to capturing Fort Duquesne, General Forbes builds a line of forts from Philadelphia to present-day Pittsburgh - the start of what would one day become the Pennsylvania Turnpike." title="Historical Notes: En route to capturing Fort Duquesne, General Forbes builds a line of forts from Philadelphia to present-day Pittsburgh - the start of what would one day become the Pennsylvania Turnpike." usemap="#map" /><map name="Map" id="Map"><area shape="rect" coords="30,130,204,157" href="index_24.html" alt="Put it in perspective" title="Put it in perspective" /></map>'
images[8]='<img src="images/rcol/historical_notes/note_04.gif" border="0" alt="Historical Notes: Camp followers - women, children, servants and slaves - were integral to both the French and British militaries.  They traveled with the soldiers to cook, do laundry, sew, and serve in hospitals, putting themselves in harm\'s way." title="Historical Notes: Camp followers - women, children, servants and slaves - were integral to both the French and British militaries.  They traveled with the soldiers to cook, do laundry, sew, and serve in hospitals, putting themselves in harm\'s way." usemap="#map" /><map name="Map" id="Map"><area shape="rect" coords="32,147,207,170" href="index_24.html" alt="Put it in perspective" title="Put it in perspective" /></map>'

var foo=Math.floor(Math.random()*images.length)
if (foo==0)
foo=1

document.write(images[foo])
}


// sitemap
function hide_collapse(parent_elemt){

	var item = document.getElementById(parent_elemt);
	if (item.style.display == 'none'){
		item.style.display = 'block';
	}else{
		item.style.display = 'none';
	}
}

function expand_it(){

	var lists = document.getElementsByTagName('UL');
	for (var i = 0; i < lists.length; i++) {
		if (lists[i].style.display == 'none'){
			lists[i].style.display = 'block';
		}
	}

}
function collapse_it(){

	var lists = document.getElementsByTagName('UL');
	for (var i = 0; i < lists.length; i++) {
		if (lists[i].style.display == 'block'){
			lists[i].style.display = 'none';
		}
	}

}

//popup
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

// timeline popup
function timeline_popup() {
	PageURL="timeline.html";
	WindowName="timeline";
	settings=
	"toolbar=no,location=no,directories=no,"+
	"status=no,menubar=no,scrollbars=no,"+
	"resizable=no,width=723,height=363";
	window.open(PageURL,WindowName,settings); 
}
