
function clearFeature() {
	clearHover();
	$("feature").className = "default";
	$("list_coverage").style.display = "none";
	$("list_member").style.display = "none";
	$("list_employer").style.display = "none";	
	$("list_agent").style.display = "none";
	$("list_provider").style.display = "none";
}

function clearHover() {
	$("coverage").className = "";
	$("member").className = "";
	$("employer").className = "";	
	$("agent").className = "";
	$("provider").className = "";
}

addLoadEvent(function() {
	clearFeature();
	
	/* Enabling and clearing the "Search MiBCN.com" text in the primary search box.
	 */
	$("search").onfocus = function() {
		if (this.value == "Search MiBCN.com")
			this.value = "";
	}
	$("search").onblur = function() {
		if (this.value == "")
			this.value = "Search MiBCN.com";
	}
	
	/* Preloading the background images for a smoother transition.
	 */
	var bgImgs = new Array(
			"../images/fbg_coverage.jpg",
			"../images/fbg_member.jpg",
			"../images/fbg_employer.jpg",
			"../images/fbg_agent.jpg",
			"../images/fbg_provider.jpg"
		);
			
	for (i=0; i < 5; i++) {
		var img = new Image();
		img.src = bgImgs[i];
	}

	/* "I am ..." hovers.
	 */
	feature_bullets = $("feature_menu").getElementsByTagName("a");
	nfb = feature_bullets.length;
	
	for (i = 0; i < nfb; i++) {
		feature_bullets[i].onmouseover = function() {
			clearFeature();
			$("feature").className = this.id;
			$("list_" + this.id).style.display = "block";
			this.className = "hover";
		}
		feature_bullets[i].onmouseout = clearFeature;	
	}
});
