changed order of flagged, added js confirm on marking of flagged gts