inserted a click event to check which window to open whether libchat or qp