/**
 * action_menu.js : maneja el action_menu en content.html 
 */


$(document).ready(function(){ 


//	action_menu
	var changeConf = document.querySelector("#ChangeConf");
	var cancelar = document.querySelector("#Cancelar");
	var show_alarms = document.querySelector("#ShowAlarm");
	var delete_alarm = document.querySelector("#DeleteAlarm");
	var delete_allAlarm = document.querySelector("#DeleteAllAlarm");


	if (changeConf){
		changeConf.onclick = function() {
			window.location.href = "index.html";
			return false;
		}
	}


	if (cancelar){
		cancelar.onclick =  function() {
			window.location.href = "content.html";
			return false;
		}
	}

	if (show_alarms){
		show_alarms.onclick = function (){
			localStorage.setItem("alarma", "3");  //Mostrar las alarmas
			window.location.href = "content.html";
			return false;
		}

	}

	if (delete_alarm){
		delete_alarm.onclick = function (){
			localStorage.setItem("alarma", "4");  //Borrar alarma
			window.location.href = "content.html";
			return false;
		}

	}

	if (delete_allAlarm){
		delete_allAlarm.onclick = function (){
			localStorage.setItem("alarma", "5");  //Borrar todas las alarmas
			window.location.href = "content.html";
			return false;
		}

	}

}); //document.ready