Fix up javascript checking of guest box

cbugg: close bug-796