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 they click on the home page and the origlocation is set
24 take the opac back to the origlocation */
25 if( findCurrentPage() == HOME && getOrigLocation() != null )
26 LOCATION = getOrigLocation();
28 if(getDepth() == null) DEPTH = findOrgDepth(getLocation());
31 runEvt('common','init');
35 if( cgi.param(PARAM_LOCATION) == null ) {
36 var org = G.user.prefs[PREF_DEF_LOCATION];
37 var depth = G.user.prefs[PREF_DEF_DEPTH];
39 if(org == null) org = G.user.ws_ou();
40 if(depth == null) depth = findOrgDepth(org);
47 runEvt("common", "run");
50 var loc = findOrgLasso(getLasso());
51 if (!loc) loc = findOrgUnit(getLocation());
53 if (getLasso()) G.ui.common.now_searching.appendChild(text('Search group: '));
54 G.ui.common.now_searching.appendChild(text(loc.name()));
57 function windowUnload() { runEvt("common", "unload"); }