$(document).ready
(
	function()
	{
		if(typeof(excludes) != 'undefined')
		{
			var schools = $('.school');
			
			$.each
			(
				schools,
				function()
				{
					var current = $(this).find('select');
					var schoolID = parseInt($(current).attr('id').replace('slfProgramListing_', ''));
					
					$(current).change
					(
						function()
						{
							var excludedID = '#slfProgramListing_' + excludes[schoolID];
							
							if($(excludedID).size() > 0)
							{
								if($(current).val() != '')
								{
									$(excludedID).attr('disabled', true); 
								}
								else
								{
									$(excludedID).removeAttr('disabled'); 
								}
							}							
						}
					);
				}
			);
		}
	}
);
