function LoginBox () {
	$('h5.forgotPasswordh5 a').click ( function(ev) {
		ev.preventDefault();
		$('#ForgotPassBox').modal({position:["120px"],overlayId:'UserYesNo-overlay',containerId:'ForgotPassBox-container'});												
	});
	$('h3#cancel_button a').click( function(ev) {
		ev.preventDefault();
		$.modal.close();										
	});
	$('h3#submit_button a').click( function(ev) {
		ev.preventDefault();
		$('p.errBox').hide();
		var EmailChecker = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/;
		if (!EmailChecker.test(document.forgotPassForm.fp_email_addr.value)) {
			$('p.errBox').html("Please check your entry - it does not appear to be a valid email address.");
			$('p.errBox').show();
			return;
		}
		$('#forgotPassForm').hide();
		$('#fp_buttons h3#cancel_button').hide();
		$('#fp_buttons h3#submit_button').hide();
		$('#fp_loading_gif').show();
		var fpData = $('#forgotPassForm').serialize();
		$.ajax({
				type:"POST",
				url:'Functions/profile.cfc?method=forgotPassword&returnformat=json',
				data:fpData,
				dataType:"json",
				error: function(msg,msg2,msg3) { 
					$('#fp_loading_gif').hide();
					$('p.errBox').html("An error has occurred and we are unable to complete your request at this time.");
					$('p.errBox').show();
					$('#fp_buttons h3#cancel_button').show();
				},
				success: function(theResp) {
					if ((typeof theResp.err == 'undefined') || (typeof theResp.errCode=="undefined") || (typeof theResp.errMessage=="undefined")) {
						$('#fp_loading_gif').hide();
						$('p.errBox').html("An error has occurred and we are unable to complete your request at this time.");
						$('p.errBox').show();
						$('#fp_buttons h3#cancel_button').show();
					}
					else {
						if (theResp.err == true) {
							$('#fp_loading_gif').hide();
							$('p.errBox').html(theResp.errMessage);
							$('p.errBox').show();
							$('#fp_buttons h3#cancel_button').show();
							if(parseInt(theResp.errCode) !=5 && parseInt(theResp.errCode) !=3) {
								$('#forgotPassForm').show();
								$('#fp_buttons h3#submit_button').show();
							}
						}
						else {
							document.forgotPassForm.fp_email_addr.value.length = 0;
							$.modal.close();
							UserErrorAlert("Email Sent", "An email has been sent to the address you provided. Please give it a few minutes to a couple hours to get to your Inbox and then follow the link provided to reset your password.", false, true);
						}
					}
				}
		});		
	});
}
