
var ImagesGuard = new Object();

ImagesGuard.message = "";

/*void*/ ImagesGuard.protectImage = function(/*Image*/ img) {
	img.galleryimg = "no";
	img.ondragstart = function(e) { return false; }
	img.onmousedown = ImagesGuard.func_onmousedown;
	img.oncontextmenu = function(e) { return false; }
}

ImagesGuard.func_onmousedown = function(e) {
		if (typeof e == "undefined") {
			var e = event;
		}
		var buttonNo = (typeof e.which != "undefined") ? e.which : e.button;
		if (buttonNo > 1) {
			alert(ImagesGuard.message);
			return false;
		}
		return true;
}

/*void*/ ImagesGuard.protectImages = function(/*Image[]*/ imgs) {
	for (var i=0; i < imgs.length; i++) {
		ImagesGuard.protectImage(imgs[i]);
	}
}

