My bad, its .addFront() with all the same arguments. Although .add() seemed to work, use .addFront().
You would assign a global variable to it, then check the variable. The value of the variable should be the value of the selections integerID. So, say you set the variable to $PopUpMenu. You could check it doing something like this:
function checkPopUp()
{
switch($PopUpMenu)
{
case 0:
//This is the "0" value within the menu
//You can add functions within here
case 1:
//This is the "1" value within the menu
//You can do the same in here
case 2:
//This is the "2" value within the menu
//Same as before and you can do however many of these
}
}