package preferences # set within server # collectionoption is only set when cross-collection searching is turned on _collectionoption_ {} # this macro will be set to "1" when the "source docs retrived from dl/web # button is required - i.e. whenever PreferenceDocsFromWeb isn't set to false # in collect.cfg _PreferenceDocsFromWeb_ {} ####################################################################### # java images/scripts ####################################################################### # the _javalinks_ macros are the flashy image links at the top right of # the page. this is overridden here as we don't want a 'preferences' # link on this page _javalinks_ {_imagehome__imagehelp_} _javalinks_ [v=1] { _imagehome_
_imagehelp_
} ####################################################################### # scripts # note that changing either the "m" or the "o" argument # from the preferences page necessitates reseting the "r" # argument to 1 ####################################################################### _ccsfunctions_ {argcc = ""; savedccs = new Object(); function initialize () \{ for (i = 0; i < document.links.length; i++) savedhrefs[i] = document.links[i].href; s = "_cgiargcc_"; a = s.split (","); for (i = 0; i < a.length ;i++) \{ for (j = 0; j < document.PrefForm.cc.length; j++) \{ if (a[i] == document.PrefForm.elements["cc"][j].value) \{ document.PrefForm.elements["cc"][j].checked = true; savedccs[a[i]] = 1; argcc = argcc + "&cc=" + a[i]; break; \} else \{ savedccs[a[i]] = 0; \} \} \} updatehrefs(); \} function updatecc (collection) \{ if (savedccs[collection] == 1) savedccs[collection] = 0; else savedccs[collection] = 1; var i; argcc = ""; var changed = 0; for (i in savedccs) if (savedccs[i] == 1) \{ argcc += "&cc=" + i; changed = 1; \} if (changed == 1) argcc += "&r=1"; updatehrefs(); \} } _standardfunctions_ { function initialize () \{ for (i = 0; i < document.links.length; i++) savedhrefs[i] = document.links[i].href; // only add form search option if mgpp (ct arg) and javascript _If_("_cgiargct_" eq "1",var opt=new Option\("_textformsearch_"\, "1"\); document.PrefForm.qt.options[1]=opt;,//)_If_("_cgiargqt_" eq "1",opt.selected=1;) \} } _getargsfunction_ { function getargs () \{ return argk + args + argm + argo + argrd + arghd + argb + argqb + argfqn_If_(_collectionoption_,_ccsargs_)_If_(_htmloptions_,_htmlargs_); \} } _ccsargs_ {+ argcc} _htmlargs_ {+ argel + argil + argfc + arghl} _htmlfunctions_ {argel = ""; argil = ""; argfc = ""; arghl = ""; function updateel () \{ value = document.PrefForm.el.options[document.PrefForm.el.selectedIndex].value; if (value != "_cgiargel_") argel = "&el=" + value; else argel = ""; updatehrefs(); \} function updateil () \{ value = document.PrefForm.il.options[document.PrefForm.il.selectedIndex].value; if (value != "_cgiargil_") argil = "&il=" + value; else argil = ""; updatehrefs(); \} function updatefc () \{ if (document.PrefForm.fc.checked) _If_("_cgiargfc_" eq "1",_argfcblank_,_argfcon_) else _If_("_cgiargfc_" ne "1",_argfcblank_,_argfcoff_) updatehrefs(); \} function updatehl () \{ if (document.PrefForm.hl.checked) _If_("_cgiarghl_" eq "1",_arghlblank_,_arghlon_) else _If_("_cgiarghl_" ne "1",_arghlblank_,_arghloff_) updatehrefs(); \} } _argfcblank_ {argfc = "";} _argfcon_ {argfc = "&fc=1&f=1";} _argfcoff_ {argfc = "&fc=0&f=0";} _arghlblank_ {arghl = "";} _arghlon_ {arghl = "&hl=1";} _arghloff_ {arghl = "&hl=0";} _pagescriptextra_ { // preferences scripts generated from \_preferences:pagescriptextra\_ savedhrefs = new Object(); argk = ""; args = ""; argm = ""; argrd = ""; argo = ""; argb = ""; arghd = ""; argqb = ""; argfqn = ""; _If_(_collectionoption_,_ccsfunctions_,_standardfunctions_) _If_(_htmloptions_,_htmlfunctions_) _getargsfunction_ function updatehrefs () \{ for (i = 0; i < document.links.length; i++) document.links[i].href = savedhrefs[i] + getargs(); \} function updatek (value) \{ if (value != _cgiargk_) argk = "&k=" + value; else argk = ""; updatehrefs(); \} function updates (value) \{ if (value != _cgiargs_) args = "&s=" + value; else args = ""; updatehrefs(); \} function updatem () \{ value = document.PrefForm.m.options[document.PrefForm.m.selectedIndex].value; if (value != _cgiargm_) argm = "&r=1&m=" + value; else argm = ""; updatehrefs(); \} function updaterd () \{ if (document.PrefForm.rd.checked) _If_("_cgiargrd_" eq "1",argrd="";,argrd="&rd=1";) else _If_("_cgiargrd_" ne "1",argrd="";,argrd="&rd=0";) updatehrefs(); \} function updateo () \{ value = document.PrefForm.o.options[document.PrefForm.o.selectedIndex].value; if (value != _cgiargo_) argo = "&r=1&o=" + value; else argo = ""; updatehrefs(); \} function updatefqn () \{ value = document.PrefForm.fqn.options[document.PrefForm.fqn.selectedIndex].value; if (value != _cgiargfqn_) argfqn = "&fqn=" + value; else argfqn = ""; updatehrefs(); \} function updateb (value) \{ if (value != _cgiargb_) argb = "&b=" + value; else argb = ""; updatehrefs(); \} function updatehd() \{ arghd=""; if (document.PrefForm.hd[0].checked) \{ if ("_cgiarghd_" != "0") arghd = "&hd=0"; \} else \{ value = document.PrefForm.hdn[document.PrefForm.hdn.selectedIndex].value; if (_cgiarghd_ != value) arghd = "&hd="+value; \} updatehrefs(); \} function updateqb(value) \{ if (value != _cgiargqb_) argqb = "&qb=" + value; else argqb = ""; updatehrefs(); \} function updatel () \{ value = document.PrefForm.l.options[document.PrefForm.l.selectedIndex].value; href = location.href; if (href.match(/&l=\\w\\w/)) href = href.replace(/&l=\\w\\w/, "&l=" + value); else href += "&l=" + value; if (!location.href.match(/&nl=1$/)) href += "&nl=1"; location.href = href + getargs(); \} function updatev () \{ value = document.PrefForm.v.options[document.PrefForm.v.selectedIndex].value; href = location.href; if (href.match(/&v=\\d/)) href = href.replace(/&v=\\d/, "&v=" + value); else href += "&v=" + value; location.href = href + getargs(); \} function updatew () \{ value = document.PrefForm.w.options[document.PrefForm.w.selectedIndex].value; href = location.href; if (href.match(/&nw=[^&]+/)) href = href.replace(/&nw=[^&]+/, "&nw=" + value); else href += "&nw=" + value; if (!location.href.match(/&nl=0$/)) href += "&nl=0"; location.href = href + getargs(); \} function updateqt () \{ value = document.PrefForm.qt.options[document.PrefForm.qt.selectedIndex].value; location.href = location.href + "&qt=" + value + getargs(); \} } ####################################################################### # headers # these are overridden so we can put an onLoad event handler # in the tag of this page ####################################################################### _header_ {_cgihead_ _htmlhead_(background="_httpiconchalk_" onLoad="initialize();")_startspacer__pagebanner_ } # this declaration ends up being the same as style=restrict, never mind _header_[v=1] {_cgihead_ _htmlhead_(onLoad="initialize();")_pagebanner_ } ####################################################################### # page content ####################################################################### _pagetitle_ {_collectionname_: _textpreferences_} _imagethispage_ {_iconthispage_} _htmloptions_ {} _htmloptionson_ {

