
// function to round the corners of the boxes on the homepage
var roundBoxes = function()
{
  // round corners
  settings = {
      tl: { radius: 10 },
      tr: { radius: 10 },
      bl: false,
      br: false,
      antiAlias: true,
      autoPad: true
  }
  var myBoxObject = new curvyCorners(settings, $('searchbox_top'));
  myBoxObject.applyCornersToAll();
  myBoxObject = null;

  settings = {
      tl: false,
      tr: false,
      bl: { radius: 10 },
      br: { radius: 10 },
      antiAlias: true,
      autoPad: true
  }

  var myBoxObject = new curvyCorners(settings, $('searchbox_bottom'));
  myBoxObject.applyCornersToAll();
  myBoxObject = null;

  // rounded corners
  settings = {
      tl: { radius: 10 },
      tr: { radius: 10 },
      bl: false,
      br: false,
      antiAlias: true,
      autoPad: true
  }
  var myBoxObject = new curvyCorners(settings, $('topjobs_top'));
  myBoxObject.applyCornersToAll();
  myBoxObject = null;

  settings = {
      tl: false,
      tr: false,
      bl: { radius: 10 },
      br: { radius: 10 },
      antiAlias: true,
      autoPad: true
  }

  var myBoxObject = new curvyCorners(settings, $('topjobs_bottom'));
  myBoxObject.applyCornersToAll();
  myBoxObject = null;

  // rounded corners
  settings = {
      tl: { radius: 10 },
      tr: { radius: 10 },
      bl: false,
      br: false,
      antiAlias: true,
      autoPad: true
  }
  var myBoxObject = new curvyCorners(settings, $('recentjobs_top'));
  myBoxObject.applyCornersToAll();
  myBoxObject = null;

  settings = {
      tl: false,
      tr: false,
      bl: { radius: 10 },
      br: { radius: 10 },
      antiAlias: true,
      autoPad: true
  }

  var myBoxObject = new curvyCorners(settings, $('recentjobs_bottom'));
  myBoxObject.applyCornersToAll();
  myBoxObject = null;  
  
}

// check form
var checkJobSearchForm = function()
{
  myform = $('checkJobSearchForm');
  
  // check length of keyword
  if ($('search_keyword').value.length!=0 && $('search_keyword').value.length<3)
  {
    alert('Trefwoord of bedrijfsnaam moet minimaal 3 karakters lang zijn');
    $('search_keyword').focus();
    return false;
  }

  // at least one criterium needed
  if ($('search_keyword').value=='' && $('education').value=='' && $('province').value=='')
  {
    alert('Kies minimaal één criterium');
    return false;
  }
}


// for Safari3 for Windows
Event.observe(window, 'load', function()
{
  roundBoxes();
});

// for all other browsers
Event.observe(document, 'dom:loaded', function()
{
  roundBoxes();
});
