function toon_uitgebreid(t,t2,m,h,s,s2) {
	$.ajax({
		type: "POST",
		url: "/ajax/zoeken2.php",
		data: {actie: 'uitgebreid', trefwoord: t, merk: m, hoofdgroep: h, subgroep: s, subgroep2: s2, tot: t2},
		success: function(msg) {
			$('#uitgebreid').empty().append(msg);
		}
	});
}

function get_select(div, cat, scat) {
	if(div == 'subgroep') {
		$('#subgroep').empty();
		$('#subgroep2').empty();
	}
		
	$.ajax({
		type: "POST",
		url: "/ajax/zoeken2.php",
		data: {actie: 'get_select', div: div, catid: cat, scatid: scat},
		success: function(msg){
			$('#'+div).empty().append(msg);
		}
	});
}
function get_specs(div, scat, specs) {
	$.ajax({
		type: "POST",
		url: "/ajax/zoeken2.php",
		data: {actie: 'get_specs', merk: $('#merk').val(), scatid: scat, specs: specs},
		success: function(msg) {
			if(msg != 'false') {
				$('#'+div).empty().append(msg);
				$('#specs').show();
				$('#specificaties').show();
			} else {
				$('#specs').empty().hide();
				$('#specificaties').hide();
			}
		}
	});
}

$.fn.clearForm = function() {
	/*extra aanpassing*/
	$('#subgroep').empty();
	$('#subgroep2').empty();
	
	return this.each(function() {
		var type = this.type, tag = this.tagName.toLowerCase();
		if (tag == 'form')
			return $(':input',this).clearForm();
		if (type == 'text' || type == 'password' || tag == 'textarea')
			this.value = '';
		else if (type == 'checkbox' || type == 'radio')
			this.checked = false;
		else if (tag == 'select')
			this.selectedIndex = 0;
	});
};