var featuresSwitchSelectedArea, featuresSwitchSelectedCaptionId;

function addFeaturesSwitchEvents_3() {
	featureSwitch1 = new Image(); 
	featureSwitch1.src = "images/features-switch-3-1.gif";
	featureSwitch2 = new Image(); 
	featureSwitch2.src = "images/features-switch-3-2.gif";
	featureSwitch3 = new Image(); 
	featureSwitch3.src = "images/features-switch-3-3.gif";
	
	featuresSwitchSelectedArea = document.getElementById("features_switch_main_3").getAttribute("src");
	featuresSwitchSelectedCaptionId = document.getElementById("features_speech");
	featuresSwitchSelectedCaptionId.style.display = "block";
	
	featuresSwitchArea1 = document.getElementById("features_switch_main_3_1");
	addListener(featuresSwitchArea1, "mouseover", onMouseOverFeaturesSwitch_3, false);
	addListener(featuresSwitchArea1, "mouseout", onMouseOutFeaturesSwitch_3, false);
	addListener(featuresSwitchArea1, "click", onClickFeaturesSwitch_3, false);
	
	featuresSwitchArea2 = document.getElementById("features_switch_main_3_2");
	addListener(featuresSwitchArea2, "mouseover", onMouseOverFeaturesSwitch_3, false);
	addListener(featuresSwitchArea2, "mouseout", onMouseOutFeaturesSwitch_3, false);
	addListener(featuresSwitchArea2, "click", onClickFeaturesSwitch_3, false);
	
	featuresSwitchArea3 = document.getElementById("features_switch_main_3_3");
	addListener(featuresSwitchArea3, "mouseover", onMouseOverFeaturesSwitch_3, false);
	addListener(featuresSwitchArea3, "mouseout", onMouseOutFeaturesSwitch_3, false);
	addListener(featuresSwitchArea3, "click", onClickFeaturesSwitch_3, false);
}

function onMouseOverFeaturesSwitch_3(e) {
	if (!e) var e = window.event
	featuresSwitchImage = document.getElementById("features_switch_main_3");
	
	eventSource = getEventTarget(e);
	eventSourceId = eventSource.getAttribute("id");
	
	if (eventSourceId == "features_switch_main_3_1") {
		featuresSwitchImageURL = "images/features-switch-3-1.gif";
	} else if (eventSourceId == "features_switch_main_3_2") {
		featuresSwitchImageURL = "images/features-switch-3-2.gif";
	} else if (eventSourceId == "features_switch_main_3_3") {
		featuresSwitchImageURL = "images/features-switch-3-3.gif";
	}
	
	featuresSwitchImage.setAttribute("src", featuresSwitchImageURL);
}

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

function onClickFeaturesSwitch_3(e) {
	if (!e) var e = window.event
	featuresSwitchSelectedArea = document.getElementById("features_switch_main_3").getAttribute("src");
	featuresSwitchSelectedCaptionId.style.display = "none";
	
	eventSource = getEventTarget(e);
	if (eventSource.getAttribute("id") == "features_switch_main_3_1") {
		featuresSwitchImageURL = "images/features-switch-3-1.gif";
		featuresSwitchSelectedCaptionId = document.getElementById("features_speech");
	} else if (eventSource.getAttribute("id") == "features_switch_main_3_2") {
		featuresSwitchImageURL = "images/features-switch-3-2.gif";
		featuresSwitchSelectedCaptionId = document.getElementById("features_tie_clip");
	} else if (eventSource.getAttribute("id") == "features_switch_main_3_3") {
		featuresSwitchImageURL = "images/features-switch-3-3.gif";
		featuresSwitchSelectedCaptionId = document.getElementById("features_ear_hook");
	}	

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