

var ui = null;

function xalert() {}


function findUi()
{
var n=50
var f = window
while (n > 0 && f != null && typeof f != "undefined") {
n--;
if (f.ui) { return f.ui }
if (f.parent != null && f.parent != f && typeof f.parent != "undefined") { f = f.parent; xalert("parent " + f.name); }
else if (f.opener != null && f.opener != f) { f = f.opener; xalert("opener " + f.name); }
else { xalert("no opener: " + f.name); return null; }
}
}

function dummyUi()
{
function noop() {}
this.noop = noop;
this.select = noop; this.selectEdit = noop; this.menuEdit = noop; this.create = noop; this.find = noop;
this.creates = noop; this.wizard = noop; this.split = noop; this.menu = noop; this.browse = noop;
this.browseall = noop; this.up = noop; this.down = noop; this.rebrowse = noop; this.unbrowse = noop;
this.cut = noop; this.copy = noop; this.paste = noop; this.del = noop; this.open = noop;
this.display = noop; this.displays = noop; this.edit = noop; this.reedit = noop; this.properties = noop;
this.setBrowsePath = noop; this.setArea = noop; this.setRole = noop; this.setLang = noop; this.setFind = noop;
this.repanel = noop; this.home = noop; this.setSelection = noop;
}


ui = findUi();
if (ui == null) ui = new dummyUi()

