var popupActive = 0;
	function load(){
		if(popupActive == 0){
			jQuery('.popup_background').css({
				"opacity": "0.8"
			});
			jQuery('.popup_background').fadeIn('slow');
			jQuery('#popup_redaction').fadeIn('slow');
			var valueMail = jQuery("#commentBox input").val();
			jQuery("#popup_redaction textarea").val(valueMail);
			popupActive = 1;
		}
	}
	function center(){
		var windowHeight = document.documentElement.clientHeight;
		var windowWidth = document.documentElement.clientWidth;
		var popupHeight = jQuery("#popup_redaction").height();
		var popupWidth = jQuery("#popup_redaction").width();
		jQuery('#popup_redaction').css({
			"position": "absolute",
			"top": windowHeight/2-popupHeight/2,
			"left": windowWidth/2-popupWidth/2
		});
	}
	
	function disable(){
		if(popupActive == 1){
			jQuery('.popup_background').fadeOut('slow');
			jQuery('#popup_redaction').fadeOut('slow');
			popupActive = 0;
		}
	}
	
	jQuery(document).ready(function() {
		jQuery('.popup_btn').click(function(){
			load();
			center();
		});
		jQuery('#popup_redaction .cancel').click(function(){
			disable();
		});
			
		
		
		
	});
