function popupOn(pageID, popupWidth){
 	var overlay	= document.getElementById('overlay_'+pageID);
 	var popup	= document.getElementById('popup_'+pageID);
	
	overlay.style.visibility	= 'visible';
	overlay.style.zIndex		= 10;
	var windowWidth				= 0;
	
	document.getElementById('overlaybg').style.height = document.body.offsetHeight;
	document.getElementById('overlaybg').style.width = document.body.offsetWidth;
	
	if(window.innerWidth){ //Provided by most browsers, but importantly, not Internet Explorer.
		windowWidth = window.innerWidth;
	} else if(document.body.clientWidth){ //Provided by many browsers, including Internet Explorer.
		windowWidth = document.body.clientWidth
	} else if(document.documentElement.clientWidth){ //Provided by most DOM browsers, including Internet Explorer. 
		windowWidth = document.documentElement.clientWidth;
	}
	
	popup.style.marginLeft = (windowWidth/2 - popupWidth/2) + 'px';
}

function popupOff(pageID){
	var overlay	= document.getElementById('overlay_'+pageID);
	
	overlay.style.visibility	= 'hidden';
	overlay.style.zIndex		= -10;
}

 