var _____WB$wombat$assign$function_____=function(name){return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name))||self[name];};if(!self.__WB_pmw){self.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{
let window = _____WB$wombat$assign$function_____("window");
let self = _____WB$wombat$assign$function_____("self");
let document = _____WB$wombat$assign$function_____("document");
let location = _____WB$wombat$assign$function_____("location");
let top = _____WB$wombat$assign$function_____("top");
let parent = _____WB$wombat$assign$function_____("parent");
let frames = _____WB$wombat$assign$function_____("frames");
let opens = _____WB$wombat$assign$function_____("opens");
Livesearch = Class.create();
Livesearch.prototype = {
initialize: function(searchform, targetitem, hideitem, url, searchprompt, buttonvalue) {
this.searchform = searchform;
this.targetitem = targetitem;
this.hideitem = hideitem;
this.url = url;
this.searchprompt = searchprompt;
this.buttonvalue = buttonvalue;
this.searchfield = 's';
this.loaditem = 'searchload';
this.resetbutton = 'searchreset';
this.submitbutton = 'searchsubmit';
this.lastsearch = '';
this.t = null; // Init timeout variable
this.isActive = false;
Event.observe(window, "load", this.onLoading.bindAsEventListener(this));
},
onLoading: function() {
if ( $(this.searchform) ) {
$(this.searchform).update('');
$(this.submitbutton).hide();
$(this.loaditem).hide();
new Effect.Fade(this.resetbutton, { duration: 0, to: 0.3 });
Event.observe(this.searchfield, 'focus', this.onInputFocus.bindAsEventListener(this));
Event.observe(this.searchfield, 'blur', this.onInputBlur.bindAsEventListener(this));
Event.observe(this.searchfield, 'keyup', this.readyLivesearch.bindAsEventListener(this));
this.resetListener = this.resetLivesearch.bindAsEventListener(this);
}
},
onInputFocus: function() {
if ($F(this.searchfield) == this.searchprompt) {
$(this.searchfield).value = '';
}
},
onInputBlur: function() {
if ($F(this.searchfield) == '') {
$(this.searchfield).value = this.searchprompt;
}
},
readyLivesearch: function(event) {
var code = event.keyCode;
if (code == Event.KEY_ESC || ((code == Event.KEY_DELETE || code == Event.KEY_BACKSPACE) && $F(this.searchfield) == '')) {
this.resetLivesearch.bind(this);
} else if (code != Event.KEY_RETURN) {
if (this.t) clearTimeout(this.t);
this.t = setTimeout(this.doLivesearch.bind(this), 400);
}
},
doLivesearch: function() {
if ($F(this.searchfield) == this.lastsearch) return;
new Effect.Fade(this.resetbutton, { duration: 0.1 });
new Effect.Appear(this.loaditem, { duration: 0.1 });
if (!this.isActive) {
this.isActive = true;
if ( ! $(this.hideitem) && K2.RollingArchives ) {
K2.RollingArchives.saveRollingState();
}
}
this.lastsearch = $F(this.searchfield);
var query = $(this.searchfield).serialize();
new Ajax.Updater(
this.targetitem,
this.url,
{
method: 'get',
evalScripts: true,
parameters: query + '&k2dynamic=1',
onComplete: this.searchComplete.bind(this)
});
},
searchComplete: function() {
if ( $(this.hideitem) ) {
$(this.hideitem).hide();
}
new Effect.Fade(this.loaditem, { duration: 0.1 });
Event.observe(this.resetbutton, 'click', this.resetListener);
new Effect.Appear(this.resetbutton, { duration: 0.1 });
$(this.resetbutton).style.cursor = 'pointer';
},
resetLivesearch: function() {
this.isActive = false;
this.lastsearch = '';
$(this.searchfield).value = this.searchprompt;
Event.stopObserving(this.resetbutton, 'click', this.resetListener);
new Effect.Fade(this.resetbutton, { duration: 0.1, to: 0.3 });
$(this.resetbutton).style.cursor = 'default';
if ( $(this.hideitem) ) {
$(this.targetitem).hide();
$(this.hideitem).show();
$(this.targetitem).update();
} else if ( K2.RollingArchives ) {
K2.RollingArchives.restoreRollingState();
}
}
}
}
/*
FILE ARCHIVED ON 22:39:27 Jul 03, 2007 AND RETRIEVED FROM THE
INTERNET ARCHIVE ON 06:21:39 Nov 27, 2025.
JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.
ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
SECTION 108(a)(3)).
*/
/*
playback timings (ms):
captures_list: 0.856
exclusion.robots: 0.069
exclusion.robots.policy: 0.055
esindex: 0.015
cdx.remote: 24.424
LoadShardBlock: 101.965 (3)
PetaboxLoader3.datanode: 98.472 (4)
PetaboxLoader3.resolve: 64.005 (2)
load_resource: 76.887
*/