function checkUncheckSome(controller,theElements) {
	//Programmed by Shawn Olson
	//Copyright (c) 2006
	//Permission to use this function provided that it always includes this credit text
	//  http://www.shawnolson.net
	//Find more JavaScripts at http://www.shawnolson.net/topics/Javascript/	
	
	//theElements is an array of objects designated as a comma separated list of their IDs
	//If an element in theElements is not a checkbox, then it is assumed
	//that the function is recursive for that object and will check/uncheck
	//all checkboxes contained in that element

	var formElements = theElements.split(',');
	var theController = document.getElementById(controller);
	for ( var z = 0; z < formElements.length; z++ ) {
		theItem = document.getElementById(formElements[z]);
		if ( theItem ) {
			if ( theItem.type ) {
				if ( theItem.type == 'checkbox' && theItem.id != theController.id ) {
					theItem.checked = theController.checked;
				}
			} else {
				var nextArray = '';
				for ( var x = 0; x < theItem.childNodes.length; x++ ) {
					if ( theItem.childNodes[x] ) {
						if ( theItem.childNodes[x].id ) {
							nextArray += theItem.childNodes[x].id+',';
						}
					}
				}
				checkUncheckSome(controller,nextArray);			
			}		
		}
	}
}
