sfHover = function() {
	var sfEls = document.getElementById("nav_fmt").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

/* this function preloads the navigation images */
if (document.images)
  
  { 
    topnav1on = new Image();
	topnav1on.src = "http://img.webmd.com/dtmcms/live/webmd/consumer_assets/site_images/cobrands/nav_webmdHome_on.gif";
	topnav1off = new Image();
	topnav1off.src = "http://img.webmd.com/dtmcms/live/webmd/consumer_assets/site_images/cobrands/nav_webmdHome.gif";
	
	topnav2on = new Image();
	topnav2on.src = "http://img.webmd.com/dtmcms/live/webmd/consumer_assets/site_images/cobrands/nav_health_on.gif";
	topnav2off = new Image();
	topnav2off.src = "http://img.webmd.com/dtmcms/live/webmd/consumer_assets/site_images/cobrands/nav_health.gif";
	
	topnav3on = new Image();
	topnav3on.src = "http://img.webmd.com/dtmcms/live/webmd/consumer_assets/site_images/cobrands/nav_drugs_treatments_on.gif";
	topnav3off = new Image();
	topnav3off.src = "http://img.webmd.com/dtmcms/live/webmd/consumer_assets/site_images/cobrands/nav_drugs_treatments.gif";
	
	topnav4on = new Image();
	topnav4on.src = "http://img.webmd.com/dtmcms/live/webmd/consumer_assets/site_images/cobrands/nav_health_news_on.gif";
	topnav4off = new Image();
	topnav4off.src = "http://img.webmd.com/dtmcms/live/webmd/consumer_assets/site_images/cobrands/nav_health_news.gif";
}

  
<!-- the next 2 functions are for the image rollovers -->
var selected = "x";

function imgAct(imgName) {
	if (document.images) {
		document[imgName].src = eval(imgName + "on.src");
	}
}
function imgInact(imgName) {
	if (document.images) {
         if (imgName != selected)
	{
		document[imgName].src = eval(imgName + "off.src");
		
	}
	}
}