# this file must be UTF-8 encoded
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_ {}
# this macro will be set to _textprefschanged_ when the "set preferences"
# button has been pressed
_prefschanged_ {}
#######################################################################
# 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;
\}
}
_getargsfunction_ {
function getargs () \{
return argk + args + argm + argo + argrd + arghd + argb + argqf + 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(value) \{
if (value != _cgiargfc_) argfc = "&fc=" + value + "&f=" + value;
else argfc = "";
updatehrefs();
\}
function updatehl(value) \{
if (value != _cgiarghl_) arghl = "&hl=" + value;
else arghl = "";
updatehrefs();
\}
}
_pagescriptextra_ {
// preferences scripts generated from \_preferences:pagescriptextra\_
savedhrefs = new Object();
argk = "";
args = "";
argm = "";
argrd = "";
argo = "";
argb = "";
argqf = "";
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 updateqf (value) \{
if (value != _cgiargqf_) argqf = "&qf=" + value;
else argqf = "";
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\\-]+/)) href = href.replace(/&l=[\\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) \{
if (value != _cgiargqt_) location.href = location.href + "&qt=" + value + getargs();
\}
}
#######################################################################
# headers
# these are overridden so we can put an onLoad event handler
# in the
_prefschanged_
} #search prefs _searchprefs_ {
_textsearchprefs_ |
_textprefop_ |
} _querytypedependantoptions_ { _If_("_cgiargct_" eq "0", _plainqueryoptions_,_mgppqueryoptions_) } _mgppqueryoptions_{ _If_("_cgiargqto_" eq "1", _plainqueryoptions_) _If_("_cgiargqto_" eq "2", _formqueryoptions_) _If_("_cgiargqto_" eq "3", _dualqueryoptions_) } #query options for mg colls and mgpp colls with only plain searching _plainqueryoptions_ {_iconblankbar__modeoption_ _boxsizeoption_ } #query options for mgpp colls with only form searching _formqueryoptions_ {_formmodeoption_ _formnumfieldoption_ } #query options for mgpp colls with both types of search available _dualqueryoptions_ {_textplainsearch_ _plainqueryoptions_
_textformsearch_ } _collectionprefs_ { _formqueryoptions_
_textcollectionprefs_
_collectionoption_
} _presentationprefs_ {_iconblankbar__textpresentationprefs_
_htmloptions_ _If_(_languageoption_,
) _If_(_encodingoption_, _textlanguage_ _languageoption_ ) _textencoding_ _encodingoption_ _formatoption_
} ####################################################################### # icons ####################################################################### _iconthispage_ {}