function taalEnwebsite(){
	adrecip = "RSCA";
	zoeksite1 = "http://www.wittegids.be/search/";
	zoeksite2 = "http://www.goudengids.be/search/";
	aanvullen = "Aanvullen aub";
	land = "Belgie";

	
}


function checkField(thefield){
	taalEnwebsite();
	check=true;
	if (thefield.value==thefield.defaultValue){
		setVisibility('tekstVAK1', 'none');
		thefield.value = aanvullen;
		check=false;
	}
	
	if (thefield.value==aanvullen) {
			setVisibility('tekstVAK1', 'none');
			thefield.value = aanvullen;
			check=false;

	} 
	
	country=document.address_frm.country.value;
	if (country==""){
	country=land;
	}
	
	if (check) {opzoeken();}
	
}

function displayTekstwiewat(thefield){
if (thefield.value == "")
setVisibility('tekstVAK1', 'inline');
}

function displayTekstwaar(thefield){
if (thefield.value == "")
setVisibility('tekstVAK2', 'inline');
}  



function opzoeken() {
	taalEnwebsite();
	wat=document.address_frm.wat.value;
	
	if (document.getElementById('goudengids').style.display == "none")
	window.open(zoeksite1+ country + "/" + wat + ".html?adrecip="+adrecip);
	
	if (document.getElementById('wittegids').style.display == "none")
	window.open(zoeksite2+ country + "/" + wat + ".html?adrecip="+adrecip);
}

function setVisibility(id, visibility) {
document.getElementById(id).style.display = visibility;
}

