// JavaScript Document
function show(buttonid,divid){
	//alert(option.checked);
	if (buttonid.checked == true){
	document.getElementById(divid).style.display='block';
	}
	else {
	document.getElementById(divid).style.display='none';
	}
	for (var j=0; j<document.getElementById(divid).getElementsByTagName('input').length; j++){
		document.getElementById(divid).getElementsByTagName('input')[j].checked = false // unchecks all radio/checkboxes in specified div
	}
}


// HTML:
// <input type="checkbox" name="anything" id="buttonid" value="anything" onchange="show(this.form.buttonid,'divid')">
// ...
// <div id="divid" style="display:none;"> ... </div>
//
// 'buttonid' is the id of the radio button or checkbox to which the onchange action is applied
// 'divid' is the id of the div whose visibility will be toggled
//
// used in breslow/registration.php

function activate(buttonid,inputid){
	//alert(option.checked);
	if (buttonid.checked == true){
	document.getElementById(inputid).disabled = false;
	}
	else {
	document.getElementById(inputid).disabled = true;
	document.getElementById(inputid).checked = false;
	}
	for (var j=0; j<document.getElementById(inputid).getElementsByTagName('input').length; j++){
		document.getElementById(inputid).getElementsByTagName('input')[j].checked = false // unchecks all radio/checkboxes in specified div
	}
}


// HTML:
// <input type="checkbox" name="anything" id="buttonid" value="anything" onchange="show(this.form.buttonid,'divid')">
// ...
// <input type="anything" id="inputid" diabled="true"> 
//
// 'buttonid' is the id of the radio button or checkbox to which the onchange action is applied
// 'inputid' is the id of the radio button or checkbox button whose checkedness will be toggled
//
// used in uweb/shortcourseregistration.php

function clearfield(form, field){
	document.getElementById(field).value = '';
}


function showbyDate(){
	
	
}