// Uitgebreid zoeken scripts voor de XML partnermodule

//Javascript voor het tonen en verbergen van blokken

function showBlock(currBlock) {
	if (document.getElementById) {
		thisBlock = document.getElementById(currBlock).style
		if (thisBlock.display == "inline") {
			thisBlock.display = "inline"
			}
			else {
			thisBlock.display = "inline"
			}
			return false
			}
		else {
		return true
		}
}

function hideBlock(currBlock) {
	if (document.getElementById) {
		thisBlock = document.getElementById(currBlock).style
		if (thisBlock.display == "inline") {
			thisBlock.display = "none"
			}
			else {
			thisBlock.display = "none"
			}
			return false
			}
		else {
		return true
		}
}

function MeerCarross() {
  	document.occasion.f_categorie.size = 4;
	document.occasion.f_categorie.multiple = true;
	hideBlock('MC1');
	showBlock('MC2');}

function MinderCarross() {
	document.occasion.f_categorie.size = 1;
	document.occasion.f_categorie.multiple = false;
	hideBlock('MC2');
	showBlock('MC1');}

function MeerKleuren() {
  	document.occasion.f_kleuren.size = 4;
	document.occasion.f_kleuren.multiple = true;
	hideBlock('MK1');
	showBlock('MK2');}

function MinderKleuren() {
	document.occasion.f_kleuren.size = 1;
	document.occasion.f_kleuren.multiple = false;
	hideBlock('MK2');
	showBlock('MK1');}

function MeerOpties() {
	showBlock('search-extr-opties1');
	showBlock('MO2');
	hideBlock('MO1');}

function MinderOpties() {
	hideBlock('search-extr-opties1');
	hideBlock('MO2');
	showBlock('MO1');}


	
	

function clearAll() {
  if (document.occasion.f_prijs1.value == "van") { 
    document.occasion.f_prijs1.value = ""; }
  if (document.occasion.f_prijs2.value == "tot") { 
    document.occasion.f_prijs2.value = ""; }
  if (document.occasion.f_bouwj1.value == "van") { 
    document.occasion.f_bouwj1.value = ""; }
  if (document.occasion.f_bouwj2.value == "tot") { 
    document.occasion.f_bouwj2.value = ""; }
  if ((document.occasion.f_pc_cijfers.value == "postcode") || (document.occasion.f_pc_cijfers.value == "post"))	{ 
    document.occasion.f_pc_cijfers.value = ""; }
  if ((document.occasion.f_straal_postc.value == "str(km)") || (document.occasion.f_straal_postc.value == "str"))	{ 
    document.occasion.f_straal_postc.value = ""; }
  if (document.occasion.f_kmst1.value == "van") { 
    document.occasion.f_kmst1.value = ""; }
  if (document.occasion.f_kmst2.value == "tot") { 
    document.occasion.f_kmst2.value = ""; }
}

function setVestiging(cijfers) {
    document.occasion.f_pc_cijfers.value = cijfers;
    document.occasion.f_straal_postc.value = "1";
}


function checkVestiging() {
    document.occasion.f_pc_cijfers.value = document.occasion.f_vestiging.value;
    document.occasion.f_straal_postc.value = "1";
}


function checkVestiging2() {
	document.occasion.f_pc_cijfers.value = document.occasion.f_vestiging.value;
	document.occasion.f_straal_postc.value = "4";
 }


