function docount(countdownfrom) {
	var currentsecond = document.redirect.redirect2.value = countdownfrom - 1;
	var targetURL = "http://answers.healthinsurancefinders.com/"
	if (currentsecond != 1) {
			document.redirect.redirect2.value = currentsecond
		} else {
			window.parent.location = targetURL
			return
		}
		setTimeout("docount("+currentsecond+")",1000)
}
	
function counterdirect() {
	var countdownfrom = 6;
	docount(countdownfrom);
}

$(document).ready(function() {

var launched=0;
var max_launch=2;

$(document).mousemove(function(e) {




if ( ( (e.pageY <= 5) || (e.clientY <= 5) )&&(launched < max_launch) )
{
// Launch MODAL BOX
$('#exit_content').modal({onOpen: modalOpen, onClose: simplemodal_close});
//alert (launched);
launched=launched+1;
counterdirect();
}

});

});

/**
 * When the open event is called, this function will be used to 'open'
 * the overlay, container and data portions of the modal dialog.
 *
 * onOpen callbacks need to handle 'opening' the overlay, container
 * and data.
 */
function modalOpen (dialog) {
	dialog.overlay.fadeIn('fast', function () {
		dialog.container.fadeIn('fast', function () {
			dialog.data.hide().slideDown('fast');
		});
	});
}

   /**
 * When the close event is called, this function will be used to 'close'
 * the overlay, container and data portions of the modal dialog.
 *
 * The SimpleModal close function will still perform some actions that
 * don't need to be handled here.
 *
 * onClose callbacks need to handle 'closing' the overlay, container
 * and data.
 */
function simplemodal_close (dialog) {
	dialog.data.fadeOut('fast', function () {
		dialog.container.hide('fast', function () {
			dialog.overlay.slideUp('fast', function () {
				$.modal.close();
			});
		});
	});
}




