/*
	The following block will have the adjuster Notification modal popup method definition
*/
function adjusterCheckBoxClick(fullStateName,nonResidentAdjusterFlag,CB)
	{
	/*
		Parameters:
		
		fullStateName represents the state name to be used in the modal popup message
		nonResidentAdjusterFlag can take either 1 or 0 as a value
		CB is the calling Checkbox control on which the method will be invoked.
		
		This method will 
		1- Check if state is a non-resident Adjuster state or not(depending on the passed parameter)
		2- If the answer in 1 was true, shows the dialog modal with the inner HTML dynamically created based on the full state name
		3- If the user selects No, the method will deselect the passed checkbox. Otherwise, it will do nothing. Just close the dialog window
	*/	
	var isNonResidentAdjusterState = (nonResidentAdjusterFlag=="1");
	if(isNonResidentAdjusterState || !CB.checked)
	{
		return false;
	}
	$.fx.speeds._default = 1000;
	//Construct the modal inner HTML content
	$("#dialog-modal").html("<p class='ghostTitleXSmall'>"+fullStateName +" no longer accepts CE credit filings for non-resident adjusters. They require you to meet the requirements of your resident state.  Unless you reside in "+fullStateName+" and/or you are using "+ fullStateName +" as your resident license state, you should NOT make this selection.<br /><br />Are you a <b>"+ fullStateName +"</b> resident adjuster?	</p>");
	// The following will construct the dialog control. 
	// fold effect requires the following file: /common/js/jquery/ui/jquery.effects.fold.js
	// explode effect requires the following file: /common/js/jquery/ui/jquery.effects.explode.js
	//Both files should be added in the calling file (asp page) for the effects to work
	$("#dialog-modal").dialog({
			modal: true,
			show: 'fold',
			hide: 'explode',			
			buttons: 
			{				
				No: function()
				{
					$(this).dialog('close');
					// The following line is used to unceck the checkbox if they hit No as the answer
					CB.checked = false;
				},
				Yes: function() 
				{
					// Just close the dialog window
					$(this).dialog('close');
				}
			}
		});
	}
