var popupStatus = 0;
function loadPopup_6(){
	if(popupStatus==0){
		$("#backgroundPopup_6").css({
			"opacity": "0.7"
		});
		$("#backgroundPopup_6").fadeIn("slow");
		$("#popupContact_6").fadeIn("slow");
		popupStatus = 1;
	}
}
function disablePopup_6(){
	if(popupStatus==1){
		$("#backgroundPopup_6").fadeOut("slow");
		$("#popupContact_6").fadeOut("slow");
		popupStatus = 0;
	}
}
function centerPopup_6(){
	var windowWidth = document.documentElement.clientWidth;
	var windowHeight = document.documentElement.clientHeight;
	var popupHeight = $("#popupContact_6").height();
	var popupWidth = $("#popupContact_6").width();
	$("#popupContact_6").css({
		"position": "absolute",
		"top": windowHeight/2-popupHeight/2,
		"left": windowWidth/2-popupWidth/2
	});
	$("#backgroundPopup_6").css({
		"height": windowHeight
	});
	
}
$(document).ready(function(){
	$("#button_6").click(function(){
		centerPopup_6();
		loadPopup_6();
	});
	$("#popupContactClose_6").click(function(){
		disablePopup_6();
	});
	$("#backgroundPopup_6").click(function(){
		disablePopup_6();
	});
	$(document).keypress(function(e){
		if(e.keyCode==27 && popupStatus==1){
			disablePopup_6();
		}
	});
});

