	function PopUpClose() {
		document.getElementById("popup_cont").style.display = 'none';
		document.getElementById("shadow").style.display = 'none';
	}
	
	function PopUpShow() {
		var h = document.getElementById("container_global").offsetHeight;
		var w = document.getElementById("container_global").offsetWidth;
		var shadow = document.getElementById("shadow");
		var popup = document.getElementById("popup_cont");
		shadow.style.height = h + 'px';		
		shadow.style.width = w + 'px';		
		popup.style.display = 'block';
		shadow.style.display = 'block';
		Valign(popup);
	}
	
	function Valign(elem) {
		if(window.innerWidth){
			width = window.innerWidth;
			height = window.innerHeight;
		} else if(document.documentElement && document.documentElement.clientWidth) {
			width = document.documentElement.clientWidth;
			height = document.documentElement.clientHeight;
		} else if(document.body && document.body.clientWidth) {
			width = document.body.clientWidth;
			height = document.body.clientHeight;
		}
		var popup_h = document.getElementById("popup_cont").offsetHeight;
		var top = (height-popup_h)/2;
		var ua = navigator.userAgent.toLowerCase();		
		if (ua.indexOf("safari") != -1) { elem.style.top = eval(window.pageYOffset) + top + 'px'; } else
					   { elem.style.top = eval(document.documentElement.scrollTop) + top + 'px';}
	}
