var popupStatus=0;function loadPopup(){if(popupStatus==0){$("#backgroundPopup").css({"opacity":"0.7"});$("#backgroundPopup").fadeIn(700);$("#popupContact").fadeIn(700);popupStatus=1}}function disablePopup(){if(popupStatus==1){$("#backgroundPopup").fadeOut(700);$("#popupContact").fadeOut(700);popupStatus=0}}function centerPopup(){var a=document.documentElement.clientWidth;var b=document.documentElement.clientHeight;var c=$("#popupContact").height();var d=$("#popupContact").width();$("#popupContact").css({"position":"absolute","top":b/2-c/2,"left":a/2-d/2});$("#backgroundPopup").css({"height":b})}$(document).ready(function(){$("#popupContactClose").click(function(){disablePopup()});$("#backgroundPopup").click(function(){disablePopup()});$(document).keypress(function(e){if(e.keyCode==27&&popupStatus==1){disablePopup()}})});
