sub checkUpdateGroup {
#called when a user asked to update a group (submit)
#after editting
my $sgn = param('GroupName');
#$newServiceGroupName |= "ARGH";
my $groupID = param('id');
my $selectedServices = param('selectedServices');
my @availableServices = @{getAllAvailableServices()};
my %availableServicesIDs;
#$availableServicesIDs{$_} = 1 for (@availableServices);
#return "Page Error" unless $selectedServices =~ /^(\d,)*$/;
my $selected = $selectedServices =~ s/,$//;
my @serv = split(/,/, $selected); #get the selected service id's
#die($serv[0]);
#die "HERE";
foreach (@serv) { return "Invalid service" unless $availableServicesIDs{$_} == 1;}
die "HERE";