var featuresSwitchSelectedArea, featuresSwitchSelectedCaptionId;

function addFeaturesSwitchEvents_2() {
	featureSwitch1 = new Image(); 
	featureSwitch1.src = "images/features-switch-2-1.gif";
	featureSwitch2 = new Image(); 
	featureSwitch2.src = "images/features-switch-2-2.gif";
	featureSwitch3 = new Image(); 
	featureSwitch3.src = "images/features-switch-2-3.gif";
	
	featuresSwitchSelectedArea = document.getElementById("features_switch_main_2").getAttribute("src");
	featuresSwitchSelectedCaptionId = document.getElementById("features_mfb");
	featuresSwitchSelectedCaptionId.style.display = "block";
	
	featuresSwitchArea1 = document.getElementById("features_switch_main_2_1");
	addListener(featuresSwitchArea1, "mouseover", onMouseOverFeaturesSwitch_2, false);
	addListener(featuresSwitchArea1, "mouseout", onMouseOutFeaturesSwitch_2, false);
	addListener(featuresSwitchArea1, "click", onClickFeaturesSwitch_2, false);
	
	featuresSwitchArea2 = document.getElementById("features_switch_main_2_2");
	addListener(featuresSwitchArea2, "mouseover", onMouseOverFeaturesSwitch_2, false);
	addListener(featuresSwitchArea2, "mouseout", onMouseOutFeaturesSwitch_2, false);
	addListener(featuresSwitchArea2, "click", onClickFeaturesSwitch_2, false);
	
	featuresSwitchArea3 = document.getElementById("features_switch_main_2_3");
	addListener(featuresSwitchArea3, "mouseover", onMouseOverFeaturesSwitch_2, false);
	addListener(featuresSwitchArea3, "mouseout", onMouseOutFeaturesSwitch_2, false);
	addListener(featuresSwitchArea3, "click", onClickFeaturesSwitch_2, false);
}

function onMouseOverFeaturesSwitch_2(e) {
	if (!e) var e = window.event
	featuresSwitchImage = document.getElementById("features_switch_main_2");
	
	eventSource = getEventTarget(e);
	eventSourceId = eventSource.getAttribute("id");
	
	if (eventSourceId == "features_switch_main_2_1") {
		featuresSwitchImageURL = "images/features-switch-2-1.gif";
	} else if (eventSourceId == "features_switch_main_2_2") {
		featuresSwitchImageURL = "images/features-switch-2-2.gif";
	} else if (eventSourceId == "features_switch_main_2_3") {
		featuresSwitchImageURL = "images/features-switch-2-3.gif";
	}
	
	featuresSwitchImage.setAttribute("src", featuresSwitchImageURL);
}

function onMouseOutFeaturesSwitch_2(e) {
	if (!e) var e = window.event
	featuresSwitchImage = document.getElementById("features_switch_main_2");
	featuresSwitchImage.setAttribute("src", featuresSwitchSelectedArea);
}

function onClickFeaturesSwitch_2(e) {
	if (!e) var e = window.event
	featuresSwitchSelectedArea = document.getElementById("features_switch_main_2").getAttribute("src");
	featuresSwitchSelectedCaptionId.style.display = "none";
	
	eventSource = getEventTarget(e);
	if (eventSource.getAttribute("id") == "features_switch_main_2_1") {
		featuresSwitchImageURL = "images/features-switch-2-1.gif";
		featuresSwitchSelectedCaptionId = document.getElementById("features_mfb");
	} else if (eventSource.getAttribute("id") == "features_switch_main_2_2") {
		featuresSwitchImageURL = "images/features-switch-2-2.gif";
		featuresSwitchSelectedCaptionId = document.getElementById("features_translucent");
	} else if (eventSource.getAttribute("id") == "features_switch_main_2_3") {
		featuresSwitchImageURL = "images/features-switch-2-3.gif";
		featuresSwitchSelectedCaptionId = document.getElementById("features_paint");
	}	

	featuresSwitchSelectedCaptionId.style.display = "block";
	featuresSwitchImage.setAttribute("src", featuresSwitchImageURL);
}