

// several little bits for Search Form(s)
// (which probably want to be redone in a jQuery kind of way instead)

	// most search fields trigger this onchange
function resetMost(){
	document.forms.SearchBox.sText.value = '';
	document.forms.searchForm.stk.value = '';
}

	// for Reset button
function resetForm(){
	document.forms.searchForm.authArt.value = '';
	document.forms.searchForm.titl.value = '';
	document.forms.searchForm.desc.value = '';
	document.forms.searchForm.datmin.value = '';
	document.forms.searchForm.datmax.value = '';
	document.forms.searchForm.stk.value = '';
}

	// stk field triggers this onchange
function resetStock(){
	document.forms.searchForm.authArt.value = '';
	document.forms.searchForm.titl.value = '';
	document.forms.searchForm.desc.value = '';
	document.forms.searchForm.datmin.value = '';
	document.forms.searchForm.datmax.value = '';
	document.forms.SearchBox.sText.value = '';
}

	// sText field triggers this onchange
function resetKey(){
	if (document.forms.searchForm) { // searchForm doesn't always exist
		document.forms.searchForm.authArt.value = '';
		document.forms.searchForm.titl.value = '';
		document.forms.searchForm.desc.value = '';
		document.forms.searchForm.datmin.value = '';
		document.forms.searchForm.datmax.value = '';
		document.forms.searchForm.stk.value = '';
	};
}

	// disable/enable Sort selector
function toggleSort() {
	var meth = document.forms.searchForm.sMethod.value;
	if (meth==2) {
		document.getElementById('sortNOT').style.display = 'none';
		document.getElementById('sort').style.display = 'inline';
	}
	if (meth<2) {
		document.getElementById('sort').style.display = 'none';
		document.getElementById('sortNOT').style.display = 'inline';
		document.getElementById('sortNOT').disabled = 'disabled';
	}
}

	// dummy text for search fields
function focusSearchField( fieldName, defaultText  ) {
	var fld = document.getElementById(fieldName);
	fld.value = (fld.value==defaultText ? '' : fld.value);
	fld.style.fontStyle = 'normal';
	fld.style.color = '#000';
}
function blurSearchField( fieldName, defaultText  ) {
	var fld = document.getElementById(fieldName);
	fld.value = (fld.value=='' ? defaultText : fld.value);
	fld.style.fontStyle = (fld.value==defaultText ? 'italic' : 'normal');
	fld.style.color = (fld.value==defaultText ? '#9bb' : '#000');
}


