function calculateLoss() {
	var employees = $('#noemply').val();
	var slowdown = $('#minsslow :selected').val();
	var avgrate = $('#avgrate').val();
	
	//hide all notifications
	$('#requiredtxt').hide();
	$('#empalert').text('');
	$('#avgratealert').text('');

	if (employees != "" && avgrate != "") {
		var minsweek = employees * slowdown * 5;	 // calculate minutes lost per week
		var hoursweek = minsweek / 60;						 // calculate hours lost per week
		var monthly = hoursweek * avgrate * 4;		 // calculate monthly cost
		var yearly = hoursweek * avgrate * 50;		 // calculate yearly cost
		monthly = monthly.toFixed(0);
		yearly = yearly.toFixed(0);
		$('#monthlycost').text('$' + monthly);
		$('#yearlycost').text('$' + yearly);
		$('#results').show();
	}
	else {
		var text = "";
		if (employees == ""	) { $('#empalert').text('*'); }
		if (avgrate == "") { $('#avgratealert').text('*');  }
		$('#requiredtxt').show();
	}
}

