2 /* these events should be used by all */
4 window.onunload = windowUnload;
6 attachEvt("common", "init", loadUIObjects);
7 //attachEvt("common", "init", initParams);
8 attachEvt("common", "init", initCookies);
10 attachEvt("common", "unload", _tree_killer);
11 try{ attachEvt("common", "unload", cleanRemoteRequests);} catch(e){}
17 if( getLocation() == null && getOrigLocation() != null )
18 LOCATION = getOrigLocation();
20 if( getLocation() == null && getOrigLocation() == null )
21 LOCATION = globalOrgTree.id();
23 if( getLocation() != null && getOrigLocation() == null )
24 ORIGLOC = getLocation();
26 if(getDepth() == null) DEPTH = findOrgDepth(getLocation());
29 runEvt('common','init');
33 if( cgi.param(PARAM_LOCATION) == null ) {
34 var org = G.user.prefs[PREF_DEF_LOCATION];
35 var depth = G.user.prefs[PREF_DEF_DEPTH];
37 if(!org) org = G.user.ws_ou();
38 if(!depth) depth = findOrgDepth(org);
45 runEvt("common", "run");
47 G.ui.common.now_searching.appendChild(text(findOrgUnit(getLocation()).name()));
50 function windowUnload() { runEvt("common", "unload"); }