function markRow(rowobj, nClass) {

  var theCells = null;

  if (rowobj.cells != 'undefined') {

    theCells = rowobj.cells;

  }

  else if (rowobj.getElementsByTageName('td')) {

    theCells = rowobj.getElementsByTageName('td');

  }

  cntCells = theCells.length;

  if (cntCells > 0) {

    for (i=0;i<cntCells;i++) {

      theCells[i].className = nClass;
  

    }

  }

}

function setClass(obj, naam) {

  obj.className = naam;

}

function printPage(content) {

 openWin('print.php', 600, 600);

 document.toPrint.target = 'dont4getus';

 document.toPrint.content.value = content;

 document.toPrint.submit();

}



function openWin(url, wi, he) {
 var win = window.open(url,'dont4getus','width='+wi+',height='+he+',resizable=yes,status=no,toolbar=no,menubar=no, scrollbars=auto');
 var b = screen.width;
 var h = screen.height;
 b = (b - wi) / 2;
 h = (h - he) / 2;
 win.moveTo(b,h);
}


function checkForm(form) {

  var aantal = form.elements.length;

  var string = 'U heeft de volgende verplichte veld(en) niet ingevuld: \n';

  var debugstr = 'Debug information: \n';

  string += '_______________________________________________________\n';

  var returnbool = true;

  for (var i=0;i<aantal;i++) {

    debugstr += form.elements[i].title + ' name: ' + form.elements[i].title + ' val: ' + form.elements[i].value + '\n';

    if (form.elements[i].type == 'checkbox') {

      if (form.elements[i].title.length > 0 && !form.elements[i].checked) {

	string += form.elements[i].title+'\n';

        returnbool = false;

      }

    }

    else if (form.elements[i].value.length == 0 && form.elements[i].title.length > 0 && !form.elements[i].disabled && form.elements[i].style.display != 'none') {

      string += form.elements[i].title+'\n';

      returnbool = false;

    }

  }

  if (returnbool) {

    // alert(debugstr);

    return true;

  }

  else {

    string += '______________________________________________________\n';

    string += 'Vul deze velden in om de actie te voltooien';

    alert(string);

    return false;

  }

}