// scripts.js
// @author Sarah Giffrow

function checkUncheckAll(theElement) {
     var theForm = theElement.form, z = 0;
	 for(i=0; i<theForm.length;i++){
     	if(theForm[i].type == 'checkbox' && theForm[i].name != 'checkall' && theForm[i].name != 'majorpub' && theForm[i].name != 'casestudy' && theForm[i].name != 'factsheet' && theForm[i].name != 'webseminar'){
			theForm[i].checked = theElement.checked;
		}
	}
}

function checkUncheckGroups(theElement) {
     var theForm = theElement.form, z = 0;
	 var boxGroup = theElement.name;
	 for(i=0; i<theForm.length;i++){
     	if(theForm[i].type == 'checkbox' && (theForm[i].name.indexOf(boxGroup) == 0)){
			theForm[i].checked = theElement.checked;
		}
	}
}