// JavaScript Document

//Setzt die Suchanfrage in ein hidden input Feld
function set_search_query(query) {
	document.suchanfrage.Search_Query.value = query;
}

function set_search_category(category) {
	document.suchekategorie.Category.value = category;	
}

function switch_maxhits(select) {
    var index;

	for(index=0; index<select.options.length; index++)
	if(select.options[index].selected)
	{
		if(select.options[index].value!="")
		  document.sucherefresh.Maxhits.value=select.options[index].value;
		break;
	}
} 

function sleep(ms){
	var zeit=(new Date()).getTime();
	var stoppZeit=zeit+ms;
	while((new Date()).getTime()<stoppZeit){};
} 

function check_send(evt) {
	
	if(evt.keyCode == 13) 
	{
		document.suche.submit();
	}
}
