function loadSearchResults(object, from, orderby)
{
	var object = object || {};
	var from = from || 0;
	var orderby = orderby || "id DESC";
	loadSearchResults_options("div_search_content", "../nieuws/results.php", object, from, orderby);
}
function loadSearchResults_options(container_id, file, object, from, orderby)
{
	var object = object || {};
	var params = "";

	for(var parameter in object){
		params += "&parameters[" + parameter + "]=" + new String(object[parameter]).replace(/ /g, '_');
	}
	//alert(params);
	var from = from || 0;
	var orderby = orderby || "id DESC";

	if(typeof closeAssistants == "function")
	{
		closeAssistants();
	}

	$("#" + container_id).load(file + "?doSearch=1&content=" + new Date().getTime() + params);
}



function goPage(from)
{
	goPage_options("div_search_content", "../nieuws/results.php", from);
}
function goPage_options(container_id, file, from)
{
	$("#" + container_id).load(file + "?content=" + new Date().getTime() + "&from=" + from);
}



function orderPage(orderby)
{
	orderPage_options("div_search_content", "../nieuws/results.php", orderby);
}
function orderPage_options(container_id, file, orderby)
{
	$("#" + container_id).load(file + "?content=" + new Date().getTime() + "&orderby=" + orderby);
}



function loadResult(type, id, current_number)
{
	loadResult_options("div_search_content", "../nieuws/result.php", type, id, current_number);
}
function loadResult_options(container_id, file, type, id, current_number)
{
	$("#" + container_id).load(file + "?content=" + new Date().getTime() + "&type=" + type + "&id=" + id + "&current_number=" + current_number);
}



function backToResults()
{
	backToResults_options("div_search_content", "../nieuws/results.php");
}
function backToResults_options(container_id, file)
{
	$("#" + container_id).load(file + "?content=" + new Date().getTime());
}



function goNumber(go_number)
{
	goNumber_options("div_search_content", "../nieuws/result.php", go_number);
}
function goNumber_options(container_id, file, go_number)
{
	$("#" + container_id).load(file + "?content=" + new Date().getTime() + "&go_number=" + go_number);
}


function searchOnEnter(event)
{
	if(13 == event.keyCode)
	{
		loadSearchResults({search_what:document.getElementById('search_what').value})
	}
}