		// moti - update - 081031 {
		// צריך לבדוק עם רועי על נוסח לאלרטים

		function getCheckedIdsByTable(sTable) {
			
			var arrIds = [];
			var oRows = document.getElementById(sTable).getElementsByTagName("TR");
			for (var i=0;i<oRows.length;i++)
			{
				if (oRows[i].nodeType == 1) {
					oEl = oRows[i].getElementsByTagName("IMG");
					for (var im=0;im<oEl.length;im++)
					{
						if (oEl[im].id.indexOf("CB") > -1 && oEl[im].src.indexOf("unselected") == -1) {
							arrIds.push(oEl[im].id.replace(/\D/gi,""));
						}
					}
				}
			}

			// moti - update - 081104 {
			CheckAll(sTable,true)
			// } 081104

			return arrIds;
		}


			function addToMyMovieList() {
				var aCheckedIds = getCheckedIdsByTable("TblMovieCollection");
				if (aCheckedIds.length)
				{
					$.ajax({
					   type: "POST",
					   url: ROOT_URL+"pro-movies.asp?rnd="+new Date().getTime(),
					   data: {act:"add-batch",source:MOVIE_COLLECTION_TYPE,target:"movies",ids:aCheckedIds},
					   success: function(msg){
							MessageBox(396,105,"Got it! close this message","<span>Items added</span>",true,null,true);
					   }
					});
				} else {
					MessageBox(396,105,"Got it! close this message","<span>There is no checked items</span>",true,null,true);
				}
			}

			function addToMyRequestList() {
				var aCheckedIds = getCheckedIdsByTable("TblMovieCollection");
				if (aCheckedIds.length)
				{
					$.ajax({
					   type: "POST",
					   url: ROOT_URL+"pro-movies.asp?rnd="+new Date().getTime(),
					   data: {act:"add-batch",source:MOVIE_COLLECTION_TYPE,target:"requests",ids:aCheckedIds},
					   success: function(msg){
							MessageBox(396,105,"Got it! close this message","<span>Items added</span>",true,null,true);
					   }
					});
				} else {
					MessageBox(396,105,"Got it! close this message","<span>There is no checked items</span>",true,null,true);
				}
			}

		// } 081031

function editItems() {
	var aCheckedIds = getCheckedIdsByTable("TblMovieCollection");
	if (aCheckedIds.length) {
		location.href=COLLECTION_MOVIE_EDIT_URL.replace("{0}",aCheckedIds.join(","));
	} else {
		MessageBox(396,105,"Got it! close this message","<span>There is no checked items</span>",true,null,true);
	}
}
function deleteItems() {
	var aCheckedIds = getCheckedIdsByTable("TblMovieCollection");
	if (aCheckedIds.length) {
		$.ajax({
		   type: "POST",
		   url: ROOT_URL+"pro-movies.asp?rnd="+new Date().getTime(),
		   data: {act:"delete",type:MOVIE_COLLECTION_TYPE,ids:aCheckedIds},
		   success: function(msg){
				//alert(msg);
				location.reload(true);
		   }
		});
	} else {
		MessageBox(396,105,"Got it! close this message","<span>There is no checked items</span>",true,null,true);
	}

}