// set the height of the containing div so Firefox will place the background correctly
function bodyHeight() {
	var containerTable = document.getElementById("containerTable");
	var theHeight;
	if ( containerTable.currentStyle ) {
		theHeight = containerTable.offsetHeight;
	} else {
		theHeight = document.defaultView.getComputedStyle(containerTable,'').height;
		theHeight = theHeight.substring(0, theHeight.indexOf("px"));
	}
	
	var container = document.getElementById("container");

	if ( container.currentStyle ) {
		container.height = theHeight + "px";
	} else {
		container.style.height = theHeight + "px";
	}
	
}

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_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_swapImgRestore2() { //v3.0
  var i,x,a=document.MM_sr2; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

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_swapImage2() { //v3.0
  var i,j=0,x,a=MM_swapImage2.arguments; document.MM_sr2=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr2[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_showHideLayers2() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers2.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'block':(v=='hide')?'none':v; }
    obj.display=v; }
}


var preloads = new Array (
		'/images/layout/nav/star.gif',
		'/images/layout/nav/star_left.gif',
		'/images/layout/nav/star_right.gif',
		'/images/layout/nav/about_contact-over.gif',
		'/images/layout/nav/about_mission-over.gif',
		'/images/layout/nav/about_organization-over.gif',
		'/images/layout/nav/about-over.gif',
		'/images/layout/nav/news_email_updates-over.gif',
		'/images/layout/nav/news_event_calendar-over.gif',
		'/images/layout/nav/news_newsletter-over.gif',
		'/images/layout/nav/news-over.gif',
		'/images/layout/nav/news_press_room-over.gif',
		'/images/layout/nav/overview_historic_timeline-over.gif',
		'/images/layout/nav/overview_introduction-over.gif',
		'/images/layout/nav/overview_key_themes-over.gif',
		'/images/layout/nav/overview_online_tour-over.gif',
		'/images/layout/nav/overview-over.gif',
		'/images/layout/nav/preservation_archaeology-over.gif',
		'/images/layout/nav/preservation_community-over.gif',
		'/images/layout/nav/preservation_grounds-over.gif',
		'/images/layout/nav/preservation_main_house-over.gif',
		'/images/layout/nav/preservation-over.gif',
		'/images/layout/nav/preservation_overview-over.gif',
		'/images/layout/nav/preservation_river-over.gif',
		'/images/layout/nav/shop_online_store-over.gif',
		'/images/layout/nav/shop-over.gif',
		'/images/layout/nav/research_architecture-over.gif',
		'/images/layout/nav/research_collections-over.gif',
		'/images/layout/nav/research_history-over.gif',
		'/images/layout/nav/research_landscape-over.gif',
		'/images/layout/nav/research-over.gif',
		'/images/layout/nav/research_people-over.gif',
		'/images/layout/nav/support_become_member-over.gif',
		'/images/layout/nav/support_corporate_partners-over.gif',
		'/images/layout/nav/support_donate_project-over.gif',
		'/images/layout/nav/support-over.gif',
		'/images/layout/nav/support_overview-over.gif',
		'/images/layout/nav/support_planned_giving-over.gif',
		'/images/layout/nav/support_renew_membership-over.gif',
		'/images/layout/nav/support_sponsor_event-over.gif',
		'/images/layout/nav/visit_adult_group-over.gif',
		'/images/layout/nav/visit_buy_tickets-over.gif',
		'/images/layout/nav/visit-over.gif',
		'/images/layout/nav/visit_visitor_info-over.gif',
		'/images/layout/nav/visit_private_events-over.gif',
		'/images/layout/nav/visit_school_programs-over.gif',
		'/images/layout/nav/visit_event_calendar-over.gif'
);

function addPreload() {
	var a = addPreload.arguments;
	for (var i = 0; i < a.length; i++) {
		preloads.push(a[i]);
	}
}

	
function preload() {
	for (var i = 0; i < preloads.length; i++) {
		MM_preloadImages(preloads[i]);	
	}
}



