
function login(which_section){
	if(which_section == 'form'){
		var the_uri = $("#reg_form").serialize();
		$.ajax({type:'POST', url:"/bin/php/save_form_data_ajax.php", data: the_uri, success: function(data){
				var the_y_offset = $(window).scrollTop() + 20; 
				$.ajax({type:'GET', url:'/account-modal.html', success: function(data){
						$("#mainContent").append(data);
						$("#acct_container").css("top", the_y_offset);
					}
				});
			}
		});
	}else if(which_section == 'link'){
		var the_y_offset = $(window).scrollTop() + 20; 
		$.ajax({type:'GET', url:'/account-modal.html', success: function(data){
				$("#mainContent").append(data);
				$("#acct_container").css("top", the_y_offset);
			}
		});
	}
	return false;
}

function closePopup(id) {
	$("#"+id).fadeOut("fast");
	$("#overlay").unbind("click");
	$("#overlay").remove();
	$("#"+id).remove();
	document.onkeydown = "";
	return false;
}
