	function InvokeAction(Element, A)
	{
		if (Element.form)
		{
			Element.form.action += A;
			Element.form.submit();
		}
		else
		{
			document.forms[Element].action += A;
			document.forms[Element].submit();
		}
	}

	var Opened
	function ToggleMenu(ItemId)
	{
		if (document.getElementById('SubMenu' + ItemId))
		{
			if (Opened)
			{
				document.getElementById('SubMenu' + Opened).style.display = 'none';
			}

			var IsOpen = 'block' == document.getElementById('SubMenu' + ItemId).style.display;
			document.getElementById('SubMenu' + ItemId).style.display = IsOpen ? 'none' : 'block';
			Opened = ItemId;
		}
	}

	function ViewDestinations(RegionId)
	{
		location.href = 'Destinations.asp?RegionId=' + RegionId;
	}

	function ViewHolidays(DestinationId)
	{
		location.href = 'Holidays.asp?DestinationId=' + DestinationId;
	}

	function ShowGeneralTerms()
	{
		window.open('PDF/Dive-and-Travel-voorwaarden.pdf','AlgemeneVoorwaarden','top=50,left=50,width=800, height=500, resizable=no, menubar=no, toolbars=no, scrollbars=yes');
	}

	function Popup(URL, title)
	{
		window.open(URL, 'popup_ref', 'top=50,left=50,width=800, height=500, resizable=no, menubar=no, toolbars=no, scrollbars=yes');
	}

	// PageLoad function
	// This function is called when:
	// 1. after calling $.historyInit();
	// 2. after calling $.historyLoad();
	// 3. after pushing "Go Back" button of a browser
	function pageload(hash) {
	    // hash doesn't contain the first # character.
	    if (hash) {
	        // find the a-element with the given id
	        var a = $("#" + hash);
	        if (a.attr("target") != "undefined") {
	            // There was a target defined, load the URL inside this target
	            $("#" + a.attr("target")).load(a.attr("href"));
	            alert('Loading content inside: ' + a.attr("target"));
	        }
	        else {
	            // Somthing else??
	        }
	    } else {
	        // start page
	        // Could load some defaults... PE:
	        // $("#load").empty();
	    }
	}

