function load_county_list(StateID, sFieldName) {
	x_load_county_list(StateID, sFieldName, cb_return_dropdown);
}

function cb_return_dropdown(result) {
	document.getElementById('county_dropdown').innerHTML = result;
}


/*
 *	Name:		send_email()
 *
 *	Arguments:	sElementList	-	The list of elements to be checked for e-mail
 *
 *	Description:	Will go through the list of elements and create a list of users to be e-mailed
 */
function send_email(sElementList)
{
	aList = sElementList.split(',');
	sUserList = '';
	for (i = 0; i < aList.length; ++i)
	{
		if (document.getElementById("User_" + aList[i]).checked == true)
		{
			sUserList += aList[i] + ',';
		}
	}
	
	if (sUserList != '')
	{
		x_send_email(sUserList, cb_send_email);
	}
	else
	{
		alert("You must select at least one person.");
	}
}

function cb_send_email(sReturn)
{
	window.location.href = "mailto:" + sReturn;
}


/*
 *	Name:		check_boxes()
 *
 *	Arguments:	sElementList	-	The list of elements to be changed
 *				sStatus		-	Tells if the check boxes should be checked or unchecked
 *
 *	Description:	Will go through the list of elements and either check or check all of the boxes in the list
 */
function check_boxes(sElementList, sStatus)
{
	aList = sElementList.split(',');
	for (i = 0; i < aList.length; ++i)
	{
		document.getElementById("User_" + aList[i]).checked = sStatus;
	}
}


/*
 *	Name:		expand_collapse()
 *
 *	Arguments:	oImage		-	The Object for the plus or minus image
 *				iElementID	-	The unique id to the table to show or hide
 *
 *	Description:	Expands or collapses a list of counties for the state that is clicked on
 */
function expand_collapse(oImage, iElementID)
{
	oElem = document.getElementById(iElementID);
	if (oElem.style.display == 'none')
	{
		oImage.src = 'images/minus.gif';
		oElem.style.display = 'block';
	}
	else
	{
		oImage.src = 'images/plus.gif';
		oElem.style.display = 'none';
	}
}
