function preload(path){
	if (document.images) {
		var img = new Image();
		img.src = path;
		return img;
	}
}

/* masthead images 
var preloadflag = false;
 var home_off = preload("/FXC/images/masthead/nav/home_off.gif");
  var home_on = preload("/FXC/images/masthead/nav/home_on.gif");
 var ongoing_work_off = preload("/FXC/images/masthead/nav/ongoing_work_off.gif");
  var ongoing_work_on = preload("/FXC/images/masthead/nav/ongoing_work_on.gif");
 var volume_survey_off = preload("/FXC/images/masthead/nav/volume_survey_off.gif");
  var volume_survey_on = preload("/FXC/images/masthead/nav/volume_survey_on.gif");
 var annual_reports_off = preload("/FXC/images/masthead/nav/annual_reports_off.gif");
  var annual_reports_on = preload("/FXC/images/masthead/nav/annual_reports_on.gif");
 var members_off = preload("/FXC/images/masthead/nav/members_off.gif");
  var members_on = preload("/FXC/images/masthead/nav/members_on.gif");
 var news_off = preload("/FXC/images/masthead/nav/news_off.gif");
  var news_on = preload("/FXC/images/masthead/nav/news_on.gif");
var preloadflag = true;*/

function swap(img,dir){
	if (document.images && preloadflag){
		if (dir=="off"){
			document[img].src = eval(img+"_off.src");
		}
		else if (dir=="on"){
			document[img].src = eval(img+"_on.src");
		}
		else {alert("ack!")}
	}
}

function highlightnav(r,d){
var navid = document.getElementById(r);
navid.className = 'mastheadnav'+d;

}

function layerVis(id,dir,par) {
    if (document.layers) {
        v = (dir == "on") ? "show" : "hide";
        //document.layers[id].visibility = v;
    }
    else if (document.all) {
        v = (dir == "on") ? 'visible'	: 'hidden';
        document.all[id].style.visibility = v;
    }
    else if (document.getElementById) {
        v = (dir == "on") ? 'visible' : 'hidden';
        document.getElementById(id).style.visibility = v;
    }
	if(par!='false'){
	document.getElementById(id).style.left = document.getElementById(par).offsetLeft+5;
	}
}

function addbookmark()
{
bookmarkurl=document.location
bookmarktitle=document.title
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}

function sendpage(){
if(email = prompt("E-mail Address?","")){
window.location="mailto:"+email+"?subject="+document.title+"&body="+document.location;
}
}