/*
function checkJobSelect() {

  if(document.jobselect.select_fylke.selectedIndex==0) {
    alert("Vennligst velg fylke.");
    return false;
  }

  if(document.jobselect.select_kommune.selectedIndex==0) {
    alert("Vennligst velg kommune.");
    return false;
  }

  if(document.jobselect.select_jobcategory.selectedIndex==0) {
    alert("Vennligst velg type jobb");
    return false;
  }

  return true;
}
*/

function fylkeSelectOnChange(url) {

  loadXMLDoc(url+"?data=jobselect_kommune&id="+document.jobselect.select_fylke.options[document.jobselect.select_fylke.selectedIndex].value);
  
}

var xmlhttp

function loadXMLDoc(url)
{
xmlhttp=null
// code for Mozilla, etc.
if (window.XMLHttpRequest)
  {
  xmlhttp=new XMLHttpRequest()
  }
// code for IE
else if (window.ActiveXObject)
  {
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
  }
if (xmlhttp!=null)
  {
  xmlhttp.onreadystatechange=state_Change
  xmlhttp.open("GET",url,true)
  xmlhttp.send(null)
  }
else
  {
  alert("Your browser does not support XMLHTTP.")
  }
}

function state_Change()
{
// if xmlhttp shows "loaded"
if (xmlhttp.readyState==4)
  {
  // if "OK"
  if (xmlhttp.status==200)
  {
  document.getElementById('kommune').innerHTML=xmlhttp.responseText
  }
  else
  {
  alert("Problem retrieving data:" + xmlhttp.statusText)
  }
  }
}




