var featuresSwitchSelectedArea, featuresSwitchSelectedCaptionId;

function addFeaturesSwitchEvents_4() {
	featureSwitch1 = new Image(); 
	featureSwitch1.src = "images/features-switch-4-1.gif";
	featureSwitch2 = new Image(); 
	featureSwitch2.src = "images/features-switch-4-2.gif";
	featureSwitch3 = new Image(); 
	featureSwitch3.src = "images/features-switch-4-3.gif";

	featuresSwitchSelectedArea = document.getElementById("features_switch_main_4").getAttribute("src");
	featuresSwitchSelectedCaptionId = document.getElementById("features_switch_multiple");
	featuresSwitchSelectedCaptionId.style.display = "block";
	
	featuresSwitchArea1 = document.getElementById("features_switch_main_4_1");
	addListener(featuresSwitchArea1, "mouseover", onMouseOverFeaturesSwitch_4, false);
	addListener(featuresSwitchArea1, "mouseout", onMouseOutFeaturesSwitch_4, false);
	addListener(featuresSwitchArea1, "click", onClickFeaturesSwitch_4, false);
	
	featuresSwitchArea2 = document.getElementById("features_switch_main_4_2");
	addListener(featuresSwitchArea2, "mouseover", onMouseOverFeaturesSwitch_4, false);
	addListener(featuresSwitchArea2, "mouseout", onMouseOutFeaturesSwitch_4, false);
	addListener(featuresSwitchArea2, "click", onClickFeaturesSwitch_4, false);
	
	featuresSwitchArea3 = document.getElementById("features_switch_main_4_3");
	addListener(featuresSwitchArea3, "mouseover", onMouseOverFeaturesSwitch_4, false);
	addListener(featuresSwitchArea3, "mouseout", onMouseOutFeaturesSwitch_4, false);
	addListener(featuresSwitchArea3, "click", onClickFeaturesSwitch_4, false);
}

function onMouseOverFeaturesSwitch_4(e) {
	if (!e) var e = window.event
	featuresSwitchImage = document.getElementById("features_switch_main_4");
	
	eventSource = getEventTarget(e);
	eventSourceId = eventSource.getAttribute("id");
	
	if (eventSourceId == "features_switch_main_4_1") {
		featuresSwitchImageURL = "images/features-switch-4-1.gif";
	} else if (eventSourceId == "features_switch_main_4_2") {
		featuresSwitchImageURL = "images/features-switch-4-2.gif";
	} else if (eventSourceId == "features_switch_main_4_3") {
		featuresSwitchImageURL = "images/features-switch-4-3.gif";
	}
	
	featuresSwitchImage.setAttribute("src", featuresSwitchImageURL);
}

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

function onClickFeaturesSwitch_4(e) {
	if (!e) var e = window.event
	featuresSwitchSelectedArea = document.getElementById("features_switch_main_4").getAttribute("src");
	featuresSwitchSelectedCaptionId.style.display = "none";
	
	eventSource = getEventTarget(e);
	if (eventSource.getAttribute("id") == "features_switch_main_4_1") {
		featuresSwitchImageURL = "images/features-switch-4-1.gif";
		featuresSwitchSelectedCaptionId = document.getElementById("features_switch_multiple");
	} else if (eventSource.getAttribute("id") == "features_switch_main_4_2") {
		featuresSwitchImageURL = "images/features-switch-4-2.gif";
		featuresSwitchSelectedCaptionId = document.getElementById("features_chrome");
	} else if (eventSource.getAttribute("id") == "features_switch_main_4_3") {
		featuresSwitchImageURL = "images/features-switch-4-3.gif";
		featuresSwitchSelectedCaptionId = document.getElementById("features_connection");
	}	

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