	/*
		Disable Context Menu Script
		-----------------------------------
		Author: Tom Howells
		Last Updated: 18-Feb-2004 11:26 AM
		-----------------------------------
		(c) Copyright Tom Howells (2004)
		http://www.tomhowells.co.uk/
	*/
	// Disable the context menu
	function DisableContextMenu(e) {
		// Message to display
		var Message = "Sorry, the context menu for images has been disabled.";
		// Get browser name
		var BrowserName = navigator.userAgent;
		// If the browser is IE and the right button was pressed
		if (BrowserName.indexOf("MSIE") >= 0 && event.button == 2) {
			// Show message box
			alert(Message);
			// Return false, cancel button press
			return false;
		// If the browser is Mozilla and the right button was pressed
		} else if (BrowserName.indexOf("Mozilla") >= 0 && BrowserName.indexOf("compatible") == -1 && e.which == 3) {
			// Show message box
			alert(Message);
			// Return false, cancel button press
			return false;
		}
		// Return true, allow button press
		return true;
	}
	// Protect all images on the page
	function ProtectImages() {
		// Declare variables
		var ImgTags;
		// If the W3C DOM is supported
		if (document.getElementsByTagName) {
			// Reference image elements
			ImgTags = document.getElementsByTagName("img");
			// Loop through all image elements
			for (i = 0; i < ImgTags.length; i++) {
				// Disable the context menu
				ImgTags[i].onmousedown = DisableContextMenu;
				ImgTags[i].oncontextmenu = function() { return false; }
			}
		}
	}
