// popup functions
function openPopup() {
	$("#backgroundPopup").fadeIn("slow");
	$("#Popup").animate({
    	opacity: 'toggle',
		top: '+=75'
    	//height: 'toggle'
  }, 1500, function() {
    // Animation complete.
  });
}
function closePopup() {
	$("#backgroundPopup").fadeOut("slow");
	$("#Popup").fadeOut("slow");
	var popupUp = "invisible";
}
//centering popup  
function centerPopup(){  
	//request data for centering  
	var windowWidth = document.documentElement.clientWidth;  
	var windowHeight = document.documentElement.clientHeight;  
	var popupHeight = $("#Popup").height();  
	var popupWidth = $("#Popup").width();  
	//centering  
	$("#Popup").css({  
		"position": "absolute",  
		"top": 100,  
		"left": windowWidth/2-popupWidth/2  
	});  
	//only need force for IE6   
	$("#backgroundPopup").css({  
		"height": windowHeight  
	});  
}  
//centering popup after screen resize  
function centerPopupAfter(){  
	//request data for centering  
	var windowWidth = document.documentElement.clientWidth;  
	var windowHeight = document.documentElement.clientHeight;  
	var popupHeight = $("#Popup").height();  
	var popupWidth = $("#Popup").width();  
	//centering  
	$("#Popup").css({  
		"position": "absolute",  
		"top": 100,  
		"left": windowWidth/2-popupWidth/2  
	});  
	//only need force for IE6   
	$("#backgroundPopup").css({  
		"height": windowHeight  
	});  
}
function enlargeMenu() {
	$("#backgroundMenu").fadeIn("slow");
	$("#bigMenu").animate({
    	opacity: 'toggle',
		top: '+=75'
    	//height: 'toggle'
  }, 1500, function() {
    // Animation complete.
  });
}
function closeMenu() {
	$("#backgroundMenu").fadeOut("slow");
	$("#bigMenu").fadeOut("slow");
}
//centering popup  
function centerMenu(){  
	//request data for centering  
	var windowWidth = document.documentElement.clientWidth;  
	var windowHeight = document.documentElement.clientHeight;  
	var popupHeight = $("#bigMenu").height();  
	var popupWidth = $("#bigMenu").width();  
	//centering  
	$("#bigMenu").css({  
		"position": "absolute",  
		"top": 100,  
		"left": windowWidth/2-popupWidth/2  
	});  
	//only need force for IE6   
	$("#backgroundMenu").css({  
		"height": windowHeight  
	});  
}  
//centering popup after screen resize  
function centerMenuAfter(){  
	//request data for centering  
	var windowWidth = document.documentElement.clientWidth;  
	var windowHeight = document.documentElement.clientHeight;  
	var popupHeight = $("#bigMenu").height();  
	var popupWidth = $("#bigMenu").width();  
	//centering  
	$("#bigMenu").css({  
		"position": "absolute",  
		"top": 100,  
		"left": windowWidth/2-popupWidth/2  
	});  
	//only need force for IE6   
	$("#backgroundMenu").css({  
		"height": windowHeight  
	});  
}