function stopThrottle() {
    debug ("------------------- stopThrottle unset UI_IS_BUSY");
    ELOCKS.unset("UI_IS_BUSY");
    DISPATCHER.fire("STOP_SLIDER");
    clearActionSelected();
    stopScreenRollTimeout();
    stopAutoBrowseTimeout();
    ELOCKS.unset("SCREEN_ROLL_EXPIRED");
    $("stop").className = "selected tooltippable";
	$("traffic_light").value = "stop";
    $("pageLeftToggle").value = "false";
	$("pageRightToggle").value = "false";

	//updateHashSearchPosition();    // AW 06.16.2011: EMTWO-405 not sure if we need this anymore
}

function clearActionSelected() {
    if($("page_left")) $("page_left").className = "tooltippable";
	if($("manual_page_left")) $("manual_page_left").className = "tooltippable";
//	$("fast_left").className = "";
//	$("slow_left").className = "tooltippable";
	if($("stop")) $("stop").className = "tooltippable";
//	$("slow_right").className = "tooltippable";
//	$("fast_right").className = "";
	if($("manual_page_right")) $("manual_page_right").className = "tooltippable";
	if($("page_right")) $("page_right").className = "tooltippable";
}

function setThrottle() {
	$("stop").onclick = function () {

        DISPATCHER.fire("STOPALL");
        saveImagePosition();

        return false;
    };

	$("page_left").onclick = function () {

        DISPATCHER.fire("STOPALL");

        this.className = "selected tooltippable";
		$("pageLeftToggle").value = "true";

		//moveResultsOverA.autoBrowseCount = 0;
        startScreenRollTimeout();

        DISPATCHER.fire("PAGE_LEFT");
        return false;
	}

	$("page_right").onclick = function () {
        //stopThrottle();

        DISPATCHER.fire("STOPALL");
        //DISPATCHER.fire("SNAP_TO_GRID_RESET");
        $("stop").className = "tooltippable";
		this.className = "selected tooltippable";
		
		$("pageRightToggle").value = "true";

		//moveResultsOverA.autoBrowseCount = 0;
        startScreenRollTimeout();

		DISPATCHER.fire("PAGE_RIGHT");//pageRight();
		return false;
	}

	$("manual_page_left").onclick  = function(){

        DISPATCHER.fire("MANUAL_LEFT");
		return false;
	}
	
	$("manual_page_right").onclick = function(){
        
        DISPATCHER.fire("MANUAL_RIGHT");
		return false;
	}

/*
	$("slow_left").onclick = function () {
        debug("EVENT Slow left clicked");
        DISPATCHER.fire("STOPALL");
        //stopThrottle();
        //DISPATCHER.fire("SNAP_TO_GRID_RESET");
        $("stop").className = "tooltippable";
		this.className = "selected tooltippable";
		$("direction").value = "1";
		$("speed").value = "10";
		$("traffic_light").value = "go";
        debug("[SCROLL] Starting slow left.");
        closeFeatureImage();
        DISPATCHER.fire("START_SLIDER");
		return false;
	}

	$("slow_right").onclick = function () {
        debug("EVENT Slow Right Clicked");
        DISPATCHER.fire("STOPALL");
        //stopThrottle();
        //DISPATCHER.fire("SNAP_TO_GRID_RESET");
        $("stop").className = "tooltippable";
		this.className = "selected tooltippable";
		$("direction").value = "-1";
		$("speed").value = "10";
		$("traffic_light").value = "go";
        debug("[SCROLL] Starting slow right.");
        closeFeatureImage();
        DISPATCHER.fire("START_SLIDER");
		return false;
	}
*/
}

