function SelectAll( uid, gid )
{
	if( uid > 0 )
	{
		if( $("#edit-"+uid+"-uid").attr('checked') )
		{
			$("input[id^='edit-user-"+uid+"-']").each(function() {
		 		if( !this.disabled )
		 			this.checked = true;
   			});	
		}
		else
		{
			$("input[id^='edit-user-"+uid+"-']").each(function() {
		 		if( !this.disabled )
		 			this.checked = false;
   			});	
		}
		
	}
	else if( gid > 0 )
	{
		if( $("#edit-"+gid+"-gid").attr('checked') )
		{
			$("input[id$='-"+gid+"']").each(function() {
		 		if( !this.disabled )
		 			this.checked = true;
   			});	
		}
		else
		{
			$("input[id$='-"+gid+"']").each(function() {
		 		if( !this.disabled )
		 			this.checked = false;
   			});	
		}
	}
}