function popupOn(pageID, popupWidth) {
    var overlay	= document.getElementById('overlay_'+pageID);
    var popup	= document.getElementById('popup_'+pageID);
    var txt	= document.getElementById('txt_'+pageID);
    var flash	= $E('#flash_'+pageID);

    overlay.style.visibility = 'visible';
    overlay.style.zIndex = 1000;
    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';
    flash.style.visibility = 'visible';
    txt.style.display = 'inline';
}

function popupOff(pageID) {
    var overlay	= document.getElementById('overlay_'+pageID);
    var txt	= document.getElementById('txt_'+pageID);
    var flash	= document.getElementById('flash_'+pageID);
	
    overlay.style.visibility = 'hidden';
    flash.style.visibility = 'hidden';
    txt.style.display = 'none';
    overlay.style.zIndex = -10;
}