//extended profile
function open_extended_profile(handoffnd, minisite_id, debug) {
	//VERTICALLY CENTER POPUP
	$("#extended_profile_bg").css("height", $(document).height());
	var windowHeight = $(window).height();
	var popupHeight = $("#extended_profile_container").height();
	var scrollPos = $(window).scrollTop();
	//var popupY = windowHeight/2 - popupHeight/2 + scrollPos;
	var popupY = 25 + scrollPos;
	$("#extended_profile_bg").css("display","block"); 
	$("#extended_profile_container").css("display","block");
	$("#extended_profile_container").css("top",popupY); 
	$("#overlay_form").load('/mp', {
		mp:          'html',
		html:        'xmlhttp-load_extended_profile',
		handoffnd:   handoffnd,
		minisite_id: minisite_id,
		debug:       debug
	}, function(){
		$(".multi").multiSelect({
      oneOrMoreSelected: '*',
      selectAll: false,
      noneSelected: ''
    });
		$('.multiSelect').addClass('input_txt');
	});
	return false;
}

function close_extended_profile() {
	$("#extended_profile_bg").css("display","none"); 
	$("#extended_profile_container").css("display","none");
	$("#overlay_form").html("");
	$.get("/", { nd: "xmlhttp-load_extended_profile_cancel" } );
	return false;
}

function changeState(country, minisite_id){
	$("#state_div").load('/mp', {
		mp:          'html',
		html:        'xmlhttp-load_state_list',
		minisite_id: minisite_id,
		country:     country,
		state:       $('#state').val()
	});
}