Open a popup window with Tag using client events

Im trying to open a Pop up window when my tag is True=(1) and close it when it false=(0). Im using a client events tag change script. Any ideas

If it's a Boolean tag, the tag change event script should look like this:

if event.getCurrentValue().value:
	system.nav.openWindowInstance("User Management/Effluent Select")

Oops. I forgot to address that part. To do both open and close, the script will need to look like this:

path = 'User Management/Effluent Select'
if event.getCurrentValue().value:
	windows = system.gui.getOpenedWindows()
	for window in windows:
		if window.path == path: