// JavaScript Document

function showStreken(land_id, onderwerp) {
	bodyObj = document.body
  streekObj = document.searchF.streek;
  streekObj.normalize();
  streekoptions = streekObj.childNodes;
  lastChild = streekObj.lastChild;
  while (child = lastChild.previousSibling) {
    lastChild.parentNode.removeChild(lastChild)
    lastChild = child;
  }
  lastChild.parentNode.removeChild(lastChild)
  
	if (land_id == '' || land_id == 0) {
  	optionObj = document.createElement('OPTION');
  	optionObj.appendChild(document.createTextNode('-- alle streken --'));
  	optionObj.setAttribute('value', '');
  	streekObj.appendChild(optionObj);
    streekObj.normalize();
    return true;
  }
  //return true;
//  alert(land_id);
	scriptObj = document.createElement('script');
	scriptObj.src= 'js/streek.js.php?selectbox=streek&onderwerp=' + onderwerp + '&land=' + land_id;
	bodyObj.appendChild(scriptObj);
	//alert(scriptObj.innerHTML);

}

function showStrekenBedrijf(land_id, onderwerp) {
	bodyObj = document.body
  streekObj = document.searchF.streek;
  streekObj.normalize();
  streekoptions = streekObj.childNodes;
  lastChild = streekObj.lastChild;
  while (child = lastChild.previousSibling) {
    lastChild.parentNode.removeChild(lastChild)
    lastChild = child;
  }
  lastChild.parentNode.removeChild(lastChild)
  
	if (land_id == '' || land_id == 0) {
  	optionObj = document.createElement('OPTION');
  	optionObj.appendChild(document.createTextNode('-- alle streken --'));
  	optionObj.setAttribute('value', '');
  	streekObj.appendChild(optionObj);
    streekObj.normalize();
    return true;
  }
  //return true;
//  alert(land_id);
	scriptObj = document.createElement('script');
	scriptObj.src= 'js/streekbedrijf.js.php?selectbox=streek&onderwerp=' + onderwerp + '&land=' + land_id;
	bodyObj.appendChild(scriptObj);
	//alert(scriptObj.innerHTML);

}
