altered onclick so it removes the f= query variable if it exists