function getWindowWidth() {
  	return document.compatMode=='CSS1Compat' && !window.opera?document.documentElement.clientWidth:document.body.clientWidth;
	}
 
function getWindowHeight() {
  	return document.compatMode=='CSS1Compat' && !window.opera?document.documentElement.clientHeight:document.body.clientHeight;
	}

function popupAction(id) {
	displayStatus = document.getElementById(id).style.display;
	
	if (displayStatus != 'block' && displayStatus != 'none') displayStatus = 'none';
		
	borderWidth = 5;
		
	if (displayStatus == 'none') {
		//alert(getWindowWidth() + 'x' + getWindowHeight());
		document.getElementById(id).style.display = 'block';
			
		// Calculate position of inner div
		document.getElementById(id).style.top = '87px';
		leftPosition = (getWindowWidth() - 375 - 10) / 2 - 39;
		
		document.getElementById(id).style.left = leftPosition + 'px';
		} else {
		// Only display black background if it's not IE6
		document.getElementById(id).style.display = 'none';
		}
	}