//
function MenuController()
		{
			this.CurrentMenu = null;

			this.Open = function(submenu)
			{
				// If there is currently a menu open we close it
				if(this.CurrentMenu != null)
				{
					this.Close();
				}

				// Set the selected menu
				this.CurrentMenu = document.getElementById(submenu);

				// Set it to show (display: none and display: block in CSS is used to toggle visibility)
				this.CurrentMenu.style.display = "block";

				// Bind our close function to the document's click function so if we click somewhere
				// it will close the menu
				document.onclick = this.Close;
			}

			// Our close function
			var _this = this;

			this.Close = function()
			{
				// If there's no open menu we exit
				if(_this.CurrentMenu == null)
					return;

				// Hide the open menu
				_this.CurrentMenu.style.display = "none";

				// Reset our tracking variable
				_this.CurrentMenu = null;

				// Remove our document click function
				document.onclick = null;
			}
		}

function confirm_prompt(msg_str) {
var agree_with = confirm(msg_str);
if (agree_with) {
	return true;
} else {
	return false;
	}
}
