function popin( html, w, h ){
    jQuery('body').append('<div id="overlay-appear"></div>');
    jQuery('#overlay-appear').css({
        height: jQuery(document).height(),
        opacity: 0
    });
    jQuery('#overlay-appear').fadeTo('fast',0.8);

    var btn_close   = jQuery('<p id="pop-btn-close">Fermer</p>').click(function(){
		closePopin();
    });

    var content	    = jQuery(html);
    jQuery('body').append( content ).children( '#pop' ).append( btn_close );

    var sizeElem = function() {
	var popin   = jQuery('#pop');
	var w	    = jQuery(window);
        contentScrollTop = w.scrollTop();
        contentScrollLeft = w.scrollLeft();
        popin.css( {
	    top: (w.height()/2) + contentScrollTop - (popin.height()/2),
	    left: (w.width()/2) + contentScrollLeft - (popin.width()/2)
	} );
    }

    sizeElem();
	
	jQuery("#overlay-appear").click(function(){
		closePopin();
	});

    jQuery(window).scroll(function(){
        sizeElem();
    }).resize(function(){
        sizeElem();
    });
}

function closePopin(){
		jQuery('#overlay-appear').fadeOut('fast',function(){
				jQuery(this).remove();
		});
		jQuery('#pop').fadeOut('fast',function(){
				jQuery(this).remove();
		});
		return false;
}