impl for the second popup;
js stuff;