// return the value of the radio button that is checked
// return an empty string if none are checked, or
// there are no radio buttons
function getCheckedValue(radioObj) {
	if(!radioObj)
		return "";
	var radioLength = radioObj.length;
	if(radioLength == undefined)
		if(radioObj.checked)
			return radioObj.value;
		else
			return "";
	for(var i = 0; i < radioLength; i++) {
		if(radioObj[i].checked) {
			return radioObj[i].value;
		}
	}
	return "";
}

function setCheckedValue(radioObj, newValue) {
	if(!radioObj)
		return;
	var radioLength = radioObj.length;
	if(radioLength == undefined) {
		radioObj.checked = (radioObj.value == newValue.toString());
		return;
	}
	for(var i = 0; i < radioLength; i++) {
		radioObj[i].checked = false;
		if(radioObj[i].value == newValue.toString()) {
			radioObj[i].checked = true;
		}
	}
}

function showImage(image, title, width, height, imagetext, description) {
  var windowNote;
  windowNote = window.open('../uw_afbeelding.html','Image','toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no,width=' + width + ',height='+height);
  text = '<HTML>\n<HEAD>\n<title>' + title + '</title>\n<link rel="stylesheet" type="text/css" href="../css/afbeelding.css">\n</HEAD>\n';
  text += '<body scroll="no" onClick="windowNote.close();">\n<table border="0" cellspacing="2" cellpadding="0">\n<tr><td align="center"><img src="' + image + '" border=0></td></tr>\n';
  text += '<tr><td align="center">' + imagetext + '</td></tr>\n';
  text += '<tr><td align="center">' + description + '</td></tr>\n';
  text += '</table>\n</body>\n</HTML>';
  windowNote.document.write(text);
  windowNote.focus();
  windowNote.document.close();
  return false;
}

