# Encapsulation of system.perspective.openPopup 
# Use on button event script - Non-Resizable popup with close Icon.
# This allows for feeding the path of the view and the params for the view.

def popupBtn(path, popUpParams, popUpTitle, showClose, resize):
	import random
	# Generate Page ID (random from 1 to 100)
	pgID = str(random.randint(1,100))
	popUpParams = dict(popUpParams)
	system.perspective.openPopup(pgID, path, params = popUpParams, title = popUpTitle, showCloseIcon = showClose, resizable = resize)

def hoverLblOpn(path, popUpParams, popUpTitle, showClose, resize, lblPos):
	pgID = "hoverLbl"
	popUpParams = dict(popUpParams)
	system.perspective.openPopup(pgID, path, params = popUpParams, title = popUpTitle, showCloseIcon = showClose, resizable = resize, position = lblPos)
	
def hoverLblCls():
	system.perspective.closePopup("hoverLbl")
