var geonetworkUrl = '/geonetwork/srv/en/main.home?';

// requires log-events.js

function doSimpleSearch(){
	var any = $('#any').val();

	if($('#any').val() == ''){
		alert('nothing to search for');
	}

	else {
		var url = geonetworkUrl + 'any=' + $('#any').val() + '&sortBy=relevance&hitsPerPage=10&output=full';
		
		logSearch(any);
		window.location = url;
	}
}

function doWhereSearch() {
	var northBL = $('#northBL').val();
        var southBL = $('#southBL').val();
	var eastBL =  $('#eastBL').val();
	var westBL = $('#westBL').val();
	
	
	var url = geonetworkUrl + 'any=' + $('#any').val() + '&northBL=' + northBL + '&southBL=' + southBL + '&eastBL=' + eastBL + '&westBL=' + westBL + '&sortBy=relevance&hitsPerPage=10&output=full&relation=overlaps';
	
	window.location = url ;
}

