/*************** searchpanel.js ****************/

jQuery(document).ready(function(){
   jQuery("#searchInput").focus();
   jQuery("#suchMaske").focus();
});

function trim(value) {
   var temp = value;
   var obj = /^(\s*)([\W\w]*)(\b\s*$)/;
   if (obj.test(temp)) { temp = temp.replace(obj, '$2'); }
   var obj = /  /g;
   while (temp.match(obj)) { temp = temp.replace(obj, " "); }
   return temp;
}

function empty(str) {
	if (trim(str).length>0) {
		return false;
	}
	else {
		return true;
	}
}

function checkSuchbegriff() {
	var obj = document.getElementById("suchMaske");
	obj.value = trim(obj.value)
	if (empty(obj.value)) {
		highlightSuchfeld()
		return false;
	}
	else {
		return true;
	}
}


