// search.js
// ------------------
// Keeps the original default text
// in the search box, or replaces it
// with the last user-entered text
//
// @see http://www.dustindiaz.com/javascript-searchplay/
//

var searchPlay = {
	// The id of the search input box
	qInput : Object,
	
	orig : '',
	
	init : function() {
		this.qInput = document.getElementById('ctl00_q');
		this.orig = this.qInput.value;
		addEvent(this.qInput, 'focus', this.focus, false);
		addEvent(this.qInput, 'blur', this.blur, false);
	},
	
	focus : function() {
		if (this.value == searchPlay.orig) {
			this.value = '';
		}
	},
	
	blur : function() {
		if (this.value == '') {
			this.value = searchPlay.orig;
		}
	}
};

function pageListen() {
	searchPlay.init();
}

addEvent(window, 'load', pageListen, false);