// JavaScript Document
// JavaScript Document
 var popupStatus = 0;  
   //loading popup with jQuery magic!  
    function loadPopup1(){  
    //loads popup only if it is disabled  
   if(popupStatus==0){  
    $("#bgpop").css({  
   "opacity": "0.7"  
    });  
   $("#bgpop").fadeIn("slow");  
   $("#moremsg1").fadeIn("slow");  
   popupStatus = 1;  
   }  
 }  
 
  
  //disabling popup with jQuery magic!  
   function disablePopup1(){  
   //disables popup only if it is enabled  
   if(popupStatus==1){  
	
	$("#bgpop").fadeOut("slow");  
	 $("#moremsg1").fadeOut("slow");  

popupStatus = 0;  
 }  
 }  
   
   
    //centering popup  
function centerPopup1(){  
//request data for centering  
 var windowWidth = document.documentElement.clientWidth;  
 var windowHeight2 = document.documentElement.scrollTop; 
 var windowHeight = document.documentElement.clientHeight;   
 var popupHeight = $("#moremsg1").height();  
 var popupWidth = $("#moremsg1").width();  
 
 $("#moremsg1").css({  
"position": "absolute" , 
"top": windowHeight2 + 50,
 "left": windowWidth/2-popupWidth/2  
});  

   
 $("#bgpop").css({  
 "height": windowHeight  
 });  
   
 }
   
   
   
//CLOSING POPUP  
//Click the x event!  
$("#popupContactClose1").click(function(){  
 disablePopup1();  
 });  
 //Click out event!  
 $("#bgpop").click(function(){  
 disablePopup1();  
 });  
 //Press Escape event!  



