<!-- CSS element hide/show function -->
function showElement(layer){
var myLayer = document.getElementById(layer);
if(myLayer.style.display=="block")
	myLayer.style.display="none";
else{	
	myLayer.style.display="block";
	myLayer.backgroundPosition="top";
	}
}

<!-- Image Swap Functions -->
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 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];}}
}


<!-- Regioni Info Swap Functions -->
function replace(section)
{
	var regionInfo = "";
	var counties = "";
	var image = "";
	var title = "";

	switch(section)
	{
		case "nwrc":
			photos = 5;
			title = "Northwest Region";
			counties = "Escambia, Santa Rosa, Okaloosa, Walton, Holmes, Washington, Bay, Jackson, Calhoun, Gulf";
			image = section + "_" + Math.ceil(Math.random()*photos) + ".jpg";
			visit = "<h3><a href=\"http://www.flpublicarchaeology.org/nwrc\">Visit this region </a></h3>";
			break;
			
		case "ncrc":
			photos = 3;
			title = "North Central Region";
			counties = "Gadsden, Liberty, Franklin, Leon, Wakulla, Jefferson, Madison, Taylor, Hamilton, Suwannee, Lafayette, Dixie, Columbia, Baker, Union";	
			image = section + "_" + Math.ceil(Math.random()*photos) + ".jpg";
			visit = "<h3><a href=\"http://www.flpublicarchaeology.org/ncrc\">Visit this region </a></h3>";
			break;
			
		case "nerc":
			photos = 4;
			title = "Northeast Region";
			counties = "Nassau, Duval, Clay, St. Johns, Putnam, Flagler, Volusia";
			image = section + "_" + Math.ceil(Math.random()*photos) + ".jpg";
			visit = "<h3><a href=\"http://www.flpublicarchaeology.org/nerc\">Visit this region </a></h3>";
			break;
			
		case "crc":
			photos = 10;
			title = "Central Region";
			counties = "Gilchrist, Levy, Bradford, Alachua, Marion, Citrus, Hernando, Sumter, Lake";
			image = section + "_" + Math.ceil(Math.random()*photos) + ".jpg";
			visit = "<h3><a href=\"http://www.flpublicarchaeology.org/crc\">Visit this region </a></h3>";
			break;
			
		case "wcrc":
			photos = 6;
			title = "West Central Region";
			counties = "Pasco, Pinellas, Hillsborough, Polk, Manatee, Sarasota, Hardee, Desoto, Highlands";
			image = section + "_" + Math.ceil(Math.random()*photos) + ".jpg";
			visit = "<h3><a href=\"http://www.flpublicarchaeology.org/wcrc\">Visit this region </a></h3>";
			break;
			
		case "ecrc":
			photos = 1;
			title = "East Central Region";
			counties = "Seminole, Orange, Osceola, Brevard, Indian River, Okeechobee, St. Lucie, Martin";
			image = section + "_" + Math.ceil(Math.random()*photos) + ".jpg";
			visit = "<h3><a href=\"http://www.flpublicarchaeology.org/ecrc\">Visit this region </a></h3>";
			break;
			
		case "swrc":
			photos = 10;
			title = "Southwest Region";
			counties = "Charlotte, Glades, Lee, Hendry, Collier";
			image = section + "_" + Math.ceil(Math.random()*photos) + ".jpg";
			visit = "<h3><a href=\"http://www.flpublicarchaeology.org/swrc\">Visit this region </a></h3>";
			break;
			
		case "serc":
			photos = 1;
			title = "Southeast Region";
			counties = "Palm Beach, Broward, Miami Dade, Monroe";
			image = section + "_" + Math.ceil(Math.random()*photos) + ".jpg";
			visit = "<h3><a href=\"http://www.flpublicarchaeology.org/serc\">Visit this region </a></h3>";
			break;
			
		default:
			title = "Invalid Regional Code";
			counties = "Not a list.";
			image = "";
			break;
	}
		
	// change content
	regionInfo = "<h2 style=\"padding: 0;\">" + title + "</h2>\n\n";
	regionInfo += "<p style=\"font-size: 80%; margin: 0 0 5px 0; padding: 0;\">" + counties + "</p>\n";
	//content += "<p style=\"font-size: 80%; margin: 0 0 5px 0; padding: 0;\">" + visit + "</p>\n";
	//content += "<p><image src=\"http://www.flpublicarchaeology.org/images/hovers/" + image + "\" /></p>\n";
	
	document.getElementById('regionInfo').innerHTML = regionInfo;
}
function reset()
{
	var content = "<p><em>\"...to promote and facilitate the conservation, study, and public understanding of Florida's archaeological heritage through regional centers.\"</em></p>\n";
	content += "<h2>Explore Florida's Archaeology</h2>\n";
	content += "<p>You can encounter archaeology in every region of Florida!  Click on one of the map regions ... find one of our regional public archaeology centers . . . learn about archaeological sites, museums, and events . . . see how you can volunteer to help us conserve, study, and spread the word about Florida's buried heritage!</p>\n";
	content += "<p>Our regional archaeologists are ready to answer your questions and help you encounter Florida archaeology.</p>\n";
	
	document.getElementById("content").innerHTML = content;
}