_fcoption_

_hloption_

_extlinkoption_ _If_(_PreferenceDocsFromWeb_,

_intlinkoption_) } _fcoption_ { _textfcoption_ } _hloption_ { _texthloption_ } #search pref options _boxsizeoption_{ _textqueryboxsize_ _textregbox_
_textbigbox_ } _caseoption_ { _textcasediffs_ _textignorecase_
_textmatchcase_ } _caseoption_ [l=ar] {} _caseoption_ [l=zh] {} _stemoption_ { _textwordends_ _textstem_
_textnostem_ } _stemoption_ [l=zh] {} _modeoption_ { _textquerymode_ _textsimplemode_
_textadvancedmode_ } _searchhistoryop_ { _textsearchhistory_ _textnohistorydisplay_
_texthistorydisplay_ } _relateddocop_ { Display related documents } _historynumrecords_{} _maxdocoption_ { } _hitsperpageoption_ { } _extlinkoption_ { _textextlink_ } _intlinkoption_ { _textintlink_ } # set from within pageaction _languageoption_ {} _encodingoption_ {} _formatoption_ { _textformat_ } _content_ {

_navigationbar_
_If_(_collectionoption_,_collectionprefs_) _presentationprefs_ _If_("_cgiargct_" eq "1",_mgppsearchprefs_,_mgsearchprefs_)
} #search prefs for mg collections _mgsearchprefs_ {

_textsearchprefs_

_boxsizeoption__caseoption__stemoption__modeoption__searchhistoryop_
_textprefop_
_iconblankbar_
} _collectionprefs_ {

_textcollectionprefs_

_collectionoption_
_iconblankbar_
} _presentationprefs_ {

_textpresentationprefs_

_htmloptions_ _If_(_languageoption_,) _If_(_encodingoption_,) _formatoption_
_textlanguage__languageoption_
_textencoding__encodingoption_
_iconblankbar_
} ####################################################### ## new stuff for prefs for form vs text search - for mgpp collections _mgppsearchprefs_ {

_textsearchprefs_

_searchtypeop_ _If_(_cgiargqt_,_formsearchoptions_,_textsearchoptions_) _caseoption__stemoption__searchhistoryop_
_textprefop_
_iconblankbar_
} _searchtypeop_ { _texttypesearch_ } _formsearchoptions_ { _formmodeoption_ } _textsearchoptions_ { _boxsizeoption_ _modeoption_ } _formmodeoption_{ _textformtype_ _textsimple_
_textadvanced_
_formnumoption_ } _formnumoption_ {_textwith_ _textfields_ } ####################################################################### # icons ####################################################################### _iconthispage_ {_textpreferences_}