function toggleExp( elem ) {
	$('#exp' + elem.value).attr('disabled', !elem.checked);
}
function showLicense( val ) {
	$('#liclist').val("");
	$('#ls_table').show();
	var $elem = $('#ls' + val);
	
	if($elem.length != 0 && $elem.is(':hidden') )
	{
		if( val == 13 ) //if Other
		{	$('#ls' + val + 'Label').attr('disabled', false);	}
		$('#ls' + val + 'Day').attr('disabled', false);
		$('#ls' + val + 'Month').attr('disabled', false);
		$('#ls' + val + 'Year').attr('disabled', false);
		$('#ls' + val + 'School').attr('disabled', false);
		$('#ls' + val + 'State').attr('disabled', false);
		if(val != 14) {
			$('#revocationhistory').show();
			
		}
		licensesShowing++;
		$elem.show();
	}
	if(val != 14 && !$('#ls14').is(':hidden'))
		removeLicense(14);
	if(val == 14) {
		for(i = 1; i < 14; i++){
			removeLicense(i);
		}
		$('#revocationhistory').hide();
	}
}
function removeLicense( val ) {
	var $elem = $('#ls' + val);
	if($elem.length != 0 && !$elem.is(':hidden'))
	{
		licensesShowing--;
		$elem.hide();
		if( val == 13 ) //if Other
		{	$('#ls' + val + 'Label').attr('disabled', true);	}
		$('#ls' + val + 'Day').attr('disabled', true);
		$('#ls' + val + 'Month').attr('disabled', true);
		$('#ls' + val + 'Year').attr('disabled', true);
		$('#ls' + val + 'School').attr('disabled', true);
		$('#ls' + val + 'State').attr('disabled', true);

		if( licensesShowing < 1 )
		{
			//hide the whole table
			$('#ls_table').hide();
			$('#revocationhistory').hide();
		}
	}
}

