var featuresSwitchSelectedArea, featuresSwitchSelectedCaptionId;

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

	featuresSwitchSelectedArea = document.getElementById("features_switch_main_1").getAttribute("src");
	featuresSwitchSelectedCaptionId = document.getElementById("features_volume_buttons");
	featuresSwitchSelectedCaptionId.style.display = "block";
	
	featuresSwitchArea1 = document.getElementById("features_switch_main_1_1");
	addListener(featuresSwitchArea1, "mouseover", onMouseOverFeaturesSwitch_1, false);
	addListener(featuresSwitchArea1, "mouseout", onMouseOutFeaturesSwitch_1, false);
	addListener(featuresSwitchArea1, "click", onClickFeaturesSwitch_1, false);
	
	featuresSwitchArea2 = document.getElementById("features_switch_main_1_2");
	addListener(featuresSwitchArea2, "mouseover", onMouseOverFeaturesSwitch_1, false);
	addListener(featuresSwitchArea2, "mouseout", onMouseOutFeaturesSwitch_1, false);
	addListener(featuresSwitchArea2, "click", onClickFeaturesSwitch_1, false);
	
	featuresSwitchArea3 = document.getElementById("features_switch_main_1_3");
	addListener(featuresSwitchArea3, "mouseover", onMouseOverFeaturesSwitch_1, false);
	addListener(featuresSwitchArea3, "mouseout", onMouseOutFeaturesSwitch_1, false);
	addListener(featuresSwitchArea3, "click", onClickFeaturesSwitch_1, false);
}

function onMouseOverFeaturesSwitch_1(e) {
	if (!e) var e = window.event
	featuresSwitchImage = document.getElementById("features_switch_main_1");
	
	eventSource = getEventTarget(e);
	eventSourceId = eventSource.getAttribute("id");
	
	if (eventSourceId == "features_switch_main_1_1") {
		featuresSwitchImageURL = "images/features-switch-1-1.gif";
	} else if (eventSourceId == "features_switch_main_1_2") {
		featuresSwitchImageURL = "images/features-switch-1-2.gif";
	} else if (eventSourceId == "features_switch_main_1_3") {
		featuresSwitchImageURL = "images/features-switch-1-3.gif";
	}
	
	featuresSwitchImage.setAttribute("src", featuresSwitchImageURL);
}

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

function onClickFeaturesSwitch_1(e) {
	if (!e) var e = window.event
	featuresSwitchSelectedArea = document.getElementById("features_switch_main_1").getAttribute("src");
	featuresSwitchSelectedCaptionId.style.display = "none";
	
	eventSource = getEventTarget(e);
	if (eventSource.getAttribute("id") == "features_switch_main_1_1") {
		featuresSwitchImageURL = "images/features-switch-1-1.gif";
		featuresSwitchSelectedCaptionId = document.getElementById("features_volume_buttons");
	} else if (eventSource.getAttribute("id") == "features_switch_main_1_2") {
		featuresSwitchImageURL = "images/features-switch-1-2.gif";
		featuresSwitchSelectedCaptionId = document.getElementById("features_lightweight");
	} else if (eventSource.getAttribute("id") == "features_switch_main_1_3") {
		featuresSwitchImageURL = "images/features-switch-1-3.gif";
		featuresSwitchSelectedCaptionId = document.getElementById("features_cushioned_speaker");
	}	

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